answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT name FROM driver ORDER BY age DESC | Show the name of drivers in descending order of age. | CREATE TABLE driver (name VARCHAR, age VARCHAR) |
SELECT venue FROM table_name_26 WHERE home_team = "melbourne tigers" | What is the venue where the melbourne tigers play their home games? | CREATE TABLE table_name_26 (
venue VARCHAR,
home_team VARCHAR
) |
SELECT launch_date FROM table_18161217_2 WHERE cospar_id = "2008-033A" | What was the launch date the satellite with cospar ID is 2008-033A? | CREATE TABLE table_18161217_2 (launch_date VARCHAR, cospar_id VARCHAR) |
SELECT DISTINCT home_city FROM driver | Show all different home cities. | CREATE TABLE driver (home_city VARCHAR) |
SELECT front_side_bus FROM table_name_54 WHERE model_number = "c3 850" | What is the Front Side Bus for Model Number c3 850? | CREATE TABLE table_name_54 (
front_side_bus VARCHAR,
model_number VARCHAR
) |
SELECT cospar_id FROM table_18161217_2 WHERE satellite = "Kosmos 2379" | What it the international designation for the kosmos 2379 satellite? | CREATE TABLE table_18161217_2 (cospar_id VARCHAR, satellite VARCHAR) |
SELECT home_city FROM driver GROUP BY home_city ORDER BY COUNT(*) DESC LIMIT 1 | Show the home city with the most number of drivers. | CREATE TABLE driver (home_city VARCHAR) |
SELECT MIN(score) FROM table_name_35 WHERE country = "united states" AND player = "craig stadler" | What was Craig Stadler's lowest score for United states? | CREATE TABLE table_name_35 (
score INTEGER,
country VARCHAR,
player VARCHAR
) |
SELECT estimated_end_date[_clarification_needed_] FROM table_18161217_2 WHERE cospar_id = "2001-037A" | What is the estimated end date for the 2001-037a international designated satellite? | CREATE TABLE table_18161217_2 (estimated_end_date VARCHAR, _clarification_needed_ VARCHAR, cospar_id VARCHAR) |
SELECT party FROM driver WHERE home_city = 'Hartford' AND age > 40 | Show the party with drivers from Hartford and drivers older than 40. | CREATE TABLE driver (party VARCHAR, home_city VARCHAR, age VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "DISC-TRAN CANCER/CHLDRN H" AND procedures.icd9_code = "8604" | count the number of patients whose discharge location is disc-tran cancer/chldrn h and procedure icd9 code is 8604? | 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 diagnoses (
... |
SELECT city FROM table_18159601_1 WHERE charter_date = "December 4, 2011" | in which city was charter date december 4, 2011 | CREATE TABLE table_18159601_1 (city VARCHAR, charter_date VARCHAR) |
SELECT home_city FROM driver WHERE age > 40 GROUP BY home_city HAVING COUNT(*) >= 2 | Show home city where at least two drivers older than 40 are from. | CREATE TABLE driver (home_city VARCHAR, age INTEGER) |
SELECT MAX(T1.ram_mib), MIN(T1.ram_mib) FROM chip_model AS T1 JOIN phone AS T2 ON T1.model_name = T2.chip_model WHERE T2.company_name = "Nokia Corporation" | What is maximum and minimum RAM size of phone produced by company named 'Nokia Corporation'? | CREATE TABLE screen_mode (
graphics_mode number,
char_cells text,
pixels text,
hardware_colours number,
used_kb number,
map text,
type text
)
CREATE TABLE chip_model (
model_name text,
launch_year number,
ram_mib number,
rom_mib number,
slots text,
wifi text,
blu... |
SELECT COUNT(greek_designation) FROM table_18159601_1 WHERE city = "Tampa" | how mnay greek designation in tampa | CREATE TABLE table_18159601_1 (greek_designation VARCHAR, city VARCHAR) |
SELECT home_city FROM driver EXCEPT SELECT home_city FROM driver WHERE age > 40 | Show all home cities except for those having a driver older than 40. | CREATE TABLE driver (home_city VARCHAR, age INTEGER) |
SELECT primary_conference FROM table_16078390_2 WHERE institution = "Gonzaga University" | What conference does Gonzaga University play in? | CREATE TABLE table_16078390_2 (
primary_conference VARCHAR,
institution VARCHAR
) |
SELECT status FROM table_18159601_1 WHERE city = "Vestal" | what is the status in vestal | CREATE TABLE table_18159601_1 (status VARCHAR, city VARCHAR) |
SELECT name FROM driver WHERE NOT driver_id IN (SELECT driver_id FROM school_bus) | Show the names of the drivers without a school bus. | CREATE TABLE school_bus (name VARCHAR, driver_id VARCHAR); CREATE TABLE driver (name VARCHAR, driver_id VARCHAR) |
SELECT MIN("Game") FROM table_35183 WHERE "March" = '26' | March of 26 has what lowest game? | CREATE TABLE table_35183 (
"Game" real,
"March" real,
"Opponent" text,
"Score" text,
"Record" text
) |
SELECT collegiate_institution FROM table_18159601_1 WHERE city = "Queens" | what is the collegiate institution in queens | CREATE TABLE table_18159601_1 (collegiate_institution VARCHAR, city VARCHAR) |
SELECT TYPE FROM school GROUP BY TYPE HAVING COUNT(*) = 2 | Show the types of schools that have two schools. | CREATE TABLE school (TYPE VARCHAR) |
SELECT DISTINCT writes.paperid FROM author, writes WHERE author.authorname = 'daniel a. epstein' AND writes.authorid = author.authorid | Papers written by daniel a. epstein | CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE paper (
pape... |
SELECT original_title FROM table_18162883_1 WHERE film_title_used_in_nomination = "Run for Money" | What was the original title of Run for Money? | CREATE TABLE table_18162883_1 (original_title VARCHAR, film_title_used_in_nomination VARCHAR) |
SELECT T2.school, T3.name FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id JOIN driver AS T3 ON T1.driver_id = T3.driver_id | Show the school name and driver name for all school buses. | CREATE TABLE school (school VARCHAR, school_id VARCHAR); CREATE TABLE school_bus (school_id VARCHAR, driver_id VARCHAR); CREATE TABLE driver (name VARCHAR, driver_id VARCHAR) |
SELECT title FROM table_20704243_6 WHERE original_air_date = "August19,2012" | Which episode aired on august19,2012? | CREATE TABLE table_20704243_6 (
title VARCHAR,
original_air_date VARCHAR
) |
SELECT tuesday FROM table_18173916_6 WHERE thursday = "196 Buried" | What was the Tuesday episode if theThursday episode was 196 Buried? | CREATE TABLE table_18173916_6 (tuesday VARCHAR, thursday VARCHAR) |
SELECT MAX(years_working), MIN(years_working), AVG(years_working) FROM school_bus | What is the maximum, minimum and average years spent working on a school bus? | CREATE TABLE school_bus (years_working INTEGER) |
SELECT high_rebounds FROM table_27721131_2 WHERE location_attendance = "Verizon Center 9,263" | Who's in the high rebounds in the verizon center 9,263 location attendance? | CREATE TABLE table_27721131_2 (
high_rebounds VARCHAR,
location_attendance VARCHAR
) |
SELECT COUNT(friday) FROM table_18173916_6 WHERE wednesday = "210 Kirby's Epic Yarn" | How many episodes were shown on Friday if 210 Kirby's Epic Yarn was shown on Wednesday? | CREATE TABLE table_18173916_6 (friday VARCHAR, wednesday VARCHAR) |
SELECT school, TYPE FROM school WHERE NOT school_id IN (SELECT school_id FROM school_bus) | Show the school name and type for schools without a school bus. | CREATE TABLE school_bus (school VARCHAR, TYPE VARCHAR, school_id VARCHAR); CREATE TABLE school (school VARCHAR, TYPE VARCHAR, school_id VARCHAR) |
SELECT * FROM table_train_26 WHERE allergy_to_penicillin = 1 OR allergy_to_cephalosporin = 1 | known allergy or sensitivity to penicillin or cephalosporin | CREATE TABLE table_train_26 (
"id" int,
"gender" string,
"pregnancy_or_lactation" bool,
"allergy_to_penicillin" bool,
"active_infection" bool,
"allergy_to_cephalosporin" bool,
"receiving_anticoagulants" bool,
"age" float,
"NOUSE" float
) |
SELECT COUNT(friday) FROM table_18173916_6 WHERE wednesday = "190 Boardwalk Empire" | How many episodes were shown on Friday if 190 Boardwalk Empire was shown on Wednesday? | CREATE TABLE table_18173916_6 (friday VARCHAR, wednesday VARCHAR) |
SELECT T2.type, COUNT(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T2.type | Show the type of school and the number of buses for each type. | CREATE TABLE school (type VARCHAR, school_id VARCHAR); CREATE TABLE school_bus (school_id VARCHAR) |
SELECT "Winning score" FROM table_35291 WHERE "Date" = '16 may 1993' | What is the winning score of the tournament on 16 May 1993? | CREATE TABLE table_35291 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
) |
SELECT episodes FROM table_18173916_6 WHERE tuesday = "224 Assassin's Creed: Brotherhood Circus Training" | What were the dates when 224 Assassin's Creed: Brotherhood Circus Training was shown on Tuesday? | CREATE TABLE table_18173916_6 (episodes VARCHAR, tuesday VARCHAR) |
SELECT COUNT(*) FROM driver WHERE home_city = 'Hartford' OR age < 40 | How many drivers are from Hartford city or younger than 40? | CREATE TABLE driver (home_city VARCHAR, age VARCHAR) |
SELECT date FROM table_27756164_2 WHERE high_points = "Roy Hibbert (27)" | When did the Roy Hibbert (27) did the high points? | CREATE TABLE table_27756164_2 (
date VARCHAR,
high_points VARCHAR
) |
SELECT average_attendance_home FROM table_1816947_2 WHERE division___section = "Superettan" AND average_attendance_away = "1.889" | When the average away attendance is 1.889 in the Superettan, what's the average home attendance? | CREATE TABLE table_1816947_2 (average_attendance_home VARCHAR, division___section VARCHAR, average_attendance_away VARCHAR) |
SELECT name FROM driver WHERE home_city = 'Hartford' AND age < 40 | List names for drivers from Hartford city and younger than 40. | CREATE TABLE driver (name VARCHAR, home_city VARCHAR, age VARCHAR) |
SELECT T2.Headquarter, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Headquarter ORDER BY T2.Headquarter | For those records from the products and each product's manufacturer, return a bar chart about the distribution of headquarter and the sum of code , and group by attribute headquarter, and list in ascending by the bar please. | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) |
SELECT MAX(season) FROM table_1816947_2 WHERE average_attendance_league = "2.572" | In which season was the average league attendance 2.572? | CREATE TABLE table_1816947_2 (season INTEGER, average_attendance_league VARCHAR) |
SELECT t1.name FROM driver AS t1 JOIN school_bus AS t2 ON t1.driver_id = t2.driver_id ORDER BY years_working DESC LIMIT 1 | find the name of driver who is driving the school bus with the longest working history. | CREATE TABLE school_bus (driver_id VARCHAR); CREATE TABLE driver (name VARCHAR, driver_id VARCHAR) |
SELECT "club" FROM table_204_135 WHERE "losses" > 21 | which is the only team that had more than 21 losses ? | CREATE TABLE table_204_135 (
id number,
"position" number,
"club" text,
"played" number,
"points" number,
"wins" number,
"draws" number,
"losses" number,
"goals for" number,
"goals against" number,
"goal difference" number
) |
SELECT division___section FROM table_1816947_2 WHERE season = 2012 | In which division did they compete in 2012? | CREATE TABLE table_1816947_2 (division___section VARCHAR, season VARCHAR) |
SELECT COUNT(*) FROM flight WHERE velocity > 200 | How many flights have a velocity larger than 200? | CREATE TABLE flight (velocity INTEGER) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.marital_status = "DIVORCED" AND prescriptions.route = "IV" | how many divorced patients had the drug route iv? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... |
SELECT highest_attendance_away FROM table_1816947_2 WHERE average_attendance_home = "3.123" | When the home attendance is 3.123, what's the highest away attendance? | CREATE TABLE table_1816947_2 (highest_attendance_away VARCHAR, average_attendance_home VARCHAR) |
SELECT vehicle_flight_number, date, pilot FROM flight ORDER BY altitude | List the vehicle flight number, date and pilot of all the flights, ordered by altitude. | CREATE TABLE flight (vehicle_flight_number VARCHAR, date VARCHAR, pilot VARCHAR, altitude VARCHAR) |
SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-6134') AND NOT patient.admissionweight IS NULL AND STRFTIME('%y-%m', patient.unitadmittime) <= '2103-07' ORDER BY patient.unitadmittime DESC LIMIT ... | how much is patient 016-6134's weight for the last time until 07/2103? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE diagnosis (
diagnosisid number... |
SELECT division___section FROM table_1816947_2 WHERE average_attendance_home = "2.459" | Which division has an average home attendance of 2.459? | CREATE TABLE table_1816947_2 (division___section VARCHAR, average_attendance_home VARCHAR) |
SELECT id, country, city, name FROM airport ORDER BY name | List the id, country, city and name of the airports ordered alphabetically by the name. | CREATE TABLE airport (id VARCHAR, country VARCHAR, city VARCHAR, name VARCHAR) |
SELECT "Player" FROM table_48972 WHERE "Total" = '158' | What player has a total of 158/ | CREATE TABLE table_48972 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" text,
"To par" real
) |
SELECT COUNT(speed_rank) FROM table_181892_4 WHERE car_number = 92 | How many years was he car number 92? | CREATE TABLE table_181892_4 (speed_rank VARCHAR, car_number VARCHAR) |
SELECT MAX(group_equity_shareholding) FROM operate_company | What is maximum group equity shareholding of the companies? | CREATE TABLE operate_company (group_equity_shareholding INTEGER) |
SELECT chartevents.charttime FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 28443)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial... | when was the first time since 06/16/2105 patient 28443 arterial bp [systolic] was measured/taken? | CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE prescriptions (
row_id number,
s... |
SELECT COUNT(year) FROM table_181892_4 WHERE chassis = "Lotus-Ford 38/7" | How many years was the chassis a lotus-ford 38/7? | CREATE TABLE table_181892_4 (year VARCHAR, chassis VARCHAR) |
SELECT AVG(velocity) FROM flight WHERE pilot = 'Thompson' | What is the velocity of the pilot named 'Thompson'? | CREATE TABLE flight (velocity INTEGER, pilot VARCHAR) |
SELECT district FROM table_2668367_21 WHERE incumbent = "Thomas Wilson" | Name the distrct for thomas wilson | CREATE TABLE table_2668367_21 (
district VARCHAR,
incumbent VARCHAR
) |
SELECT race_status FROM table_181892_4 WHERE chassis = "Lotus-Ford 38/1" | What was the race status(es) with the lotus-ford 38/1 chassis? | CREATE TABLE table_181892_4 (race_status VARCHAR, chassis VARCHAR) |
SELECT T1.name, T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id | What are the names and types of the companies that have ever operated a flight? | CREATE TABLE operate_company (name VARCHAR, type VARCHAR, id VARCHAR); CREATE TABLE flight (Id VARCHAR) |
SELECT "College/junior/club team" FROM table_17453 WHERE "NHL team" = 'Chicago Black Hawks' | what college has nhl team chicago black hawks? | CREATE TABLE table_17453 (
"Pick #" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) |
SELECT year FROM table_181892_4 WHERE race_status = "Piston" | What year(s) was the race status piston? | CREATE TABLE table_181892_4 (year VARCHAR, race_status VARCHAR) |
SELECT name FROM airport WHERE country <> 'Iceland' | What are the names of the airports which are not in the country 'Iceland'? | CREATE TABLE airport (name VARCHAR, country VARCHAR) |
SELECT SUM(population__2010_census_) FROM table_name_16 WHERE administrative_division = "japeri" AND area__km²_ < 82.9 | What was the sum of the population in 2010 for the division of japeri with an area of 82.9 squared km? | CREATE TABLE table_name_16 (
population__2010_census_ INTEGER,
administrative_division VARCHAR,
area__km²_ VARCHAR
) |
SELECT MAX(laps_led) FROM table_181892_4 WHERE chassis = "Lotus-Ford 34/3" | What is the largest laps led with the lotus-ford 34/3 chassis? | CREATE TABLE table_181892_4 (laps_led INTEGER, chassis VARCHAR) |
SELECT DISTINCT T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T2.velocity < 200 | What are the distinct types of the companies that have operated any flights with velocity less than 200? | CREATE TABLE flight (Id VARCHAR); CREATE TABLE operate_company (type VARCHAR, id VARCHAR) |
SELECT 2013 AS _press_freedom_index FROM table_name_20 WHERE country = "egypt" | What is the 2013 press freedom index of the country Egypt? | CREATE TABLE table_name_20 (
country VARCHAR
) |
SELECT MAX(population) FROM table_1818254_1 WHERE city = "Minneapolis" | What was the population of Minneapolis in 2012? | CREATE TABLE table_1818254_1 (population INTEGER, city VARCHAR) |
SELECT T1.id, T1.name FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id GROUP BY T1.id HAVING COUNT(*) > 1 | What are the ids and names of the companies that operated more than one flight? | CREATE TABLE flight (Id VARCHAR); CREATE TABLE operate_company (id VARCHAR, name VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "0" AND diagnoses.short_title = "Cl skul base fx-coma NOS" | how many patients survived and were diagnosed with cl skul base fx-coma nos? | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... |
SELECT burglary FROM table_1818254_1 WHERE violent_crime = "974.7" | How many burglaries occurred in the city where the violent crime rate was 974.7? | CREATE TABLE table_1818254_1 (burglary VARCHAR, violent_crime VARCHAR) |
SELECT T1.id, T1.name, T1.IATA FROM airport AS T1 JOIN flight AS T2 ON T1.id = T2.airport_id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1 | What is the id, name and IATA code of the airport that had most number of flights? | CREATE TABLE airport (id VARCHAR, name VARCHAR, IATA VARCHAR); CREATE TABLE flight (id VARCHAR, airport_id VARCHAR) |
SELECT MAX(demographic.age) FROM demographic WHERE demographic.discharge_location = "SHORT TERM HOSPITAL" AND demographic.days_stay = "15" | what is maximum age of patients whose discharge location is short term hospital and days of hospital stay is 15? | 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 diagnoses (
... |
SELECT violent_crime FROM table_1818254_1 WHERE robbery = "201.4" | What was the violent crime rate in the city where the robbery rate was 201.4? | CREATE TABLE table_1818254_1 (violent_crime VARCHAR, robbery VARCHAR) |
SELECT DISTINCT T2.pilot FROM airport AS T1 JOIN flight AS T2 ON T1.id = T2.airport_id WHERE T1.country = 'United States' OR T1.name = 'Billund Airport' | What are the different pilot names who had piloted a flight in the country 'United States' or in the airport named 'Billund Airport'? | CREATE TABLE airport (id VARCHAR, country VARCHAR, name VARCHAR); CREATE TABLE flight (pilot VARCHAR, airport_id VARCHAR) |
SELECT decile FROM table_name_67 WHERE authority = "state" AND area = "raumati south" | What Decile has State Authority and Raumati South Area? | CREATE TABLE table_name_67 (
decile VARCHAR,
authority VARCHAR,
area VARCHAR
) |
SELECT COUNT(property_crime) FROM table_1818254_1 WHERE burglary = "224.8" | How many cities were there in 2012 where the rate of burglary was 224.8? | CREATE TABLE table_1818254_1 (property_crime VARCHAR, burglary VARCHAR) |
SELECT TYPE, COUNT(*) FROM operate_company GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 | What is the most common company type, and how many are there? | CREATE TABLE operate_company (TYPE VARCHAR) |
SELECT SUM("Bronze") FROM table_57503 WHERE "Total" > '2' AND "Gold" > '2' | How many bronze medals were won when the total was larger than 2 and the more than 2 gold medals were won? | CREATE TABLE table_57503 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) |
SELECT value FROM table_1818471_1 WHERE mitchell = 676 | What is every value when Mitchell is 676? | CREATE TABLE table_1818471_1 (value VARCHAR, mitchell VARCHAR) |
SELECT COUNT(*) FROM airport WHERE NOT id IN (SELECT airport_id FROM flight WHERE pilot = 'Thompson') | How many airports haven't the pilot 'Thompson' driven an aircraft? | CREATE TABLE airport (id VARCHAR, airport_id VARCHAR, pilot VARCHAR); CREATE TABLE flight (id VARCHAR, airport_id VARCHAR, pilot VARCHAR) |
SELECT place FROM table_name_99 WHERE player = "keith clearwater" | What place did Keith Clearwater get? | CREATE TABLE table_name_99 (
place VARCHAR,
player VARCHAR
) |
SELECT COUNT(afinsa) FROM table_1818471_1 WHERE value = "5P" | How many different numbers for Afinsa when value is 5p? | CREATE TABLE table_1818471_1 (afinsa VARCHAR, value VARCHAR) |
SELECT T2.pilot FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T1.principal_activities = 'Cargo' INTERSECT SELECT T2.pilot FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T1.principal_activities = 'Catering services' | List the name of the pilots who have flied for both a company that mainly provide 'Cargo' services and a company that runs 'Catering services' activities. | CREATE TABLE operate_company (id VARCHAR, principal_activities VARCHAR); CREATE TABLE flight (Id VARCHAR) |
SELECT "Class" FROM table_39459 WHERE "Machine" = 'nsr250' AND "Points" > '97' | What class has nsr250 as the machine, with points greater than 97? | CREATE TABLE table_39459 (
"Year" real,
"Class" text,
"Team" text,
"Machine" text,
"Points" real,
"Rank" text,
"Wins" real
) |
SELECT scott FROM table_1818471_1 WHERE date = "(15.12)" | What is every entry for Scott when the date is (15.12)? | CREATE TABLE table_1818471_1 (scott VARCHAR, date VARCHAR) |
SELECT name FROM airport WHERE name LIKE '%international%' | Which of the airport names contains the word 'international'? | CREATE TABLE airport (name VARCHAR) |
SELECT "Tournament" FROM table_68600 WHERE "Opponent" = 'jung jae-sung lee yong-dae' | What tournament has an opponent jung jae-sung lee yong-dae? | CREATE TABLE table_68600 (
"Outcome" text,
"Year" real,
"Tournament" text,
"Partner" text,
"Opponent" text,
"Score" text
) |
SELECT species FROM table_1818471_1 WHERE afinsa = 639 | What is every species when Afinsa is 639? | CREATE TABLE table_1818471_1 (species VARCHAR, afinsa VARCHAR) |
SELECT T3.id, COUNT(*) FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id JOIN airport AS T3 ON T2.airport_id = T3.id GROUP BY T3.id | How many companies operates airlines in each airport? | CREATE TABLE airport (id VARCHAR); CREATE TABLE flight (Id VARCHAR); CREATE TABLE operate_company (id VARCHAR) |
SELECT "Resolution" FROM table_35508 WHERE "Network" = 'carismatv' | What is the resolution of the network Carismatv? | CREATE TABLE table_35508 (
"Dish" text,
"Callsign" text,
"Network" text,
"Resolution" text,
"City of License" text,
"Official Website" text
) |
SELECT COUNT(order) FROM table_1818471_1 WHERE species = "Pavo cristatus" | How many orders when the species is Pavo Cristatus? | CREATE TABLE table_1818471_1 (order VARCHAR, species VARCHAR) |
SELECT COUNT(*), country FROM airport GROUP BY country | how many airports are there in each country? | CREATE TABLE airport (country VARCHAR) |
SELECT patient.admissionheight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '028-70851') AND NOT patient.admissionheight IS NULL ORDER BY patient.unitadmittime DESC LIMIT 1 | what was the last height of patient 028-70851. | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age te... |
SELECT constellation FROM table_1820752_1 WHERE distance___ly__ = "55.7" | If the distance is 55.7, what is the name of the constellation? | CREATE TABLE table_1820752_1 (constellation VARCHAR, distance___ly__ VARCHAR) |
SELECT country FROM airport GROUP BY country HAVING COUNT(*) > 2 | which countries have more than 2 airports? | CREATE TABLE airport (country VARCHAR) |
SELECT COUNT("Official Name") FROM table_1594 WHERE "Area km 2" = '508.30' | What is the name of the parish where the area is 508.30? | CREATE TABLE table_1594 (
"Official Name" text,
"Status" text,
"Area km 2" text,
"Population" real,
"Census Ranking" text
) |
SELECT COUNT(distance___ly__) FROM table_1820752_1 WHERE spectral_type = "G1V" | If the spectral type is g1v, what is the total distance amount? | CREATE TABLE table_1820752_1 (distance___ly__ VARCHAR, spectral_type VARCHAR) |
SELECT pilot FROM flight GROUP BY pilot ORDER BY COUNT(*) DESC LIMIT 1 | which pilot is in charge of the most number of flights? | CREATE TABLE flight (pilot VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.