answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT LMS AS class FROM table_15412381_5 WHERE lms_nos = "14510-5"
What is the LMS class of trains with numbers 14510-5?
CREATE TABLE table_15412381_5 (LMS VARCHAR, lms_nos VARCHAR)
SELECT Age FROM Student WHERE Fname = "Linda" AND Lname = "Smith"
What is the age of student Linda Smith?
CREATE TABLE Student (Age VARCHAR, Fname VARCHAR, Lname VARCHAR)
SELECT COUNT("Losses") FROM table_11770 WHERE "Goals For" > '29' AND "Team" = 'montreal'
What is the total number of losses for the Team of Montreal with Goals For larger than 29?
CREATE TABLE table_11770 ( "Team" text, "Games Played" real, "Wins" real, "Losses" real, "Ties" real, "Goals For" real, "Goals Against" real )
SELECT date FROM table_15412381_5 WHERE wheels = 279
What is the date of the 279 wheels?
CREATE TABLE table_15412381_5 (date VARCHAR, wheels VARCHAR)
SELECT Sex FROM Student WHERE Fname = "Linda" AND Lname = "Smith"
What is the gender of the student Linda Smith?
CREATE TABLE Student (Sex VARCHAR, Fname VARCHAR, Lname VARCHAR)
SELECT "Side-chain polarity" FROM table_55835 WHERE "1-Letter" = 'v'
what is the side-chain polarity for the amino acid with the 1-letter v?
CREATE TABLE table_55835 ( "Amino Acid" text, "3-Letter" text, "1-Letter" text, "Side-chain polarity" text, "Side-chain charge (pH 7.4)" text, "Hydropathy index" text )
SELECT lms_nos FROM table_15412381_5 WHERE builder = "G&SWR Kilmarnock"
What is the LMS number of the trains built by G&SWR Kilmarnock?
CREATE TABLE table_15412381_5 (lms_nos VARCHAR, builder VARCHAR)
SELECT Fname, Lname FROM Student WHERE Major = 600
List all students' first names and last names who majored in 600.
CREATE TABLE Student (Fname VARCHAR, Lname VARCHAR, Major VARCHAR)
SELECT AVG(cuts_made) FROM table_name_93 WHERE top_10 = 11 AND wins < 1
What is the average number of cuts made in events with fewer than 1 win and exactly 11 top-10s?
CREATE TABLE table_name_93 ( cuts_made INTEGER, top_10 VARCHAR, wins VARCHAR )
SELECT COUNT(wheels) FROM table_15412381_5 WHERE lms_nos = "16377-9"
How many figures are there for wheels for LMS numbers 16377-9?
CREATE TABLE table_15412381_5 (wheels VARCHAR, lms_nos VARCHAR)
SELECT city_code FROM Student WHERE Fname = "Linda" AND Lname = "Smith"
Which city does student Linda Smith live in?
CREATE TABLE Student (city_code VARCHAR, Fname VARCHAR, Lname VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.dob_year < "2049"
count the number of patients born before the year 2049.
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT MAX(saffir_simpson_category) FROM table_15416002_1
What is the maximum number for the Saffir-Simpson category in the Carvill Hurricane Index?
CREATE TABLE table_15416002_1 (saffir_simpson_category INTEGER)
SELECT COUNT(*) FROM Student WHERE Advisor = 1121
Advisor 1121 has how many students?
CREATE TABLE Student (Advisor VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "NEWBORN" AND procedures.icd9_code = "5361"
give me the number of patients whose primary disease is newborn and procedure icd9 code is 5361?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( ...
SELECT MAX(v_mph_) FROM table_15416002_1 WHERE chi = "13.5"
What is the maximum miles per hour recorded when the CHI (Carvill Hurricane Index) is equal to 13.5
CREATE TABLE table_15416002_1 (v_mph_ INTEGER, chi VARCHAR)
SELECT Advisor, COUNT(*) FROM Student GROUP BY Advisor ORDER BY COUNT(Advisor) DESC LIMIT 1
Which Advisor has most of students? List advisor and the number of students.
CREATE TABLE Student (Advisor VARCHAR)
SELECT open_date, open_year FROM shop WHERE shop_name = "Apple"
What are the open dates and years for the shop named Apple?
CREATE TABLE device ( device_id number, device text, carrier text, package_version text, applications text, software_platform text ) CREATE TABLE stock ( shop_id number, device_id number, quantity number ) CREATE TABLE shop ( shop_id number, shop_name text, location tex...
SELECT chi FROM table_15416002_1 WHERE nhc_advisory_number = "49B"
What is the CHI (Carvill Hurricane Index) when the NHC advisory number is equal to 49b?
CREATE TABLE table_15416002_1 (chi VARCHAR, nhc_advisory_number VARCHAR)
SELECT Major, COUNT(*) FROM Student GROUP BY Major ORDER BY COUNT(Major) LIMIT 1
Which major has least number of students? List the major and the number of students.
CREATE TABLE Student (Major VARCHAR)
SELECT prescriptions.drug_type, prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Digoxin"
specify the type and route of administration of drug digoxin
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT MAX(r_miles_) FROM table_15416002_1 WHERE landfall = "Texas" AND saffir_simpson_category < 3.0
What is the maximum number of miles reached in a Texas landfall when the Saffir-Simpson category is smaller than 3.0?
CREATE TABLE table_15416002_1 (r_miles_ INTEGER, landfall VARCHAR, saffir_simpson_category VARCHAR)
SELECT Major, COUNT(*) FROM Student GROUP BY Major HAVING COUNT(Major) BETWEEN 2 AND 30
Which major has between 2 and 30 number of students? List major and the number of students.
CREATE TABLE Student (Major VARCHAR)
SELECT publication.title FROM conference, publication WHERE conference.name = 'VLDB' AND publication.cid = conference.cid AND publication.citation_num > 200 AND publication.year > 2000
return me the paper after 2000 in VLDB conference with more than 200 citations .
CREATE TABLE domain_publication ( did int, pid int ) CREATE TABLE domain_conference ( cid int, did int ) CREATE TABLE publication_keyword ( kid int, pid int ) CREATE TABLE domain_keyword ( did int, kid int ) CREATE TABLE author ( aid int, homepage varchar, name varchar, ...
SELECT r_miles_ FROM table_15416002_1 WHERE chi = "9.9"
What are the miles when the Carvill Hurricane Index (CHI) is equal to 9.9?
CREATE TABLE table_15416002_1 (r_miles_ VARCHAR, chi VARCHAR)
SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major = 600
Which student's age is older than 18 and is majoring in 600? List each student's first and last name.
CREATE TABLE Student (Fname VARCHAR, Lname VARCHAR, Age VARCHAR, Major VARCHAR)
SELECT DISTINCT course.department, course.name, course.number, semester.semester, semester.year, student_record.grade FROM course, semester, student_record WHERE student_record.course_id = course.course_id AND student_record.semester = semester.semester_id AND student_record.student_id = 1
May I look at my transcript ?
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student ( student_id int, lastname varchar, ...
SELECT saffir_simpson_category FROM table_15416002_1 WHERE name = "Bonnie"
What is the Saffir-Simpson category for the hurricane named Bonnie?
CREATE TABLE table_15416002_1 (saffir_simpson_category VARCHAR, name VARCHAR)
SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major <> 600 AND Sex = 'F'
List all female students age is older than 18 who is not majoring in 600. List students' first name and last name.
CREATE TABLE Student (Fname VARCHAR, Lname VARCHAR, Sex VARCHAR, Age VARCHAR, Major VARCHAR)
SELECT Id AS "post_link", AnswerCount FROM Posts WHERE PostTypeId = 1 AND Tags = CONCAT('<', '##Tag:string##', '>') AND ClosedDate IS NULL ORDER BY CreationDate DESC
All questions with a *single* tag.
CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE Users ( Id number, Reputation number,...
SELECT common_name FROM table_15417439_1 WHERE accession_number = "XP_852505.1"
What kind of animal corresponds to the accession number xp_852505.1?
CREATE TABLE table_15417439_1 (common_name VARCHAR, accession_number VARCHAR)
SELECT COUNT(*) FROM Restaurant JOIN Type_Of_Restaurant ON Restaurant.ResID = Type_Of_Restaurant.ResID JOIN Restaurant_Type ON Type_Of_Restaurant.ResTypeID = Restaurant_Type.ResTypeID GROUP BY Type_Of_Restaurant.ResTypeID HAVING Restaurant_Type.ResTypeName = 'Sandwich'
How many restaurant is the Sandwich type restaurant?
CREATE TABLE Type_Of_Restaurant (Id VARCHAR); CREATE TABLE Restaurant (Id VARCHAR); CREATE TABLE Restaurant_Type (Id VARCHAR)
SELECT Time_of_purchase, Age FROM member
Show me a scatter plot of time of purchase and age for .
CREATE TABLE happy_hour ( HH_ID int, Shop_ID int, Month text, Num_of_shaff_in_charge int ) CREATE TABLE member ( Member_ID int, Name text, Membership_card text, Age int, Time_of_purchase int, Level_of_membership int, Address text ) CREATE TABLE shop ( Shop_ID int, A...
SELECT similarity FROM table_15417439_1 WHERE genus_species = "Sus scrofa"
How similar is the genus/species sus scrofa?
CREATE TABLE table_15417439_1 (similarity VARCHAR, genus_species VARCHAR)
SELECT SUM(Spent) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID WHERE Student.Fname = "Linda" AND Student.Lname = "Smith"
How long does student Linda Smith spend on the restaurant in total?
CREATE TABLE Visits_Restaurant (Spent INTEGER); CREATE TABLE Student (Spent INTEGER)
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BURBANK' AND date_day.day_number = 22 AND date_day.month_number = 5 AND ...
actually what are the nonstop flights from LAS VEGAS to BURBANK on saturday 5 22
CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE month ( month_number int, month_name text ) CREATE TA...
SELECT identity FROM table_15417439_1 WHERE genus_species = "Arabidopsis thaliana"
What identities do the genus/species arabidopsis thaliana have?
CREATE TABLE table_15417439_1 (identity VARCHAR, genus_species VARCHAR)
SELECT COUNT(*) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = "Linda" AND Student.Lname = "Smith" AND Restaurant.ResName = "Subway"
How many times has the student Linda Smith visited Subway?
CREATE TABLE Visits_Restaurant (Id VARCHAR); CREATE TABLE Student (Id VARCHAR); CREATE TABLE Restaurant (Id VARCHAR)
SELECT MIN(shirt_no) FROM table_name_63 WHERE birth_date = "april 12, 1986 (age27)"
What shirt No has a Birth Date of April 12, 1986 (age27)?
CREATE TABLE table_name_63 ( shirt_no INTEGER, birth_date VARCHAR )
SELECT common_name FROM table_15417439_1 WHERE genus_species = "Rattus norvegicus"
What's the animals name when the genus/species is rattus norvegicus?
CREATE TABLE table_15417439_1 (common_name VARCHAR, genus_species VARCHAR)
SELECT TIME FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = "Linda" AND Student.Lname = "Smith" AND Restaurant.ResName = "Subway"
When did Linda Smith visit Subway?
CREATE TABLE Restaurant (TIME VARCHAR); CREATE TABLE Visits_Restaurant (TIME VARCHAR); CREATE TABLE Student (TIME VARCHAR)
SELECT MIN("Lost") FROM table_34592 WHERE "Position" > '6' AND "Drawn" = '7' AND "Points" < '15'
What is the smallest lost when position is larger than 6, drawn is 7, and the points stat is less than 15?
CREATE TABLE table_34592 ( "Position" real, "Team" text, "Points" real, "Played" real, "Drawn" real, "Lost" real, "Against" real, "Difference" text )
SELECT length FROM table_15417439_1 WHERE genus_species = "Arabidopsis thaliana"
For the genus/species arabidopsis thaliana, what are the lengths?
CREATE TABLE table_15417439_1 (length VARCHAR, genus_species VARCHAR)
SELECT Restaurant.ResName, SUM(Visits_Restaurant.Spent) FROM Visits_Restaurant JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID GROUP BY Restaurant.ResID ORDER BY SUM(Visits_Restaurant.Spent) LIMIT 1
At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total.
CREATE TABLE Visits_Restaurant (Id VARCHAR); CREATE TABLE Restaurant (Id VARCHAR)
SELECT grid FROM table_name_45 WHERE team = "dale coyne racing" AND driver = "bruno junqueira"
What was the grid for Bruno Junqueira for Dale Coyne Racing?
CREATE TABLE table_name_45 ( grid VARCHAR, team VARCHAR, driver VARCHAR )
SELECT COUNT(original_air_date) FROM table_15430813_1 WHERE no_in_season = 17
How many original air dates were there for episode 17?
CREATE TABLE table_15430813_1 (original_air_date VARCHAR, no_in_season VARCHAR)
SELECT Student.Fname, Student.Lname FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID GROUP BY Student.StuID ORDER BY COUNT(*) DESC LIMIT 1
Which student visited restaurant most often? List student's first name and last name.
CREATE TABLE Visits_Restaurant (Id VARCHAR); CREATE TABLE Student (Id VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.fluid = "Urine"
what is the number of patients whose lab test fluid is urine?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic (...
SELECT institution FROM table_15438337_1 WHERE country = "London, United Kingdom"
Which company was based in London, United Kingdom?
CREATE TABLE table_15438337_1 (institution VARCHAR, country VARCHAR)
SELECT actual_order_id FROM actual_orders WHERE order_status_code = 'Success'
Find the ids of orders whose status is 'Success'.
CREATE TABLE actual_orders (actual_order_id VARCHAR, order_status_code VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SNF" AND demographic.diagnosis = "HYPERGLYCEMIA"
what is the number of patients with discharge location as snf diagnosed with primary disease hyperglycemia?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
SELECT original_air_date FROM table_15431959_1 WHERE written_by = "Peter DeLuise"
What was the original air date of Stargate SG-1 written by Peter Deluise?
CREATE TABLE table_15431959_1 (original_air_date VARCHAR, written_by VARCHAR)
SELECT t1.product_name, t1.product_price FROM products AS t1 JOIN regular_order_products AS t2 ON t1.product_id = t2.product_id GROUP BY t2.product_id ORDER BY COUNT(*) DESC LIMIT 1
Find the name and price of the product that has been ordered the greatest number of times.
CREATE TABLE products (product_name VARCHAR, product_price VARCHAR, product_id VARCHAR); CREATE TABLE regular_order_products (product_id VARCHAR)
SELECT microlab.organism FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-19271' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient...
what was the organism found in the last urine, catheter specimen microbiology test for patient 025-19271 in their last hospital visit?
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid num...
SELECT MAX(no_in_season) FROM table_15431959_1 WHERE directed_by = "Peter DeLuise"
How many seasons did Peter Deluise direct Stargate SG-1?
CREATE TABLE table_15431959_1 (no_in_season INTEGER, directed_by VARCHAR)
SELECT COUNT(*) FROM customers
Find the number of customers in total.
CREATE TABLE customers (Id VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.insurance = "Private" AND demographic.days_stay > "9"
how many patients who have private insurance stayed in hospital for more than 9 days?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions...
SELECT fifth_district FROM table_15442974_1 WHERE third_district = "William Womer"
Name the fifth district for william womer
CREATE TABLE table_15442974_1 (fifth_district VARCHAR, third_district VARCHAR)
SELECT COUNT(DISTINCT payment_method) FROM customers
How many different payment methods are there?
CREATE TABLE customers (payment_method VARCHAR)
SELECT Id, Body, Tags FROM Posts WHERE CreationDate LIKE '%2018%' LIMIT 1000
get data for inverted index assignment.
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE CloseAsO...
SELECT third_district FROM table_15442974_1 WHERE fifth_district = "Christine Young"
Name the third district for christine young
CREATE TABLE table_15442974_1 (third_district VARCHAR, fifth_district VARCHAR)
SELECT truck_details FROM trucks ORDER BY truck_licence_number
Show the details of all trucks in the order of their license number.
CREATE TABLE trucks (truck_details VARCHAR, truck_licence_number VARCHAR)
SELECT AVG("Founded") FROM table_65006 WHERE "Municipality" = 'yauco' AND "Population (2010)" > '42,043'
In what year was Yauco, which had over 42,043 people in 2010, founded?
CREATE TABLE table_65006 ( "Municipality" text, "FIPS code" real, "Founded" real, "Population (2010)" real, "Area" text )
SELECT fourth_district FROM table_15442974_1 WHERE second_district = "Joan Runnels"
Name the fourth district for joan runnels
CREATE TABLE table_15442974_1 (fourth_district VARCHAR, second_district VARCHAR)
SELECT product_name FROM products ORDER BY product_price DESC LIMIT 1
Find the name of the most expensive product.
CREATE TABLE products (product_name VARCHAR, product_price VARCHAR)
SELECT T2.customer_first_name, T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id
Return a histogram on what are the first names and ids for customers who have two or more accounts?
CREATE TABLE Order_Items ( order_item_id INTEGER, order_id INTEGER, product_id INTEGER, product_quantity VARCHAR(50), other_order_item_details VARCHAR(255) ) CREATE TABLE Products ( product_id INTEGER, parent_product_id INTEGER, production_type_code VARCHAR(15), unit_price DECIMAL(1...
SELECT fourth_district FROM table_15442974_1 WHERE first_district = "Beverly Bodem"
Name the fourth district for beverly bodem
CREATE TABLE table_15442974_1 (fourth_district VARCHAR, first_district VARCHAR)
SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California'
Find the names of customers who are not living in the state of California.
CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR); CREATE TABLE addresses (address_id VARCHAR, state_province_county VARCHAR)
SELECT microlab.organism FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-23724' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient...
what was the name of the organism found during the first other microbiology examination of patient 031-23724 in their last hospital encounter?
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number...
SELECT COUNT(fifth_district) FROM table_15442974_1 WHERE third_district = "Richard Houskamp"
Name the number for fifth district for richard houskamp
CREATE TABLE table_15442974_1 (fifth_district VARCHAR, third_district VARCHAR)
SELECT customer_email, customer_name FROM customers WHERE payment_method = 'Visa'
List the names and emails of customers who payed by Visa card.
CREATE TABLE customers (customer_email VARCHAR, customer_name VARCHAR, payment_method VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE" AND prescriptions.route = "INHALATION"
what number of patients primarily diagnosed for coronary artery disease were given drug by inhalation?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT fifth_district FROM table_15442974_1 WHERE fourth_district = "Steve Rudoni"
Name the fifth district for steve rudoni
CREATE TABLE table_15442974_1 (fifth_district VARCHAR, fourth_district VARCHAR)
SELECT t1.customer_name, t1.customer_phone FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California'
Find the names and phone numbers of customers living in California state.
CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_phone VARCHAR, customer_id VARCHAR); CREATE TABLE addresses (address_id VARCHAR, state_province_county VARCHAR)
SELECT home_team FROM table_name_50 WHERE away_team = "scarborough"
What is the home team with scarborough as the away team?
CREATE TABLE table_name_50 ( home_team VARCHAR, away_team VARCHAR )
SELECT locale FROM table_1543845_63 WHERE stolen_ends = 12 AND shot_pct = "77%"
What was the location when the stolen ends is 12 and shot pct is 77%?
CREATE TABLE table_1543845_63 (locale VARCHAR, stolen_ends VARCHAR, shot_pct VARCHAR)
SELECT state_province_county FROM addresses WHERE NOT address_id IN (SELECT employee_address_id FROM Employees)
Find the states which do not have any employee in their record.
CREATE TABLE Employees (state_province_county VARCHAR, address_id VARCHAR, employee_address_id VARCHAR); CREATE TABLE addresses (state_province_county VARCHAR, address_id VARCHAR, employee_address_id VARCHAR)
SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id
What upper level electives are offered for CS majors ?
CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE cour...
SELECT stolen_ends FROM table_1543845_63 WHERE locale = Sweden
How many stolen ends were there when the locale was Sweden?
CREATE TABLE table_1543845_63 (stolen_ends VARCHAR, locale VARCHAR, Sweden VARCHAR)
SELECT customer_name, customer_phone, customer_email FROM Customers ORDER BY date_became_customer
List the names, phone numbers, and emails of all customers sorted by their dates of becoming customers.
CREATE TABLE Customers (customer_name VARCHAR, customer_phone VARCHAR, customer_email VARCHAR, date_became_customer VARCHAR)
SELECT "D\u00e9part de la main gauche" FROM table_76895 WHERE "2nd string" = 'do' AND "Accord du 1st string" = 'fa'
For the 2nd string of Do and an Accord du 1st string of FA what is the Depart de la main gauche?
CREATE TABLE table_76895 ( "Mode" text, "D\u00e9part de la main gauche" text, "Accord du 1st string" text, "2nd string" text, "3rd string" text )
SELECT school_club_team FROM table_15463188_17 WHERE season = "2012" AND acquisition_via = "Trade"
What was the school/club team whose season was in 2012 and were acquired via trade?
CREATE TABLE table_15463188_17 (school_club_team VARCHAR, season VARCHAR, acquisition_via VARCHAR)
SELECT customer_name FROM Customers ORDER BY date_became_customer LIMIT 5
Find the name of the first 5 customers.
CREATE TABLE Customers (customer_name VARCHAR, date_became_customer VARCHAR)
SELECT T1.dept_name, COUNT(DISTINCT T2.ID) FROM department AS T1 JOIN student AS T2 ON T1.dept_name = T2.dept_name JOIN instructor AS T3 ON T1.dept_name = T3.dept_name ORDER BY COUNT(DISTINCT T2.ID) DESC
Find the total number of students for each department with a bar chart, and could you list y axis in descending order?
CREATE TABLE classroom ( building varchar(15), room_number varchar(7), capacity numeric(4,0) ) CREATE TABLE advisor ( s_ID varchar(5), i_ID varchar(5) ) CREATE TABLE instructor ( ID varchar(5), name varchar(20), dept_name varchar(20), salary numeric(8,2) ) CREATE TABLE prereq ( ...
SELECT school_club_team FROM table_15463188_17 WHERE name = "Mark Sanford"
Which school/club team has a player named Mark Sanford?
CREATE TABLE table_15463188_17 (school_club_team VARCHAR, name VARCHAR)
SELECT payment_method FROM Customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1
Find the payment method that is used most frequently.
CREATE TABLE Customers (payment_method VARCHAR)
SELECT (SELECT "projected increase\n2009-2025" FROM table_204_113 WHERE "area" = 'toronto') > (SELECT "projected increase\n2009-2025" FROM table_204_113 WHERE "area" = 'hamilton')
does toronto 's population grow more or less than hamilton 's ?
CREATE TABLE table_204_113 ( id number, "rank" number, "area" text, "state/\nprovince" text, "csa/cma\n2009 population" number, "projected\n2025 population" number, "projected increase\n2009-2025" number )
SELECT COUNT(number) FROM table_15463188_17 WHERE school_club_team = "Manuel Luis Quezon"
How many school/club teams have a player named Manuel Luis Quezon?
CREATE TABLE table_15463188_17 (number VARCHAR, school_club_team VARCHAR)
SELECT route_name FROM Delivery_Routes ORDER BY route_name
List the names of all routes in alphabetic order.
CREATE TABLE Delivery_Routes (route_name VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "MARRIED" AND demographic.admityear < "2108"
provide the number of patients whose marital status is married and admission year is less than 2108?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
SELECT COUNT(name) FROM table_15463188_17 WHERE school_club_team = "Washington"
How many players are listed for the school/club team Washington?
CREATE TABLE table_15463188_17 (name VARCHAR, school_club_team VARCHAR)
SELECT t1.route_name FROM Delivery_Routes AS t1 JOIN Delivery_Route_Locations AS t2 ON t1.route_id = t2.route_id GROUP BY t1.route_id ORDER BY COUNT(*) DESC LIMIT 1
Find the name of route that has the highest number of deliveries.
CREATE TABLE Delivery_Routes (route_name VARCHAR, route_id VARCHAR); CREATE TABLE Delivery_Route_Locations (route_id VARCHAR)
SELECT AVG("Draw") FROM table_54761 WHERE "Points" = '59'
What is the draw number that has 59 points?
CREATE TABLE table_54761 ( "Draw" real, "Artist" text, "Song" text, "Points" real, "Place" text )
SELECT COUNT(position) FROM table_15463188_17 WHERE season = "2009"
How many players with a position are listed for the 2009 season?
CREATE TABLE table_15463188_17 (position VARCHAR, season VARCHAR)
SELECT t2.state_province_county, COUNT(*) FROM customer_addresses AS t1 JOIN addresses AS t2 ON t1.address_id = t2.address_id GROUP BY t2.state_province_county
List the state names and the number of customers living in each state.
CREATE TABLE customer_addresses (address_id VARCHAR); CREATE TABLE addresses (state_province_county VARCHAR, address_id VARCHAR)
SELECT MAX(demographic.age) FROM demographic WHERE demographic.language = "ENGL" AND demographic.diagnosis = "HYPERTENSION;RULE OUT CORONARY ARTERY DISEASE\CARDIAC CATH"
what is maximum age of patients whose language is engl and primary disease is hypertension;rule out coronary artery disease\cardiac cath?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ...
SELECT school_club_team FROM table_15463188_1 WHERE position = "Guard"
Name the school/club for guard
CREATE TABLE table_15463188_1 (school_club_team VARCHAR, position VARCHAR)
SELECT COUNT(*) FROM authors
How many authors are there?
CREATE TABLE authors (Id VARCHAR)
SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-30850') AND NOT patient.admissionweight IS NULL AND STRFTIME('%y-%m', patient.unitadmittime) = '2105-06' ORDER BY patient.unitadmittime DESC LIMIT ...
what was patient 025-30850's weight the last time in 06/2105?
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREAT...
SELECT position FROM table_15463188_1 WHERE name = "judy-ann ramirez"
Name the position for judy-ann ramirez
CREATE TABLE table_15463188_1 (position VARCHAR, name VARCHAR)