answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT round FROM table_name_58 WHERE player = "craig erickson" | What round was Craig Erickson drafted? | CREATE TABLE table_name_58 (
round VARCHAR,
player VARCHAR
) |
SELECT date FROM table_name_15 WHERE home_team = "essendon" | When did Essendon play at home? | CREATE TABLE table_name_15 (date VARCHAR, home_team VARCHAR) |
SELECT manufacturer FROM table_2267465_1 WHERE team = "Race Hill Farm team" | Can you tell me the manufacturer behind Race Hill Farm Team? | CREATE TABLE table_2267465_1 (manufacturer VARCHAR, team VARCHAR) |
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_... | what were the five drugs most frequently prescribed to the patients aged 50s during the same hospital visit after they had been diagnosed with 35-36 comp wks gestation until 2101? | CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
va... |
SELECT home_team AS score FROM table_name_12 WHERE away_team = "north melbourne" | What was Collingwood's score when they played against North Melbourne at home? | CREATE TABLE table_name_12 (home_team VARCHAR, away_team VARCHAR) |
SELECT COUNT(laps) FROM table_2267465_1 WHERE race_time = "3:34:26" | How many laps have a 3:34:26 race time? | CREATE TABLE table_2267465_1 (laps VARCHAR, race_time VARCHAR) |
SELECT COUNT(DISTINCT admissions.hadm_id) FROM admissions WHERE admissions.subject_id = 26720 AND DATETIME(admissions.admittime) <= DATETIME(CURRENT_TIME(), '-2 year') | count the amount of hospital visits of patient 26720 until 2 years ago. | CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type t... |
SELECT home_team AS score FROM table_name_77 WHERE away_team = "melbourne" | What was the home team score at Melbourne's away match? | CREATE TABLE table_name_77 (home_team VARCHAR, away_team VARCHAR) |
SELECT average_speed__mph_ FROM table_2267465_1 WHERE year = "1964" | What's the average mph of 1964? | CREATE TABLE table_2267465_1 (average_speed__mph_ VARCHAR, year VARCHAR) |
SELECT party FROM table_1341884_20 WHERE incumbent = "Hale Boggs" | What party did Hale Boggs belong to? | CREATE TABLE table_1341884_20 (
party VARCHAR,
incumbent VARCHAR
) |
SELECT MIN(crowd) FROM table_name_60 WHERE home_team = "hawthorn" | How many people were in attendance at Hawthorn's home match? | CREATE TABLE table_name_60 (crowd INTEGER, home_team VARCHAR) |
SELECT manufacturer FROM table_2268216_1 WHERE team = "Ranier-Lundy" | Whose is the manufacturer for team Ranier-Lundy? | CREATE TABLE table_2268216_1 (manufacturer VARCHAR, team VARCHAR) |
SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | For those employees who did not have any job in the past, show me about the distribution of hire_date and the sum of department_id bin hire_date by time in a bar chart. | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLO... |
SELECT capital FROM table_name_1 WHERE voivodeship_separate_city = "białostockie" | what is the capital with the Voivodeship Separate city of białostockie? | CREATE TABLE table_name_1 (capital VARCHAR, voivodeship_separate_city VARCHAR) |
SELECT year FROM table_2268216_1 WHERE average_speed__mph_ = "92.68" | In what year was the average speed 92.68? | CREATE TABLE table_2268216_1 (year VARCHAR, average_speed__mph_ VARCHAR) |
SELECT t1.drugname FROM (SELECT medication.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 50 AND 59) AND STRFTIME('%y', medication.drugstarttime) <= '2100' GROUP BY medication.drugn... | what are the top three prescribed drugs for the patients of age 50s until 2100? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE cost (
costid number,
... |
SELECT population_in_1000__1931_ FROM table_name_14 WHERE car_plates__since_1937_ = "80-84" | between car plates of 80-84 what is the population in 1000 in year 1931? | CREATE TABLE table_name_14 (population_in_1000__1931_ VARCHAR, car_plates__since_1937_ VARCHAR) |
SELECT COUNT(year) FROM table_2268216_1 WHERE team = "Joe Gibbs Racing" AND manufacturer = "Pontiac" | How many years was Pontiac the manufacturer for Joe Gibbs Racing? | CREATE TABLE table_2268216_1 (year VARCHAR, team VARCHAR, manufacturer VARCHAR) |
SELECT SUM("Played") FROM table_15388 WHERE "First game" < '2005' | What is the number of games played in the season before 2005? | CREATE TABLE table_15388 (
"First game" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Percentage" text
) |
SELECT population_in_1000__1931_ FROM table_name_62 WHERE car_plates__since_1937_ = "35-39" | tell me the population in 1000(1931) that has car plates since 1937 of 35-39. | CREATE TABLE table_name_62 (population_in_1000__1931_ VARCHAR, car_plates__since_1937_ VARCHAR) |
SELECT date FROM table_2268216_1 WHERE race_time = "2:43:19" | What is the date for the race that had the time of 2:43:19? | CREATE TABLE table_2268216_1 (date VARCHAR, race_time VARCHAR) |
SELECT "LLWS" FROM table_80020 WHERE "City" = 'parsippany' | Which Little League World Series took place in Parsippany? | CREATE TABLE table_80020 (
"Year" real,
"Champion" text,
"City" text,
"LLWS" text,
"Record" text
) |
SELECT capital FROM table_name_7 WHERE area_in_1000km²__1930_ = "20,4" | tell me the name of the capital with an area of 20,4. | CREATE TABLE table_name_7 (capital VARCHAR, area_in_1000km²__1930_ VARCHAR) |
SELECT COUNT(average_speed__mph_) FROM table_2268216_1 WHERE year = "2003" | How many average speeds are listed in the year 2003? | CREATE TABLE table_2268216_1 (average_speed__mph_ VARCHAR, year VARCHAR) |
SELECT "Name" FROM table_4766 WHERE "Winning driver" = 'bobby unser' | What race did Bobby Unser win? | CREATE TABLE table_4766 (
"Name" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning driver" text,
"Winning team" text,
"Report" text
) |
SELECT date FROM table_name_41 WHERE opponent = "wales" | When did they play against Wales? | CREATE TABLE table_name_41 (date VARCHAR, opponent VARCHAR) |
SELECT team FROM table_2268216_1 WHERE race_time = "2:53:57" | What team had a race time of 2:53:57? | CREATE TABLE table_2268216_1 (team VARCHAR, race_time VARCHAR) |
SELECT prescriptions.drug_type, prescriptions.route FROM prescriptions WHERE prescriptions.formulary_drug_cd = "ONDA4I" | mention the drug type and route of the drug code onda4i. | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... |
SELECT result FROM table_name_14 WHERE date = "29/09/07" | What was the result on 29/09/07? | CREATE TABLE table_name_14 (result VARCHAR, date VARCHAR) |
SELECT sprint_classification FROM table_22713796_14 WHERE winner = "Alejandro Valverde" | Name the sprint classification being alejandro valverde | CREATE TABLE table_22713796_14 (sprint_classification VARCHAR, winner VARCHAR) |
SELECT microlab.culturetakentime FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-23605')) AND microlab.culturesite = 'sputum, expectorated' AN... | when was patient 031-23605's last microbiological sputum, expectorated test performed until 08/2104? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (
medicationid n... |
SELECT competition FROM table_name_52 WHERE date = "25/08/07" | What was the competition on 25/08/07? | CREATE TABLE table_name_52 (competition VARCHAR, date VARCHAR) |
SELECT stage FROM table_22713796_14 WHERE mountains_classification = "no award" | Name the stage for no award | CREATE TABLE table_22713796_14 (stage VARCHAR, mountains_classification VARCHAR) |
SELECT date FROM table_name_3 WHERE high_rebounds = "two-way tie (8)" | On what date was a two-way tie (8) the high rebound? | CREATE TABLE table_name_3 (
date VARCHAR,
high_rebounds VARCHAR
) |
SELECT AVG(pos) FROM table_name_42 WHERE time = "20:39.171" | What position is associated with a Time of 20:39.171? | CREATE TABLE table_name_42 (pos INTEGER, time VARCHAR) |
SELECT COUNT(stage) FROM table_22713796_14 WHERE mountains_classification = "Lloyd Mondory" | Name the total number of stage for lloyd mondory | CREATE TABLE table_22713796_14 (stage VARCHAR, mountains_classification VARCHAR) |
SELECT "Date successor seated" FROM table_26638 WHERE "Successor" = 'Vacant' | Name the date successor seated for successor being vacant | CREATE TABLE table_26638 (
"District" text,
"Vacator" text,
"Reason for change" text,
"Successor" text,
"Date successor seated" text
) |
SELECT AVG(points) FROM table_name_76 WHERE best_time = "01:46.367" | How many points associated with a Best time of 01:46.367? | CREATE TABLE table_name_76 (points INTEGER, best_time VARCHAR) |
SELECT MAX(stage) FROM table_22713796_14 WHERE general_classification = "Alejandro Valverde" AND team_classification = "Astana" AND winner = "Greg Henderson" | Name the most stage for alejandro valverde and astana greg henderson | CREATE TABLE table_22713796_14 (stage INTEGER, winner VARCHAR, general_classification VARCHAR, team_classification VARCHAR) |
SELECT grid FROM table_name_17 WHERE car_no = "3" | What is the grid of car no. 3? | CREATE TABLE table_name_17 (
grid VARCHAR,
car_no VARCHAR
) |
SELECT COUNT(reg_gp) FROM table_name_44 WHERE rd__number = 7 AND player = "ilya krikunov" AND pick__number > 223 | What is the total reg gp of Ilya Krikunov, who has a round of 7 and a pick number larger than 223? | CREATE TABLE table_name_44 (reg_gp VARCHAR, pick__number VARCHAR, rd__number VARCHAR, player VARCHAR) |
SELECT tournament_winner FROM table_22733636_1 WHERE conference = "Border conference" | When the Border Conference was held, who was the tournament winner? | CREATE TABLE table_22733636_1 (tournament_winner VARCHAR, conference VARCHAR) |
SELECT OwnerUserId, DATE(CreationDate) AS DT, COUNT(p.Id) FROM Posts AS p WHERE PostTypeId = 2 AND OwnerUserId > 0 GROUP BY OwnerUserId, DATE(CreationDate) ORDER BY 3 DESC | top users by amount of answers in a day. | CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
Po... |
SELECT COUNT(pl_gp) FROM table_name_69 WHERE pick__number = 49 AND reg_gp < 0 | What is the total PI GP of the player with a pick number 49 and a reg gp less than 0? | CREATE TABLE table_name_69 (pl_gp VARCHAR, pick__number VARCHAR, reg_gp VARCHAR) |
SELECT tournament_winner FROM table_22733636_1 WHERE regular_season_winner = "Princeton" | When Princeton was the regular season winner, who was the tournament winner? | CREATE TABLE table_22733636_1 (tournament_winner VARCHAR, regular_season_winner VARCHAR) |
SELECT jockey FROM table_22265261_1 WHERE position = "7th" | Who was the jockey in 7th position? | CREATE TABLE table_22265261_1 (
jockey VARCHAR,
position VARCHAR
) |
SELECT SUM(pick__number) FROM table_name_16 WHERE pl_gp < 0 | What is the pick # of the player with a PI GP less than 0? | CREATE TABLE table_name_16 (pick__number INTEGER, pl_gp INTEGER) |
SELECT experience FROM table_22719663_3 WHERE name = "Mel Daniels" | How long has Mel Daniels been playing? | CREATE TABLE table_22719663_3 (experience VARCHAR, name VARCHAR) |
SELECT "Format" FROM table_14922 WHERE "Frequency" > '1050' AND "Station" = 'kvto' | Which format has a Frequency larger than 1050, and a Station of kvto? | CREATE TABLE table_14922 (
"Station" text,
"Frequency" real,
"Network Affiliation" text,
"Format" text,
"City of License" text,
"Status" text
) |
SELECT SUM(reg_gp) FROM table_name_83 WHERE rd__number < 2 | What is the reg gp of the player with a round number less than 2? | CREATE TABLE table_name_83 (reg_gp INTEGER, rd__number INTEGER) |
SELECT position FROM table_22719663_3 WHERE college = "San Jose State" | What position did the player from San Jose State play? | CREATE TABLE table_22719663_3 (position VARCHAR, college VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dod_year <= "2122.0" AND prescriptions.formulary_drug_cd = "PRED5SM" | what is the number of patients who died in or before 2122 and with drug code pred5sm? | 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 prescription... |
SELECT AVG(pl_gp) FROM table_name_19 WHERE rd__number = 5 AND pick__number > 151 | What is the average PI GP of the player from round 5 with a pick # larger than 151? | CREATE TABLE table_name_19 (pl_gp INTEGER, rd__number VARCHAR, pick__number VARCHAR) |
SELECT number FROM table_22719663_3 WHERE height = "6-6" | What was the number of the player that was 6-6? | CREATE TABLE table_22719663_3 (number VARCHAR, height VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "1837" AND lab.itemid = "50885" | what number of patients born before the year 1837 had lab test item id as 50885? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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
)
C... |
SELECT constellation FROM table_name_57 WHERE declination___j2000__ = "°32′39″" | What constellation has a Declination ( J2000 ) of °32′39″? | CREATE TABLE table_name_57 (constellation VARCHAR, declination___j2000__ VARCHAR) |
SELECT result FROM table_22736523_1 WHERE order__number = "10" AND song_choice = "Coba" | If the song choice is Coba and the order number is 10, what is the result? | CREATE TABLE table_22736523_1 (result VARCHAR, order__number VARCHAR, song_choice VARCHAR) |
SELECT MIN("To par") FROM table_47448 WHERE "Year(s) won" = '1962, 1967, 1972, 1980' AND "Total" > '149' | Which To par is the lowest one that has a Year(s) won of 1962, 1967, 1972, 1980, and a Total larger than 149? | CREATE TABLE table_47448 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" real
) |
SELECT MIN(pick__number) FROM table_name_15 WHERE league_from = "elitserien (sweden)" | What is the lowest pick from Elitserien (Sweden)? | CREATE TABLE table_name_15 (pick__number INTEGER, league_from VARCHAR) |
SELECT result FROM table_22736523_1 WHERE song_choice = "Coba" | What is the result if Coba is the song choice? | CREATE TABLE table_22736523_1 (result VARCHAR, song_choice VARCHAR) |
SELECT (SELECT COUNT(*) FROM table_204_680 WHERE "artist" = 'big bang') > (SELECT COUNT(*) FROM table_204_680 WHERE "artist" = '2ne1') | did big bang release more or less albums than 2ne1 ? | CREATE TABLE table_204_680 (
id number,
"released" text,
"title" text,
"artist" text,
"format" text,
"language" text
) |
SELECT SUM(crowd) FROM table_name_8 WHERE away_team = "richmond" | How many spectators were at the game where Richmond was the away team? | CREATE TABLE table_name_8 (crowd INTEGER, away_team VARCHAR) |
SELECT order__number FROM table_22736523_1 WHERE song_choice = "Coba" | If Coba is the song choice, what is the order number? | CREATE TABLE table_22736523_1 (order__number VARCHAR, song_choice VARCHAR) |
SELECT "Score" FROM table_36531 WHERE "Record" = '35-31' | The record of 35-31 has what score? | CREATE TABLE table_36531 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
) |
SELECT location FROM table_name_59 WHERE college_name = "kanyakumari government medical college" | What is the location of the kanyakumari government medical college? | CREATE TABLE table_name_59 (location VARCHAR, college_name VARCHAR) |
SELECT theme FROM table_22736523_1 WHERE song_choice = "Crazy In Love" | If Crazy In Love is the song choice, what is the theme? | CREATE TABLE table_22736523_1 (theme VARCHAR, song_choice VARCHAR) |
SELECT "cylinders" FROM table_204_108 WHERE "typ" = 'standard 8' | number of cylinders the standard 8 have | CREATE TABLE table_204_108 (
id number,
"typ" text,
"construction time" text,
"cylinders" text,
"capacity" text,
"power" text,
"top speed" text
) |
SELECT affiliation FROM table_name_89 WHERE estd = "1982" AND location = "coimbatore" | Where is the coimbatore affilation that was established in 1982? | CREATE TABLE table_name_89 (affiliation VARCHAR, estd VARCHAR, location VARCHAR) |
SELECT result FROM table_22736523_1 WHERE week__number = "Top 40" | For week number of the top 40, what was the results? | CREATE TABLE table_22736523_1 (result VARCHAR, week__number VARCHAR) |
SELECT COUNT(directed_by) FROM table_19517621_3 WHERE title = "The Lost Boy" | If the title if the Lost Boy, how many directors were there? | CREATE TABLE table_19517621_3 (
directed_by VARCHAR,
title VARCHAR
) |
SELECT location FROM table_name_16 WHERE district = "salem district" | What is the location of the salem district? | CREATE TABLE table_name_16 (location VARCHAR, district VARCHAR) |
SELECT result FROM table_22736523_1 WHERE week__number = "Top 9" | For week of top 9, what were the results? | CREATE TABLE table_22736523_1 (result VARCHAR, week__number VARCHAR) |
SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY HIRE_DATE | For all employees who have the letters D or S in their first name, show me about the change of manager_id over hire_date in a line chart, sort by the X-axis in ascending. | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... |
SELECT location FROM table_name_73 WHERE district = "tiruchirappalli district" | What is the location of the tiruchirappalli district? | CREATE TABLE table_name_73 (location VARCHAR, district VARCHAR) |
SELECT type FROM table_2273738_1 WHERE city = "Birmingham" | The city of Birmingham is what type of location? | CREATE TABLE table_2273738_1 (type VARCHAR, city VARCHAR) |
SELECT MAX("Wins") FROM table_12548 WHERE "Goals for" > '39' AND "Points" < '25' | What is the highest Wins, when Goals For is greater than 39, and when Points is less than 25? | CREATE TABLE table_12548 (
"Position" real,
"Played" real,
"Points" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Goal Difference" real
) |
SELECT district FROM table_name_93 WHERE college_name = "thanjavur medical college" | What is the district where the thanjavur medical college is located? | CREATE TABLE table_name_93 (district VARCHAR, college_name VARCHAR) |
SELECT type FROM table_2273738_1 WHERE local_authority = "Leeds city Council" | Leeds City Council is the local authority for what type of location? | CREATE TABLE table_2273738_1 (type VARCHAR, local_authority VARCHAR) |
SELECT COUNT(1) AS N FROM Posts WHERE PostTypeId = '##type##' | Number of posts by type. | CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
... |
SELECT location FROM table_name_42 WHERE college_name = "coimbatore medical college" | Where is the location of the coimbatore medical college? | CREATE TABLE table_name_42 (location VARCHAR, college_name VARCHAR) |
SELECT metropolitan_area FROM table_2273738_1 WHERE county = "Tyne and Wear" | Tyne and Wear County has what total membership for their metropolitan area? | CREATE TABLE table_2273738_1 (metropolitan_area VARCHAR, county VARCHAR) |
SELECT COUNT("nation") FROM table_204_595 WHERE "total" > (SELECT "total" FROM table_204_595 WHERE "nation" = 'canada') | how many nations received more medals than canada ? | CREATE TABLE table_204_595 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) |
SELECT time_retired FROM table_name_25 WHERE grid > 9 AND driver = "rolf stommelen" | What is the Time/Retired when the grid is larger than 9 and Rolf Stommelen is the driver? | CREATE TABLE table_name_25 (time_retired VARCHAR, grid VARCHAR, driver VARCHAR) |
SELECT MAX(metropolitan_area) FROM table_2273738_1 WHERE city = "Manchester" | What is the total membership for the metropolitan area in the city of Manchester? | CREATE TABLE table_2273738_1 (metropolitan_area INTEGER, city VARCHAR) |
SELECT lab.labname FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-33968')) AND STRFTIME('%y-%m', lab.labresulttime) <= '2104-12' ORDER BY lab.labresult... | what laboratory test was given to patient 010-33968 for the last time until 12/2104? | CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE diagnosis (
diagn... |
SELECT MAX(laps) FROM table_name_76 WHERE time_retired = "differential" | What is the highest number of laps when the Time/Retired is differential? | CREATE TABLE table_name_76 (laps INTEGER, time_retired VARCHAR) |
SELECT runner_up_a FROM table_22752982_5 WHERE winner = "K. P. Ramalingam" | Who was the runner-up (a) if K. P. Ramalingam won the election? | CREATE TABLE table_22752982_5 (runner_up_a VARCHAR, winner VARCHAR) |
SELECT AVG("Game") FROM table_48453 WHERE "Record" = '4-1' | What is the average game number when the record is 4-1? | CREATE TABLE table_48453 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"Location Attendance" text,
"Record" text
) |
SELECT driver FROM table_name_82 WHERE laps < 14 AND grid < 16 AND time_retired = "not classified" | Who is the driver when the laps are smaller than 14, the grid is smaller than 16, and the Time/retired is not classified? | CREATE TABLE table_name_82 (driver VARCHAR, time_retired VARCHAR, laps VARCHAR, grid VARCHAR) |
SELECT team_name FROM table_22737506_1 WHERE races = "1 (5)" | When 1 (5) is the races what is the team name? | CREATE TABLE table_22737506_1 (team_name VARCHAR, races VARCHAR) |
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', labevents.charttime)) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'pco2') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 15794 AND admissions.dis... | how many days has it been since patient 15794 last got a lab test for pco2 during their current hospital visit? | CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE d_icd_diagnoses (
... |
SELECT AVG(grid) FROM table_name_69 WHERE laps < 14 AND driver = "reine wisell" | What is the average grid when the laps are smaller than 14 and Reine Wisell is the driver? | CREATE TABLE table_name_69 (grid INTEGER, laps VARCHAR, driver VARCHAR) |
SELECT MAX(poles) FROM table_22737506_1 WHERE pos = "19th" | When 19th is the position what is the highest amount of poles? | CREATE TABLE table_22737506_1 (poles INTEGER, pos VARCHAR) |
SELECT COUNT("urban area") FROM table_203_74 WHERE "population\n(2001 census)" > 90000 | how many urban areas have a population above 90,000 ? | CREATE TABLE table_203_74 (
id number,
"rank" number,
"urban area" text,
"population\n(2001 census)" number,
"area (km2)" number,
"density (people/km2)" number,
"major subdivisions" text,
"metropolitan area" text
) |
SELECT entrant FROM table_name_72 WHERE engine = "renault rs8 3.0 v10" AND driver = "damon hill" | Who is the entrant with a driver Damon Hill and a Renault RS8 3.0 V10 engine? | CREATE TABLE table_name_72 (entrant VARCHAR, engine VARCHAR, driver VARCHAR) |
SELECT pos FROM table_22737506_1 WHERE points = 86 | When 86 is the amount of points what is the position? | CREATE TABLE table_22737506_1 (pos VARCHAR, points VARCHAR) |
SELECT COUNT("Losses") FROM table_40767 WHERE "Percentage" = '54.83' AND "Points" > '8' | What is the total number of Losses when the percentage is 54.83, with more than 8 points? | CREATE TABLE table_40767 (
"Club" text,
"Wins" real,
"Losses" real,
"Points For" real,
"Points Against" real,
"Percentage" real,
"Points" real
) |
SELECT constructor FROM table_name_2 WHERE rounds = "all" AND engine = "peugeot a12 ev5 3.0 v10" | Who is the constructor of the car with a Peugeot A12 EV5 3.0 V10 engine that competed in all rounds? | CREATE TABLE table_name_2 (constructor VARCHAR, rounds VARCHAR, engine VARCHAR) |
SELECT MAX(margin) FROM table_22754310_1 WHERE party = "NCO" AND winner = "P. Ramachandran" | Name the most margin for nco party and p. ramachandran won | CREATE TABLE table_22754310_1 (margin INTEGER, party VARCHAR, winner VARCHAR) |
SELECT "Score" FROM table_65642 WHERE "Away team" = 'arsenal' | What was the score when Arsenal was the away team? | CREATE TABLE table_65642 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.