context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_name_71 (
frequency VARCHAR,
facility_id VARCHAR
) | Which Frequency has a Facility ID of 13598? | SELECT frequency FROM table_name_71 WHERE facility_id = 13598 | sql_create_context |
CREATE TABLE table_7876 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"Nationality" text,
"College" text
) | WHAT WAS THE PICK NUMBER FOR BRANDON RUSH? | SELECT COUNT("Pick") FROM table_7876 WHERE "Player" = 'brandon rush' | wikisql |
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varch... | COMP 239 is a have-to for what classes ? | SELECT DISTINCT COURSE_1.department, COURSE_1.name, COURSE_1.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND COURSE_0.department = 'COMP' AND COURSE_0.number = 239 AND COURSE_1.course_id = course_prerequisite.course_id | advising |
CREATE TABLE table_24463470_1 (
setting VARCHAR,
unlocked_by VARCHAR
) | How many instances is the unlocked n/a? | SELECT COUNT(setting) FROM table_24463470_1 WHERE unlocked_by = "N/A" | sql_create_context |
CREATE TABLE table_name_47 (
time VARCHAR,
away_team VARCHAR
) | What was the time for the match with away team Convoy Sun Hei Team A? | SELECT time FROM table_name_47 WHERE away_team = "convoy sun hei team a" | sql_create_context |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id int,
fligh... | i would like to book a flight from BALTIMORE to NEWARK early in the morning on 4 9 | 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 = 'NEWARK' AND date_day.day_number = 9 AND date_day.month_number = 4 AND da... | atis |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | 在10年2月2日到10年12月21日内病患02315348主要看的医生是哪一个? | SELECT qtb.OUT_DIAG_DOC_CD, qtb.OUT_DIAG_DOC_NM FROM qtb WHERE qtb.PERSON_ID = '02315348' AND qtb.IN_HOSP_DATE BETWEEN '2010-02-02' AND '2010-12-21' GROUP BY qtb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT gyb.OUT_DIAG_DOC_CD, gyb.OUT_DIAG_DOC_NM FROM gyb WHERE gyb.PERSON_ID = '02315348' AND gyb.IN_HOSP... | css |
CREATE TABLE table_58671 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Position in table" text,
"Replaced by" text,
"Date of appointment" text
) | When was outgoing manager Zolt n Varga appointed? | SELECT "Date of appointment" FROM table_58671 WHERE "Outgoing manager" = 'zoltán varga' | wikisql |
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,
... | count the number of patients whose marital status is married and gender is f? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "MARRIED" AND demographic.gender = "F" | mimicsql_data |
CREATE TABLE table_19884 (
"Series Ep." text,
"Episode" real,
"Netflix" text,
"Segment A" text,
"Segment B" text,
"Segment C" text,
"Segment D" text
) | What is the Netflix where Segment D is pressure gauges ? | SELECT "Netflix" FROM table_19884 WHERE "Segment D" = 'Pressure Gauges' | wikisql |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ tim... | 在为医疗就诊37659837066检测的检测员中姓哪些是姓沈的负责检测的,其指标名称及其结果定量与结果定量单位分别是什么? | SELECT jyjgzbb.JCZBMC, jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM jyjgzbb WHERE jyjgzbb.jybgb_JZLSH = '37659837066' AND jyjgzbb.JCRXM LIKE '沈%' | css |
CREATE TABLE table_name_25 (
result VARCHAR,
week VARCHAR,
game_site VARCHAR
) | Name the result for week less than 7 and game sites of los angeles memorial coliseum | SELECT result FROM table_name_25 WHERE week < 7 AND game_site = "los angeles memorial coliseum" | sql_create_context |
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
DEPT_EXTENSION varchar(4)
)
CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varchar(12),
EMP_INITIAL varchar(1),
EMP_J... | How many courses each teacher taught? Show me a bar chart, I want to rank bars in ascending order please. | SELECT EMP_FNAME, COUNT(EMP_FNAME) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM JOIN COURSE AS T3 ON T1.CRS_CODE = T3.CRS_CODE GROUP BY EMP_FNAME ORDER BY EMP_FNAME | nvbench |
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
... | what are the flights from BALTIMORE to DALLAS on sunday afternoon | 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 = 'DALLAS' AND date_day.day_number = 27 AND date_day.month_number = 8 AND d... | atis |
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 lab (
subject_id text,
hadm_id text,
... | provide the number of self pay insurance patients who had regional lymph node excision. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Self Pay" AND procedures.long_title = "Regional lymph node excision" | mimicsql_data |
CREATE TABLE table_63877 (
"Rank" real,
"Rider" text,
"Team" text,
"Speed" text,
"Time" text
) | What is the highest rank of rider colin martin? | SELECT MAX("Rank") FROM table_63877 WHERE "Rider" = 'colin martin' | wikisql |
CREATE TABLE table_name_68 (
british VARCHAR
) | What is the 17th c. pronunciation when the british is ? | SELECT 17 AS th_c FROM table_name_68 WHERE british = "əʊ" | sql_create_context |
CREATE TABLE table_41412 (
"Club" text,
"Position in 2013" text,
"First season" real,
"First season of current spell" real,
"Number of seasons in Superettan" real,
"Number of seasons in second tier" real
) | Which First season of current spell is the lowest one that has a First season larger than 2005, and a Number of seasons in Superettan smaller than 8, and a Club of syrianska fc? | SELECT MIN("First season of current spell") FROM table_41412 WHERE "First season" > '2005' AND "Number of seasons in Superettan" < '8' AND "Club" = 'syrianska fc' | wikisql |
CREATE TABLE table_203_447 (
id number,
"constituency" number,
"region" text,
"name" text,
"party" text,
"last elected" number
) | when was antonio horvath kiss last elected ? | SELECT "last elected" FROM table_203_447 WHERE "name" = 'antonio horvath kiss' | squall |
CREATE TABLE table_name_58 (
record VARCHAR,
opponent VARCHAR
) | What is the final record for the Philadelphia 76ers? | SELECT record FROM table_name_58 WHERE opponent = "philadelphia 76ers" | sql_create_context |
CREATE TABLE table_56801 (
"Parties and voter communities" text,
"% 2006" real,
"Seats 2006" real,
"% 2001" real,
"Seats 2001" real
) | What is the highest number of Seats 2006 held by the Christian Democratic Union of Germany Party/Voter Community, with a %2006 higher than 24.6? | SELECT MAX("Seats 2006") FROM table_56801 WHERE "Parties and voter communities" = 'christian democratic union of germany' AND "% 2006" > '24.6' | wikisql |
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_... | show me all flights from PHOENIX to MILWAUKEE on AA on wednesday | 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 = 'MILWAUKEE' AND date_day.day_number = 23 AND date_day.month_number = 4 AN... | atis |
CREATE TABLE table_name_17 (
date VARCHAR,
week VARCHAR,
attendance VARCHAR
) | Which Date has a Week smaller than 11, and a Attendance of 54,094? | SELECT date FROM table_name_17 WHERE week < 11 AND attendance = "54,094" | sql_create_context |
CREATE TABLE races (
raceid VARCHAR,
name VARCHAR
)
CREATE TABLE results (
driverid VARCHAR,
raceid VARCHAR
)
CREATE TABLE drivers (
forename VARCHAR,
driverid VARCHAR
) | Find the id and forenames of drivers who participated both the races with name Australian Grand Prix and the races with name Chinese Grand Prix? | SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = "Australian Grand Prix" INTERSECT SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = ... | sql_create_context |
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 text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | get the number of married patients who have procedure icd9 code 3972. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "MARRIED" AND procedures.icd9_code = "3972" | mimicsql_data |
CREATE TABLE table_43953 (
"Constellation" text,
"Largest component, fractional share" real,
"Other components, fractional shares" text,
"N, Laakso-Taagepera" real,
"N, Golosov" real
) | What is the sum of the values for N, Laakso-Taagepera, when Largest Component, Fractional Share is 0.35000000000000003, and when Constellation is E? | SELECT SUM("N, Laakso-Taagepera") FROM table_43953 WHERE "Largest component, fractional share" = '0.35000000000000003' AND "Constellation" = 'e' | wikisql |
CREATE TABLE Finances (
Finance_ID INTEGER,
Other_Details VARCHAR(255)
)
CREATE TABLE Parties_in_Events (
Party_ID INTEGER,
Event_ID INTEGER,
Role_Code CHAR(15)
)
CREATE TABLE Agreements (
Document_ID INTEGER,
Event_ID INTEGER
)
CREATE TABLE Parties (
Party_ID INTEGER,
Party_Detai... | List the names of products that are not in any event, and count them by a bar chart, I want to show total number from low to high order please. | SELECT Product_Name, COUNT(Product_Name) FROM Products WHERE NOT Product_ID IN (SELECT Product_ID FROM Products_in_Events) GROUP BY Product_Name ORDER BY COUNT(Product_Name) | nvbench |
CREATE TABLE table_name_75 (
location VARCHAR,
opponent VARCHAR
) | What is the location of the match against Martinis Knyzelis? | SELECT location FROM table_name_75 WHERE opponent = "martinis knyzelis" | sql_create_context |
CREATE TABLE table_25252080_3 (
january_15_16 VARCHAR,
november_3 VARCHAR
) | What number is shown for january 15-16 when november 3 is 133? | SELECT january_15_16 FROM table_25252080_3 WHERE november_3 = "133" | sql_create_context |
CREATE TABLE Course_Authors_and_Tutors (
author_id INTEGER,
author_tutor_ATB VARCHAR(3),
login_name VARCHAR(40),
password VARCHAR(40),
personal_name VARCHAR(80),
middle_name VARCHAR(80),
family_name VARCHAR(80),
gender_mf VARCHAR(1),
address_line_1 VARCHAR(80)
)
CREATE TABLE Student... | List the number of completion students in each day and bin date of completion by weekday with a bar chart. | SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment | nvbench |
CREATE TABLE table_name_47 (
rank VARCHAR,
player VARCHAR
) | What rank has jo angel (wa) as the player? | SELECT rank FROM table_name_47 WHERE player = "jo angel (wa)" | sql_create_context |
CREATE TABLE table_37189 (
"Ship" text,
"Hull No." text,
"Builder" text,
"Home Port" text,
"Commissioned\u2013 Decommissioned" text,
"NVR page" text
) | Name the commissioned-decommissioned for NVR page of aor-7 | SELECT "Commissioned\u2013 Decommissioned" FROM table_37189 WHERE "NVR page" = 'aor-7' | wikisql |
CREATE TABLE table_13566548_1 (
autonomous_community VARCHAR,
wind_power VARCHAR
) | What is the community with a wind power of 1042? | SELECT autonomous_community FROM table_13566548_1 WHERE wind_power = 1042 | sql_create_context |
CREATE TABLE table_51920 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Date" text
) | What home score has an Away team of fitzroy? | SELECT "Home team score" FROM table_51920 WHERE "Away team" = 'fitzroy' | wikisql |
CREATE TABLE table_name_95 (
date VARCHAR,
home VARCHAR
) | When were the boston bruins the home team? | SELECT date FROM table_name_95 WHERE home = "boston bruins" | sql_create_context |
CREATE TABLE table_203_501 (
id number,
"title" text,
"genre" text,
"sub\u00addivisions" text,
"libretto" text,
"premiere date" text,
"place, theatre" text
) | what are the number of titles that premiered in the month of september ? | SELECT COUNT(DISTINCT "title") FROM table_203_501 WHERE "premiere date" = 9 | squall |
CREATE TABLE table_36628 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
) | What was the loss when the record was 46-59? | SELECT "Loss" FROM table_36628 WHERE "Record" = '46-59' | wikisql |
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
Owne... | Questions per day of week. | SELECT TIME_TO_STR(CreationDate, '%W'), COUNT(1) FROM Posts WHERE PostTypeId = 1 GROUP BY TIME_TO_STR(CreationDate, '%W') | sede |
CREATE TABLE table_28005100_1 (
arrangement VARCHAR,
title VARCHAR
) | What is the arrangement for bets3ab 3alia nafsy? | SELECT arrangement FROM table_28005100_1 WHERE title = "Bets3ab 3alia Nafsy" | sql_create_context |
CREATE TABLE table_name_35 (
hometown VARCHAR,
college VARCHAR
) | What is the hometown of the player who attended Ohio State? | SELECT hometown FROM table_name_35 WHERE college = "ohio state" | sql_create_context |
CREATE TABLE table_78253 (
"Race Title" text,
"Circuit" text,
"City / State" text,
"Date" text,
"Winner" text,
"Team" text
) | Which driver won the Phillip Island Grand Prix Circuit? | SELECT "Winner" FROM table_78253 WHERE "Circuit" = 'phillip island grand prix circuit' | wikisql |
CREATE TABLE table_63571 (
"Song" text,
"Performer" text,
"Original artist" text,
"Length" text,
"Recorded" text
) | Which song lasts 4:08? | SELECT "Song" FROM table_63571 WHERE "Length" = '4:08' | wikisql |
CREATE TABLE table_name_68 (
against INTEGER,
draws VARCHAR,
losses VARCHAR,
wimmera_fl VARCHAR
) | Which Against has Losses smaller than 5, and a Wimmera FL of warrack eagles, and Draws smaller than 0? | SELECT AVG(against) FROM table_name_68 WHERE losses < 5 AND wimmera_fl = "warrack eagles" AND draws < 0 | sql_create_context |
CREATE TABLE table_name_8 (
catalog VARCHAR,
format VARCHAR,
date VARCHAR
) | What Catalog released on June 29, 1999 has a Digipak Album Format? | SELECT catalog FROM table_name_8 WHERE format = "digipak album" AND date = "june 29, 1999" | sql_create_context |
CREATE TABLE table_name_14 (
lyricist VARCHAR,
film VARCHAR
) | Who wrote the lyrics for Mukti? | SELECT lyricist FROM table_name_14 WHERE film = "mukti" | sql_create_context |
CREATE TABLE table_65805 (
"President" text,
"Date of birth" text,
"Date of inauguration" text,
"Age at inauguration" text,
"End of term" text,
"Length of retirement" text,
"Date of death" text,
"Lifespan" text
) | What was the date of death entry in the row that has a date of inauguration entry of date of inauguration? | SELECT "Date of death" FROM table_65805 WHERE "Date of inauguration" = 'date of inauguration' | wikisql |
CREATE TABLE table_name_37 (
attendance VARCHAR,
away_team VARCHAR
) | What is the attendance when oadby town is away? | SELECT attendance FROM table_name_37 WHERE away_team = "oadby town" | sql_create_context |
CREATE TABLE Apartments (
apt_id INTEGER,
building_id INTEGER,
apt_type_code CHAR(15),
apt_number CHAR(10),
bathroom_count INTEGER,
bedroom_count INTEGER,
room_count CHAR(5)
)
CREATE TABLE Apartment_Bookings (
apt_booking_id INTEGER,
apt_id INTEGER,
guest_id INTEGER,
booking... | How many bookings does each booking status have? List the booking status code and the number of corresponding bookings. Show a pie chart. | SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code | nvbench |
CREATE TABLE table_3474 (
"District" real,
"Senator" text,
"Party" text,
"Residence" text,
"First elected" text,
"Term Limited" real
) | What is the party affiliation for senator mark Wagoner? | SELECT "Party" FROM table_3474 WHERE "Senator" = 'Mark Wagoner' | wikisql |
CREATE TABLE table_56087 (
"Class" text,
"Wheels" text,
"Date" text,
"No. built" real,
"Loco Nos." text,
"Comments" text
) | What is the Loco Nos of the e3 class? | SELECT "Loco Nos." FROM table_56087 WHERE "Class" = 'e3' | wikisql |
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)... | Between EECS 519 and EECS 537 , which is easier ? | SELECT DISTINCT course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (course.number = 519 OR course.number = 537) AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 INNER JOIN course AS COURSEalias1 ON ... | advising |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
... | what was the last height of patient 17398 until 16 months ago. | SELECT chartevents.valuenum 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 = 17398)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit ht'... | mimic_iii |
CREATE TABLE table_54622 (
"Pitcher" text,
"Date" text,
"Team" text,
"Result" text,
"Site" text
) | Tell me the pitcher on september 6, 2006 | SELECT "Pitcher" FROM table_54622 WHERE "Date" = 'september 6, 2006' | wikisql |
CREATE TABLE table_name_67 (
pos INTEGER,
matches INTEGER
) | Matches larger than 5 is the sum of what position? | SELECT SUM(pos) FROM table_name_67 WHERE matches > 5 | sql_create_context |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | Return a bar chart about the distribution of All_Road and School_ID . | SELECT All_Road, School_ID FROM basketball_match | nvbench |
CREATE TABLE table_name_50 (
erp_w INTEGER,
frequency_mhz VARCHAR
) | Frequency MHz of 88.7 had what average erp w? | SELECT AVG(erp_w) FROM table_name_50 WHERE frequency_mhz = 88.7 | sql_create_context |
CREATE TABLE table_51259 (
"Name" text,
"Years" text,
"Gender" text,
"Local board" text,
"Suburb" text,
"Authority" text,
"Decile" text,
"Roll" real
) | What year was the name mount roskill grammar school? | SELECT "Years" FROM table_51259 WHERE "Name" = 'mount roskill grammar school' | wikisql |
CREATE TABLE fgwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | 一个叫戚清佳的患者,在医院3389620的某次出院诊断结果里医生姓窦的那次诊断是啥时候? | SELECT gwyjzb.OUT_DIAG_DIS_CD, gwyjzb.OUT_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.PERSON_NM = '戚清佳' AND gwyjzb.MED_SER_ORG_NO = '3389620' AND gwyjzb.OUT_DIAG_DOC_NM LIKE '窦%' UNION SELECT fgwyjzb.OUT_DIAG_DIS_CD, fgwyjzb.OUT_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '戚清佳' AND fgwyjzb.MED_SER_ORG_NO = '3389620' AN... | css |
CREATE TABLE table_1341453_45 (
district VARCHAR,
incumbent VARCHAR
) | What district is nick lampson from? | SELECT district FROM table_1341453_45 WHERE incumbent = "Nick Lampson" | sql_create_context |
CREATE TABLE table_20444 (
"Party" text,
"Marplan" text,
"Gallup" text,
"National Opinion Polls (NOP)" text,
"Opinion Research Centre (OPC)" text,
"Harris" text
) | On all other parties the National option polls are at 1.3% where as the opinion research pole is at what percentage? | SELECT "Opinion Research Centre (OPC)" FROM table_20444 WHERE "National Opinion Polls (NOP)" = '1.3%' | wikisql |
CREATE TABLE table_35211 (
"Pos." real,
"Car #" real,
"Driver" text,
"Make" text,
"Team" text
) | What is the lowest position for driver Kyle Busch? | SELECT MIN("Pos.") FROM table_35211 WHERE "Driver" = 'kyle busch' | wikisql |
CREATE TABLE apartment_facilities (
apt_id number,
facility_code text
)
CREATE TABLE apartment_bookings (
apt_booking_id number,
apt_id number,
guest_id number,
booking_status_code text,
booking_start_date time,
booking_end_date time
)
CREATE TABLE guests (
guest_id number,
gen... | Find the average room count of the apartments that have the 'Studio' type code. | SELECT AVG(room_count) FROM apartments WHERE apt_type_code = "Studio" | spider |
CREATE TABLE table_54859 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Kickoff Time" text,
"Attendance" text
) | What is the result of the game with 68,436 attending? | SELECT "Result" FROM table_54859 WHERE "Attendance" = '68,436' | wikisql |
CREATE TABLE table_name_17 (
place VARCHAR,
country VARCHAR,
score VARCHAR
) | Name the Place which has a Score of 67-71=138, united states? | SELECT place FROM table_name_17 WHERE country = "united states" AND score = 67 - 71 = 138 | sql_create_context |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate... | how many times did patient 31854 in 12/2105 receive br milk fs po? | SELECT COUNT(*) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31854)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'br milk fs p... | mimic_iii |
CREATE TABLE table_57439 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What did the team score while away in moorabbin oval? | SELECT "Away team score" FROM table_57439 WHERE "Venue" = 'moorabbin oval' | wikisql |
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE fare_basis (
fare_basis_code ... | what 's the earliest flight from BOSTON to PHILADELPHIA | 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, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILAD... | atis |
CREATE TABLE table_55383 (
"Sport" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | With more than 1 Gold and Silver and Total Sport, what is the Total? | SELECT AVG("Total") FROM table_55383 WHERE "Silver" > '1' AND "Sport" = 'total' AND "Gold" > '1' | wikisql |
CREATE TABLE table_66426 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
) | When was the score 3-6 4-6? | SELECT "Date" FROM table_66426 WHERE "Score" = '3-6 4-6' | wikisql |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE ReviewRejectionReasons (
Id ... | why can't ya'll just have a good api. | SELECT COUNT(Id), Tags, RIGHT(LEFT(CreationDate, 11), 4) AS year, LEFT(CreationDate, 3) AS month FROM Posts GROUP BY Tags, RIGHT(LEFT(CreationDate, 11), 4), LEFT(CreationDate, 3) HAVING COUNT(Id) > 5 ORDER BY COUNT(Id) DESC | sede |
CREATE TABLE table_34655 (
"Number of Decks" real,
"Non-Suited Match" text,
"Double Non-Suited Match" text,
"Suited Match" text,
"Suited + Non-Suited Match" text,
"Double Suited Match" text,
"House Edge" text
) | Name the Non-Suited Match that has greater than 6 Number of Decks. | SELECT "Non-Suited Match" FROM table_34655 WHERE "Number of Decks" > '6' | wikisql |
CREATE TABLE table_204_4 (
id number,
"date" text,
"race" text,
"competition" text,
"rider" text,
"country" text,
"location" text
) | what are the total number of wins for tom boonen overall ? | SELECT COUNT(*) FROM table_204_4 WHERE "rider" = 'tom boonen' | squall |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABL... | had patient 2700 been to er until 2104? | SELECT COUNT(*) > 0 FROM admissions WHERE admissions.subject_id = 2700 AND admissions.admission_location = 'emergency room admit' AND STRFTIME('%y', admissions.admittime) <= '2104' | mimic_iii |
CREATE TABLE table_19308 (
"Shirt No" real,
"Nationality" text,
"Player" text,
"Birth Date" text,
"Height" real,
"Position" text
) | Name the birth date for shirt number 7 | SELECT "Birth Date" FROM table_19308 WHERE "Shirt No" = '7' | wikisql |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,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 locations (
LOCATION_ID decimal(4,0),... | For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of hire_date and the average of salary bin hire_date by weekday, and sort by the Y-axis in desc please. | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY AVG(SALARY) DESC | nvbench |
CREATE TABLE table_name_36 (
week_5 VARCHAR,
week_2 VARCHAR
) | When Audra Lynn was featured in Week 2, who was the cyber girl for Week 5? | SELECT week_5 FROM table_name_36 WHERE week_2 = "audra lynn" | sql_create_context |
CREATE TABLE table_46291 (
"Rider" text,
"Manufacturer" text,
"Laps" real,
"Time" text,
"Grid" real
) | What is the lowest grid with time of +0.499,when laps are larger than 21? | SELECT MIN("Grid") FROM table_46291 WHERE "Time" = '+0.499' AND "Laps" > '21' | wikisql |
CREATE TABLE table_name_43 (
city VARCHAR,
team VARCHAR,
school VARCHAR
) | What city has trojans as the team, and taylor as the school? | SELECT city FROM table_name_43 WHERE team = "trojans" AND school = "taylor" | sql_create_context |
CREATE TABLE table_44410 (
"Region" text,
"Name" text,
"Reported birth date" text,
"Reported death date" text,
"Reported age" text
) | what is the reported age when the reported birth date is 22 december 1878? | SELECT "Reported age" FROM table_44410 WHERE "Reported birth date" = '22 december 1878' | wikisql |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD ... | 从03年8月17日开始直到14年5月16日,患者秦鹏赋的住院次数是多少? | SELECT COUNT(*) FROM t_kc21 WHERE t_kc21.PERSON_NM = '秦鹏赋' AND t_kc21.IN_HOSP_DATE BETWEEN '2003-08-17' AND '2014-05-16' AND t_kc21.CLINIC_TYPE = '住院' | css |
CREATE TABLE products (
product_id number,
product_details text
)
CREATE TABLE customer_contact_channels (
customer_id number,
channel_code text,
active_from_date time,
active_to_date time,
contact_number text
)
CREATE TABLE customers (
customer_id number,
payment_method text,
... | Find the 'date became customers' of the customers whose ID is between 10 and 20. | SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20 | spider |
CREATE TABLE table_26622 (
"Reference" text,
"Author" text,
"Section Size" text,
"Violins" real,
"Violas" real,
"Celli" real,
"Basses" real
) | What reference, written by Nelson Riddle, suggests 2 violas? | SELECT "Reference" FROM table_26622 WHERE "Violas" = '2' AND "Author" = 'Nelson Riddle' | wikisql |
CREATE TABLE table_name_18 (
points VARCHAR,
team_name VARCHAR,
losses VARCHAR,
games VARCHAR
) | What's the total number of points when the vancouver burrards have fewer than 9 losses and more than 24 games? | SELECT COUNT(points) FROM table_name_18 WHERE losses < 9 AND games > 24 AND team_name = "vancouver burrards" | sql_create_context |
CREATE TABLE table_32315 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Where did a home team score 9.9 (63)? | SELECT "Venue" FROM table_32315 WHERE "Home team score" = '9.9 (63)' | wikisql |
CREATE TABLE table_1006 (
"Player" text,
"Position" text,
"Games started" text,
"Hometown" text,
"Height" text,
"Weight" real,
"Class" text,
"Prior experience" text
) | How many entries are there for Class for the player Everett Sweeley? | SELECT COUNT("Class") FROM table_1006 WHERE "Player" = 'Everett Sweeley' | wikisql |
CREATE TABLE table_203_808 (
id number,
"rank" number,
"peak name" text,
"elevation" text,
"location" text,
"notes" text
) | what two peaks are taller than dumlong ? | SELECT "peak name" FROM table_203_808 WHERE "elevation" > (SELECT "elevation" FROM table_203_808 WHERE "peak name" = 'dumlong') | squall |
CREATE TABLE table_52670 (
"Series no." real,
"Season no." real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production Code" real
) | Who wrote the series number 49 with a season larger than 4? | SELECT "Written by" FROM table_52670 WHERE "Season no." > '4' AND "Series no." = '49' | wikisql |
CREATE TABLE table_27849 (
"Urban settlement" text,
"Cyrillic Name" text,
"City / municipality" text,
"District" text,
"Population (1991)" real,
"Population (2002)" real,
"Population (2011)" real
) | What is the 1991 population for the urban settlement named Ba ki Jarak? | SELECT "Population (1991)" FROM table_27849 WHERE "Urban settlement" = 'Bački Jarak' | wikisql |
CREATE TABLE table_134987_3 (
frequency VARCHAR,
format VARCHAR
) | What is the frequency of the Classic Country Krki-fm booster station? | SELECT frequency FROM table_134987_3 WHERE format = "Classic Country KRKI-FM booster" | sql_create_context |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | 67640277患者在03年2月6日开始到14年6月18日结束内花了多少医保钱? | SELECT SUM(PER_ACC_PAY) FROM t_kc24 WHERE PERSON_ID = '67640277' AND CLINIC_SLT_DATE BETWEEN '2003-02-06' AND '2014-06-18' | css |
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE swimme... | Give me the comparison about the amount of Nationality over the Nationality , and group by attribute Nationality, could you list by the y axis in ascending? | SELECT Nationality, COUNT(Nationality) FROM swimmer GROUP BY Nationality ORDER BY COUNT(Nationality) | nvbench |
CREATE TABLE table_name_32 (
venue VARCHAR,
away_team VARCHAR
) | What venue had an away team of south melbourne? | SELECT venue FROM table_name_32 WHERE away_team = "south melbourne" | sql_create_context |
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 demographic (... | count the number of patients whose primary disease is s/p fall and year of death is less than or equal to 2164? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "S/P FALL" AND demographic.dod_year <= "2164.0" | mimicsql_data |
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text... | Just how badly are W3Schools answers treated?. | SELECT Posts.Id AS "post_link", COUNT(Upvotes.Id) AS UpvoteCount, COUNT(Downvotes.Id) AS DownvoteCount FROM Posts LEFT JOIN Votes AS Upvotes ON Upvotes.PostId = Posts.Id LEFT JOIN Votes AS Downvotes ON Downvotes.PostId = Posts.Id WHERE Upvotes.VoteTypeId = 2 AND Downvotes.VoteTypeId = 3 AND Posts.PostTypeId = 2 AND Pos... | sede |
CREATE TABLE Organizations (
organization_id INTEGER,
parent_organization_id INTEGER,
organization_details VARCHAR(255)
)
CREATE TABLE Residents (
resident_id INTEGER,
property_id INTEGER,
date_moved_in DATETIME,
date_moved_out DATETIME,
other_details VARCHAR(255)
)
CREATE TABLE Proper... | Draw a bar chart of date moved in versus how many date moved in, and sort in asc by the y axis. | SELECT date_moved_in, COUNT(date_moved_in) FROM Customer_Events GROUP BY date_moved_in ORDER BY COUNT(date_moved_in) | nvbench |
CREATE TABLE table_name_70 (
novelty VARCHAR,
location VARCHAR,
name VARCHAR
) | What novelty has USA as the location, and coryloides as the name? | SELECT novelty FROM table_name_70 WHERE location = "usa" AND name = "coryloides" | sql_create_context |
CREATE TABLE table_28763 (
"Dist." real,
"Democratic Coalition" text,
"Alliance" text,
"Together We Can Do More" text,
"Independent Regional Force" text,
"Independents" text
) | Who is the together we can do more when democratic coalition is ren alinco ( ppd )? | SELECT "Together We Can Do More" FROM table_28763 WHERE "Democratic Coalition" = 'René Alinco ( PPD )' | wikisql |
CREATE TABLE table_7704 (
"Name/ designation" text,
"Year of intro" real,
"Country of origin" text,
"Primary cartridge" text,
"Type" text
) | What is the total number of Year of Intro(s), when Country of Origin is Soviet Union, when Type is Reusable, when Primary Cartridge is 40mm, and when Name/ Designation is RPG-29? | SELECT COUNT("Year of intro") FROM table_7704 WHERE "Country of origin" = 'soviet union' AND "Type" = 'reusable' AND "Primary cartridge" = '40mm' AND "Name/ designation" = 'rpg-29' | wikisql |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | 在2013年8月20日到2016年5月24日期间病患金新翰在医疗机构3186559做过的检查有多少次? | SELECT COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '金新翰' AND t_kc22.STA_DATE BETWEEN '2013-08-20' AND '2016-05-24' AND gwyjzb.MED_SER_ORG_NO = '3186559' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_... | css |
CREATE TABLE table_24039173_1 (
capacity INTEGER,
stadium VARCHAR
) | What is the minimum capacity for Sangre Grande Ground? | SELECT MIN(capacity) FROM table_24039173_1 WHERE stadium = "Sangre Grande Ground" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.