context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_6346 (
"Country" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | When the country is Cambodia and the total is smaller than 1 what's the lowest silver? | SELECT MIN("Silver") FROM table_6346 WHERE "Country" = 'cambodia' AND "Total" < '1' | wikisql |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
... | just show me the top three most common diagnosis since 1 year ago? | SELECT t1.diagnosisname FROM (SELECT diagnosis.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnosis WHERE DATETIME(diagnosis.diagnosistime) >= DATETIME(CURRENT_TIME(), '-1 year') GROUP BY diagnosis.diagnosisname) AS t1 WHERE t1.c1 <= 3 | eicu |
CREATE TABLE table_53487 (
"Draft" text,
"Round" real,
"Pick" real,
"Nationality" text,
"Position" text,
"School/Club Team" text
) | What is the average pick after Round 2? | SELECT AVG("Pick") FROM table_53487 WHERE "Round" > '2' | wikisql |
CREATE TABLE table_21091162_1 (
game INTEGER,
opponent VARCHAR
) | How many games have Air Force as the opponent? | SELECT MAX(game) FROM table_21091162_1 WHERE opponent = "Air Force" | sql_create_context |
CREATE TABLE table_14650373_1 (
pick__number VARCHAR,
college VARCHAR
) | What number picked were players from arizona state picked? | SELECT pick__number FROM table_14650373_1 WHERE college = "Arizona State" | sql_create_context |
CREATE TABLE table_name_97 (
goal_difference VARCHAR,
wins VARCHAR,
draws VARCHAR,
position VARCHAR
) | What is the goal difference for entries with more than 6 draws, a position lower than 12, and fewer than 9 wins? | SELECT goal_difference FROM table_name_97 WHERE draws > 6 AND position > 12 AND wins < 9 | sql_create_context |
CREATE TABLE table_9815 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | What is Country, when Score is '73-68=141'? | SELECT "Country" FROM table_9815 WHERE "Score" = '73-68=141' | wikisql |
CREATE TABLE table_name_73 (
school_year VARCHAR,
class_aAA VARCHAR,
dalhart VARCHAR,
class_aAAAA VARCHAR,
edinburg VARCHAR
) | Which school year was the Class AAA dalhart and the class AAAAA edinburg? | SELECT school_year FROM table_name_73 WHERE class_aAA = dalhart AND class_aAAAA = edinburg | sql_create_context |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | 患有阿尔茨海默病的人检测指标273122的参考值范围下限与上限能达到多少? | SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDSM = '阿尔茨海默病' AND jyjgzbb.JCZBDM = '273122' | css |
CREATE TABLE table_name_67 (
name VARCHAR,
position VARCHAR
) | for the position of rb what is the name? | SELECT name FROM table_name_67 WHERE position = "rb" | sql_create_context |
CREATE TABLE injury_accident (
game_id int,
id int,
Player text,
Injury text,
Number_of_matches text,
Source text
)
CREATE TABLE stadium (
id int,
name text,
Home_Games int,
Average_Attendance real,
Total_Attendance real,
Capacity_Percentage real
)
CREATE TABLE game (
... | I want to see trend the number of season over season by Away_team | SELECT Season, COUNT(Season) FROM game GROUP BY Away_team | nvbench |
CREATE TABLE table_42821 (
"Locale" text,
"Skip" text,
"Ends Won" real,
"Ends Lost" real,
"Blank Ends" real,
"Stolen Ends" real,
"Shot Pct." real
) | What is the number of ends lost when there are 15 blank ends, less than 14 stolen ends? | SELECT COUNT("Ends Lost") FROM table_42821 WHERE "Blank Ends" = '15' AND "Stolen Ends" < '14' | wikisql |
CREATE TABLE table_12226390_4 (
no_in_season INTEGER,
written_by VARCHAR
) | What episode was written by Bobby Bell and Bill Lee? | SELECT MAX(no_in_season) FROM table_12226390_4 WHERE written_by = "Bobby Bell and Bill Lee" | sql_create_context |
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE... | what are the flights from PHILADELPHIA to DALLAS on 10 1 1991 | 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 = 1 AND date_day.month_number = 10 AND da... | atis |
CREATE TABLE table_25235 (
"Rnd" real,
"Date" text,
"Race Name" text,
"Length" text,
"Track" text,
"Location" text,
"Pole Position" text,
"Winning Driver" text
) | Which locations did Gordon Johncock hold the pole position? | SELECT "Location" FROM table_25235 WHERE "Pole Position" = 'Gordon Johncock' | wikisql |
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,
... | what is admission time and diagnoses long title of subject name roxanna weaver? | SELECT demographic.admittime, diagnoses.long_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Roxanna Weaver" | mimicsql_data |
CREATE TABLE table_2345558_1 (
_number VARCHAR,
director VARCHAR
) | What's the number of the episode directed by Whitney Ransick? | SELECT _number FROM table_2345558_1 WHERE director = "Whitney Ransick" | sql_create_context |
CREATE TABLE table_22853654_9 (
surface VARCHAR,
against VARCHAR
) | Name the surface against monaco | SELECT surface FROM table_22853654_9 WHERE against = "Monaco" | sql_create_context |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | does patient 31325 have an organism found in his first bone marrow test in their first hospital visit? | SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31325 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND microbiologyevents.spec_type_desc = 'bone marrow' AND NOT microbiologyevents.org_... | mimic_iii |
CREATE TABLE table_2224692_1 (
btu_gal VARCHAR,
kwh_gal VARCHAR
) | What's the BTU/Gal of the fuel whose kWh/Gal is 24.04? | SELECT btu_gal FROM table_2224692_1 WHERE kwh_gal = "24.04" | sql_create_context |
CREATE TABLE table_name_12 (
points INTEGER,
name VARCHAR,
games VARCHAR
) | How many points did Antwain Barbour score in the year he played 39 games? | SELECT SUM(points) FROM table_name_12 WHERE name = "antwain barbour" AND games < 39 | sql_create_context |
CREATE TABLE table_1836 (
"P" real,
"Player" text,
"Position" text,
"SPL" real,
"League Cup" real,
"Scottish Cup" real,
"UEFA Champions League" real,
"Total" real
) | When koki mizuno is the player what is the lowest league cup? | SELECT MIN("League Cup") FROM table_1836 WHERE "Player" = 'Koki Mizuno' | wikisql |
CREATE TABLE table_48794 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | How many weeks were there games with 41,384 fans in attendance? | SELECT SUM("Week") FROM table_48794 WHERE "Attendance" = '41,384' | wikisql |
CREATE TABLE table_27874 (
"Settlement" text,
"Cyrillic Name Other Names" text,
"Type" text,
"Population (2011)" real,
"Largest ethnic group (2002)" text,
"Dominant religion (2002)" text
) | What is the type for the population in 2011 of 1004? | SELECT "Type" FROM table_27874 WHERE "Population (2011)" = '1004' | wikisql |
CREATE TABLE Apartment_Bookings (
booking_start_date VARCHAR,
booking_end_date VARCHAR
) | Show the start dates and end dates of all the apartment bookings. | SELECT booking_start_date, booking_end_date FROM Apartment_Bookings | sql_create_context |
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... | have buprenorphine-naloxone (8mg-2mg) ever been prescribed to patient 18457 until 2103? | SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 18457) AND prescriptions.drug = 'buprenorphine-naloxone (8mg-2mg)' AND STRFTIME('%y', prescriptions.startdate) <= '2103' | mimic_iii |
CREATE TABLE table_16527 (
"Year" text,
"Champion" text,
"Score" text,
"Runner-Up" text,
"Location" text,
"Semi-Finalist #1" text,
"Semi-Finalist #2" text
) | who is the semi-finalist #1 where runner-up is elon university | SELECT "Semi-Finalist #1" FROM table_16527 WHERE "Runner-Up" = 'Elon University' | wikisql |
CREATE TABLE table_79608 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | what is the least total when the nation is canada (can) and bronze is less than 0? | SELECT MIN("Total") FROM table_79608 WHERE "Nation" = 'canada (can)' AND "Bronze" < '0' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | what is the number of patients whose marital status is married and admission year is less than 2103? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "MARRIED" AND demographic.admityear < "2103" | mimicsql_data |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic ... | specify the name & marital status of patient id 3284 | SELECT demographic.name, demographic.marital_status FROM demographic WHERE demographic.subject_id = "3284" | mimicsql_data |
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
... | show me all round trip flights from NEW YORK to MIAMI nonstop | 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, fare, flight, flight_fare WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MIAMI' AND NOT fare.round_trip_cost IS NULL AND flight_fare.fare_id =... | atis |
CREATE TABLE table_name_74 (
visitor VARCHAR,
home VARCHAR
) | What is the visitor team of the game with Chicago as the home team? | SELECT visitor FROM table_name_74 WHERE home = "chicago" | sql_create_context |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | 对于医疗费总额不少于5529.18元患者12483440的就医记录,能列出出院诊断疾病编号和名称吗? | SELECT OUT_DIAG_DIS_CD, OUT_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_ID = '12483440' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc24 WHERE MED_AMOUT >= 5529.18) | css |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
... | for the first time in 11/2104, what specimen test did patient 031-9128 get? | SELECT microlab.culturesite FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-9128')) AND STRFTIME('%y-%m', microlab.culturetakentime) = '2104-1... | eicu |
CREATE TABLE table_27672 (
"Season" real,
"Series" text,
"Team Name" text,
"Races" real,
"Wins" real,
"Points" text,
"Final Placing" text
) | What team was Sigachev on when he had 38 points? | SELECT "Team Name" FROM table_27672 WHERE "Points" = '38' | wikisql |
CREATE TABLE people (
People_ID int,
Name text,
Height real,
Weight real,
Birth_Date text,
Birth_Place text
)
CREATE TABLE body_builder (
Body_Builder_ID int,
People_ID int,
Snatch real,
Clean_Jerk real,
Total real
) | Return a scatter chart about the correlation between People_ID and Clean_Jerk . | SELECT People_ID, Clean_Jerk FROM body_builder | nvbench |
CREATE TABLE table_3394 (
"Skip (Club)" text,
"W" real,
"L" real,
"PF" real,
"PA" real,
"Ends Won" real,
"Ends Lost" real,
"Blank Ends" real,
"Stolen Ends" real
) | How many l's are there for the skip with 3 for w? | SELECT MAX("L") FROM table_3394 WHERE "W" = '3' | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (... | give me the number of patients whose marital status is married and procedure icd9 code is 3611? | 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 = "3611" | mimicsql_data |
CREATE TABLE services (
service_type_code VARCHAR
) | List the type of the services in alphabetical order. | SELECT service_type_code FROM services ORDER BY service_type_code | sql_create_context |
CREATE TABLE table_63118 (
"Tournament" text,
"Wins" real,
"Top-5" real,
"Events" real,
"Cuts made" real
) | How many wins of average has cuts made less than 0? | SELECT AVG("Wins") FROM table_63118 WHERE "Cuts made" < '0' | wikisql |
CREATE TABLE table_name_39 (
team VARCHAR,
start VARCHAR,
year VARCHAR,
manufacturer VARCHAR
) | Which team in 1987 had a start of 28 and drove a chrysler? | SELECT team FROM table_name_39 WHERE year < 1987 AND manufacturer = "chrysler" AND start = "28" | sql_create_context |
CREATE TABLE table_2562572_33 (
cyrillic_name_other_names VARCHAR,
settlement VARCHAR
) | What is the other name for martono ? | SELECT cyrillic_name_other_names FROM table_2562572_33 WHERE settlement = "Martonoš" | sql_create_context |
CREATE TABLE table_66276 (
"Date Released" text,
"Polling institute" text,
"Social Democratic" text,
"Socialist" text,
"Green-Communist" text,
"People's Party" text,
"Left Bloc" text,
"Lead" text
) | What is the result for the Green-Communist party when the Left Bloc has 3.0%? | SELECT "Green-Communist" FROM table_66276 WHERE "Left Bloc" = '3.0%' | wikisql |
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,... | 在医疗就诊66461842965中给邹傲雪这位病人开具所以医疗项目的医师的编号是什么和姓名分都叫什么? | SELECT HOSP_DOC_CD, HOSP_DOC_NM FROM t_kc22 WHERE MED_CLINIC_ID = '66461842965' | css |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | how many patients whose ethnicity is hispanic/latino - puerto rican and diagnoses long title is closed fracture of base of skull with subarachnoid, subdural, and extradural hemorrhage, with loss of consciousness of unspecified duration? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND diagnoses.long_title = "Closed fracture of base of skull with subarachnoid, subdural, and extradural hemorrhage, with loss of ... | mimicsql_data |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number... | Get all your questions, ordered by viewcounts.. | SELECT Id AS "post_link", ViewCount FROM Posts WHERE OwnerUserId = @UID AND NOT ViewCount IS NULL ORDER BY ViewCount DESC | sede |
CREATE TABLE table_28136_15 (
rusyn VARCHAR,
bulgarian VARCHAR
) | How many words are there in rusyn for the bulgarian word (kupuva)? | SELECT COUNT(rusyn) FROM table_28136_15 WHERE bulgarian = "купува (kupuva)" | sql_create_context |
CREATE TABLE debate (
Date VARCHAR,
Venue VARCHAR
) | What are the date and venue of each debate? | SELECT Date, Venue FROM debate | sql_create_context |
CREATE TABLE table_48962 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | What team was the away team when the tie no is 40? | SELECT "Away team" FROM table_48962 WHERE "Tie no" = '40' | wikisql |
CREATE TABLE table_55513 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | what is the laps when the grid is less than 2? | SELECT "Laps" FROM table_55513 WHERE "Grid" < '2' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | what is the diagnosis short title and long title of diagnosis icd9 code 56721? | SELECT diagnoses.short_title, diagnoses.long_title FROM diagnoses WHERE diagnoses.icd9_code = "56721" | mimicsql_data |
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight re... | Give me the comparison about the amount of Sex over the Sex , and group by attribute Sex by a bar chart, and show in asc by the x axis. | SELECT Sex, COUNT(Sex) FROM people GROUP BY Sex ORDER BY Sex | nvbench |
CREATE TABLE table_45043 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" real
) | What was the score of the player from South Africa? | SELECT "Score" FROM table_45043 WHERE "Country" = 'south africa' | wikisql |
CREATE TABLE table_65545 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the gold for a bronze larger than 1, with a total smaller than 10, and a silver of 3? | SELECT "Gold" FROM table_65545 WHERE "Bronze" > '1' AND "Total" < '10' AND "Silver" = '3' | wikisql |
CREATE TABLE table_dev_8 (
"id" int,
"systolic_blood_pressure_sbp" int,
"heart_disease" bool,
"diastolic_blood_pressure_dbp" int,
"coronary_artery_disease_cad" bool,
"triglyceride_tg" float,
"hypertension" bool,
"NOUSE" float
) | resting blood pressure greater than or equal to 160 / 100 mm hg | SELECT * FROM table_dev_8 WHERE systolic_blood_pressure_sbp > 160 OR diastolic_blood_pressure_dbp > 100 | criteria2sql |
CREATE TABLE attribute_definitions (
attribute_id number,
attribute_name text,
attribute_data_type text
)
CREATE TABLE catalog_contents (
catalog_entry_id number,
catalog_level_number number,
parent_entry_id number,
previous_entry_id number,
next_entry_id number,
catalog_entry_name ... | What is the level name of the cheapest catalog (in USD)? | SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number = t2.catalog_level_number ORDER BY t1.price_in_dollars LIMIT 1 | spider |
CREATE TABLE table_50427 (
"Track" real,
"Song" text,
"Author" text,
"Worship Leader" text,
"Lead Supporting Vocal" text,
"Time" text
) | Who was the worship leader that had a lead supporting vocal Marcus Temu? | SELECT "Worship Leader" FROM table_50427 WHERE "Lead Supporting Vocal" = 'marcus temu' | wikisql |
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
... | what is your least expensive fare between ATLANTA and BOSTON | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city... | atis |
CREATE TABLE table_13719788_1 (
director VARCHAR,
original_title VARCHAR
) | Who is the director of the fimm Biola Tak Berdawai? | SELECT director FROM table_13719788_1 WHERE original_title = "Biola tak berdawai" | sql_create_context |
CREATE TABLE table_31018 (
"Team" text,
"Contest and round" text,
"Opponent" text,
"1st leg score*" text,
"2nd leg score**" text,
"Aggregate score" text
) | what is the aggregate score for the europa league play off round contest and round | SELECT "Aggregate score" FROM table_31018 WHERE "Contest and round" = 'Europa League Play Off Round' | wikisql |
CREATE TABLE table_41895 (
"Name" text,
"Level" real,
"Digits" real,
"Average size (square miles)" text,
"Number of HUs (approximate)" real,
"Example name" text,
"Example code (HUC)" real
) | How many HUC example codes have 1 level? | SELECT COUNT("Example code (HUC)") FROM table_41895 WHERE "Level" = '1' | 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,
... | 编号8744702的医疗机构外地来看病的人数是多少 | SELECT COUNT(gwyjzb.PERSON_ID) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '8744702' AND gwyjzb.REMOTE_SETTLE_FLG = '异地1' OR gwyjzb.REMOTE_SETTLE_FLG = '异地2' UNION SELECT COUNT(fgwyjzb.PERSON_ID) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '8744702' AND fgwyjzb.REMOTE_SETTLE_FLG = '异地1' OR fgwyjzb.REMOTE_SETTLE_FLG = '异地... | css |
CREATE TABLE qtb (
CLINIC_ID 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,
INSU_TYPE text,
IN... | 自二零一零年五月五日开始,截止到二零一一年一月四日,患者35830097去的是哪几家医院看病的 | SELECT COUNT(qtb.MED_SER_ORG_NO) FROM qtb WHERE qtb.PERSON_ID = '35830097' AND qtb.IN_HOSP_DATE BETWEEN '2010-05-05' AND '2011-01-04' UNION SELECT COUNT(gyb.MED_SER_ORG_NO) FROM gyb WHERE gyb.PERSON_ID = '35830097' AND gyb.IN_HOSP_DATE BETWEEN '2010-05-05' AND '2011-01-04' UNION SELECT COUNT(zyb.MED_SER_ORG_NO) FROM zy... | css |
CREATE TABLE table_26301 (
"Vehicle code" text,
"Bore (mm)" text,
"Stroke (mm)" text,
"Capacity (cm 3 )" real,
"Compression ratio" text,
"Torque (N m)" real,
"Power (HP)" real
) | what is the bore where the vehicle code is t214? | SELECT "Bore (mm)" FROM table_26301 WHERE "Vehicle code" = 'T214' | wikisql |
CREATE TABLE table_12340907_1 (
police_force VARCHAR,
population VARCHAR
) | Which police force serves a population of 17000? | SELECT police_force FROM table_12340907_1 WHERE population = 17000 | sql_create_context |
CREATE TABLE table_3388 (
"Episode #" text,
"Original Air Date (UK)" text,
"Episode Title" text,
"Director" text,
"Writer" text,
"Cast" text
) | For episode number 2-03, what are the names of the cast? | SELECT "Cast" FROM table_3388 WHERE "Episode #" = '2-03' | wikisql |
CREATE TABLE table_name_9 (
analog VARCHAR,
callsign VARCHAR
) | what is the analog type for wxmi? | SELECT analog FROM table_name_9 WHERE callsign = "wxmi" | sql_create_context |
CREATE TABLE table_2181798_1 (
year VARCHAR,
team_s_ VARCHAR
) | Name the year for donlavey racing bill davis racing | SELECT year FROM table_2181798_1 WHERE team_s_ = "Donlavey Racing Bill Davis Racing" | sql_create_context |
CREATE TABLE table_name_7 (
draw INTEGER,
played VARCHAR,
lost VARCHAR
) | What is the least ties when they played less than 14 games, and a lost less than 8 of them? | SELECT MIN(draw) FROM table_name_7 WHERE played < 14 AND lost < 8 | sql_create_context |
CREATE TABLE table_name_29 (
d_42 VARCHAR,
d_44 VARCHAR
) | Name the D 42 which has a D 44 of d 44 | SELECT d_42 FROM table_name_29 WHERE d_44 = "d 44" | sql_create_context |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number... | when was the last time that patient 006-158689 had maximum mchc value in 11/last year? | SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-158689')) AND lab.labname = 'mchc' AND DATETIME(lab.labresulttime, 'start of ye... | eicu |
CREATE TABLE table_name_16 (
year VARCHAR,
circuit VARCHAR,
winning_constructor VARCHAR
) | What year did Ferrari win the Kyalami circuit? | SELECT year FROM table_name_16 WHERE circuit = "kyalami" AND winning_constructor = "ferrari" | sql_create_context |
CREATE TABLE table_15261_1 (
part_number VARCHAR,
s_spec_number VARCHAR
) | What is the part number for s-spec number sk096? | SELECT part_number FROM table_15261_1 WHERE s_spec_number = "SK096" | sql_create_context |
CREATE TABLE zyjybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH number,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
... | 卫星纬这位患者的204895指标在零一年四月三十日至零六年一月三十一日期间的情况 | SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzb... | css |
CREATE TABLE accounts (
custid VARCHAR,
name VARCHAR
)
CREATE TABLE savings (
balance INTEGER,
custid VARCHAR
) | Find the total savings balance of all accounts except the account with name Brown . | SELECT SUM(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name <> 'Brown' | sql_create_context |
CREATE TABLE table_58127 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What home team had a score of 6.9 (45) | SELECT "Home team" FROM table_58127 WHERE "Home team score" = '6.9 (45)' | wikisql |
CREATE TABLE table_69411 (
"Installation" text,
"Cluj" real,
"Oradea" real,
"Baia Mare" real,
"Bistrita" real,
"Satu Mare" real,
"Zalau" real,
"Electrica North Transylvania" real
) | How many Baia Mare have an Electrica North Transylvania under 14.476, Bistrita of 643, and Zalau under 737? | SELECT COUNT("Baia Mare") FROM table_69411 WHERE "Electrica North Transylvania" < '14.476' AND "Bistrita" = '643' AND "Zalau" < '737' | wikisql |
CREATE TABLE table_name_3 (
callsign VARCHAR,
commenced_operations INTEGER
) | Who is the call sign that has a commenced operation before 1976? | SELECT callsign FROM table_name_3 WHERE commenced_operations < 1976 | sql_create_context |
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 (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_items (
row_id... | how many times had patient 17462 had an intake of ns w/40 kcl since 05/17/2104? | 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 = 17462)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'ns w/40 kcl'... | mimic_iii |
CREATE TABLE table_63514 (
"Tournament" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"Win %" text
) | What is the 2006 value of the 2011 grand slam tournaments? | SELECT "2006" FROM table_63514 WHERE "2011" = 'grand slam tournaments' | wikisql |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE cost (
row_id number,
subject_... | how much money does patient 11779 have to spend on the hospital stay in a year before? | SELECT SUM(cost.cost) FROM cost WHERE cost.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 11779) AND DATETIME(cost.chargetime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') | mimic_iii |
CREATE TABLE table_42570 (
"Date" text,
"Home captain" text,
"Away captain" text,
"Venue" text,
"Result" text
) | Who was the Home Captain and the Result for AUS by 4 wkts? | SELECT "Home captain" FROM table_42570 WHERE "Result" = 'aus by 4 wkts' | wikisql |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | 90761150的患者身高达到多少厘米了,体重达到多少公斤了 | SELECT mzjzjlb.SG, mzjzjlb.TZ FROM hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz... | css |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
... | until 2104, what were the top four most frequently ordered microbiology tests for patients during the same month after receiving antiplatelet agent - aspirin? | SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'antiplatelet agent - aspirin' AND STRFTIME('... | eicu |
CREATE TABLE table_name_56 (
object_type VARCHAR,
apparent_magnitude VARCHAR,
right_ascension___j2000__ VARCHAR
) | Which object has an Apparent magnitude larger than 9.6, and a Right ascension ( J2000 ) of 17h59m02.0s? | SELECT object_type FROM table_name_56 WHERE apparent_magnitude > 9.6 AND right_ascension___j2000__ = "17h59m02.0s" | sql_create_context |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREA... | does the first blood, venipuncture microbiology test of patient 031-4987 since 3 years ago have any organisms? | SELECT COUNT(*) > 0 FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-4987')) AND microlab.culturesite = 'blood, venipuncture' AND DATETIME(micr... | eicu |
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
)
... | How many of the Asian patients were admitted before the year 2111? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "ASIAN" AND demographic.admityear < "2111" | mimicsql_data |
CREATE TABLE table_name_29 (
laps VARCHAR,
time_retired VARCHAR,
grid VARCHAR
) | what is the laps when the time/retired is turbo and the grid is less than 14? | SELECT laps FROM table_name_29 WHERE time_retired = "turbo" AND grid < 14 | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... | What is the number of dead patients who had brain mass intracranial hemorrhage? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.expire_flag = "1" AND demographic.diagnosis = "BRAIN MASS;INTRACRANIAL HEMORRHAGE" | mimicsql_data |
CREATE TABLE table_name_41 (
place INTEGER,
goals_conceded VARCHAR,
lost VARCHAR
) | What is the lowest place of the team who conceded 36 goals and lost more than 6 times? | SELECT MIN(place) FROM table_name_41 WHERE goals_conceded = 36 AND lost > 6 | sql_create_context |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | 门诊诊断给患者29164002的诊断为前列腺增生,他000470这个检测指标的结果定量及其单位是什么 | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jybgb_jyjgzbb.Y... | css |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid nu... | what are the top five most frequent medications that followed in the same hospital visit for patients who received left heart cardiac cath until 2104? | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime, admissions.hadm_id FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FR... | mimic_iii |
CREATE TABLE table_name_61 (
venue VARCHAR,
away_team VARCHAR
) | What venue did South Melbourne play as the away team? | SELECT venue FROM table_name_61 WHERE away_team = "south melbourne" | sql_create_context |
CREATE TABLE table_28689 (
"Role" text,
"Original Broadway Cast" text,
"2005 film" text,
"2008 Final Performance Film" text,
"Hollywood Bowl Cast" text,
"2011 Off-Broadway Revival" text
) | Who was in the 2005 film with the role mark cohen? | SELECT "2005 film" FROM table_28689 WHERE "Role" = 'Mark Cohen' | wikisql |
CREATE TABLE field (
fieldid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
... | what papers do Parsing papers typically cite ? | SELECT DISTINCT cite.citedpaperid FROM cite, keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'Parsing' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = cite.citingpaperid AND paper.paperid = paperkeyphrase.paperid | scholar |
CREATE TABLE table_16116 (
"No." real,
"#" real,
"Title" text,
"Director" text,
"Writer" text,
"US air date" text,
"Storyteller" text,
"Villains" text
) | How many writers had an US air date of september 25, 1993? | SELECT COUNT("Writer") FROM table_16116 WHERE "US air date" = 'September 25, 1993' | wikisql |
CREATE TABLE table_name_13 (
swimsuit INTEGER,
state VARCHAR,
interview VARCHAR,
average VARCHAR,
evening_gown VARCHAR
) | What's the highest swimsuit for an average less than 8.073, evening gown less than 8.31, and an interview over 8.23 in georgia? | SELECT MAX(swimsuit) FROM table_name_13 WHERE average < 8.073 AND evening_gown < 8.31 AND interview > 8.23 AND state = "georgia" | sql_create_context |
CREATE TABLE zzmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | 患者77448008在2009年8月4日到2021年6月15日内都做了什么检查把检验报告单号列出来 | SELECT jybgb.BGDH FROM hz_info JOIN zzmzjzjlb JOIN jybgb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '77448008' AND jybgb.BGRQ BETWEEN '2009-08-04' AND '2021-... | css |
CREATE TABLE table_3535 (
"English" text,
"Japanese" text,
"Kana spelling" text,
"Revised Hepburn" text,
"Kunrei-shiki" text,
"Nihon-shiki" text
) | when english is tea how many nihon-shiki | SELECT "Nihon-shiki" FROM table_3535 WHERE "English" = 'tea' | wikisql |
CREATE TABLE table_80409 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | Which week was the game on December 14, 1967? | SELECT "Week" FROM table_80409 WHERE "Date" = 'december 14, 1967' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.