context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_27706 (
"Date of Issue" text,
"Theme" text,
"Denomination" text,
"Design" text,
"Illustration" text,
"Quantity" text,
"Printing Process" text,
"Paper Type" text,
"First Day Cover Cancellation" text
) | What is the theme when the date of issue is 11 january 2010? | SELECT "Theme" FROM table_27706 WHERE "Date of Issue" = '11 January 2010' | wikisql |
CREATE TABLE table_25691838_8 (
production_code INTEGER,
original_airdate VARCHAR
) | What was the smallest production code for August 11's original episode? | SELECT MIN(production_code) FROM table_25691838_8 WHERE original_airdate = "August 11" | 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... | 自二零一八年十月一日开始,截止到二零二零年八月二十三日,看看病人韦英秀到医院看病的次数是多少 | SELECT (SELECT COUNT(*) FROM person_info JOIN hz_info JOIN mzjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND p... | css |
CREATE TABLE table_9094 (
"party" text,
"% of votes" text,
"% of seats" text,
"difference" text,
"difference squared" real
) | What is the % of seats where the difference is 0.25? | SELECT "% of seats" FROM table_9094 WHERE "difference" = '0.25' | wikisql |
CREATE TABLE table_73160 (
"Rnd" real,
"Race Name" text,
"Pole position" text,
"Fastest lap" text,
"Winning driver" text,
"Winning team" text,
"Report" text
) | Who did the fastest lap in the race won by Paul Tracy, with Emerson Fittipaldi at the pole position? | SELECT "Fastest lap" FROM table_73160 WHERE "Pole position" = 'Emerson Fittipaldi' AND "Winning driver" = 'Paul Tracy' | 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 total number of patients who died in or before the year 2111? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.dod_year <= "2111.0" | mimicsql_data |
CREATE TABLE table_28314 (
"Season" real,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Podiums" real,
"Points" text,
"Position" text
) | How many points were scored on pole services? | SELECT "Points" FROM table_28314 WHERE "Team" = 'Pole Services' | wikisql |
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 microlab (
microl... | how many days ago was the first time patient 030-34260 was diagnosed with acute respiratory failure - due to neurological process in their current hospital visit? | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', diagnosis.diagnosistime)) FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-34260'... | eicu |
CREATE TABLE table_52386 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What team did the away team play against when they scored 11.9 (75)? | SELECT "Home team" FROM table_52386 WHERE "Away team score" = '11.9 (75)' | wikisql |
CREATE TABLE table_54987 (
"Year" real,
"Award" text,
"Category" text,
"Nomination" text,
"Result" text
) | Name the result in 2010 for bgm cyworld | SELECT "Result" FROM table_54987 WHERE "Year" = '2010' AND "Award" = 'bgm cyworld' | wikisql |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | 哪些患者在02981540665住院就诊,查询病人的卡号以及卡的类型 | SELECT zyjzjlb.KH, zyjzjlb.KLX FROM zyjzjlb WHERE zyjzjlb.JZLSH = '02981540665' | css |
CREATE TABLE table_64519 (
"Country" text,
"Athlete" text,
"Technical" real,
"Free" real,
"Total" real
) | What is the technical number for Jiang Tingting & Jiang Wenwen, and the total was more than 96.334? | SELECT MAX("Technical") FROM table_64519 WHERE "Athlete" = 'jiang tingting & jiang wenwen' AND "Total" > '96.334' | wikisql |
CREATE TABLE table_1813 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (millions)" text
) | How many millions of U.S. viewers watched the episode directed by Allison Liddi-Brown? | SELECT "U.S. viewers (millions)" FROM table_1813 WHERE "Directed by" = 'Allison Liddi-Brown' | wikisql |
CREATE TABLE table_55053 (
"Season" text,
"Team Name" text,
"Games" real,
"Losses" real,
"Points" real
) | Which season has less than 26 points, more than 18 games, and exactly 13 losses? | SELECT "Season" FROM table_55053 WHERE "Points" < '26' AND "Games" > '18' AND "Losses" = '13' | wikisql |
CREATE TABLE table_name_57 (
year VARCHAR,
silver VARCHAR
) | What year did Yuri Omeltchenko win Silver? | SELECT year FROM table_name_57 WHERE silver = "yuri omeltchenko" | sql_create_context |
CREATE TABLE table_78129 (
"Player" text,
"Position" text,
"School" text,
"Hometown" text,
"College" text
) | What position is for Plant high school? | SELECT "Position" FROM table_78129 WHERE "School" = 'plant high school' | wikisql |
CREATE TABLE table_name_8 (
grid INTEGER,
time VARCHAR,
bike VARCHAR
) | Which suzuki gsx-r1000 k7 has the highest time of retirement? | SELECT MAX(grid) FROM table_name_8 WHERE time = "retirement" AND bike = "suzuki gsx-r1000 k7" | sql_create_context |
CREATE TABLE table_name_64 (
game INTEGER,
date VARCHAR
) | What is the highest game that has april 21 as the date? | SELECT MAX(game) FROM table_name_64 WHERE date = "april 21" | sql_create_context |
CREATE TABLE table_43010 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"Location Attendance" text,
"Record" text
) | Which Location Attendance has a Game larger than 5? | SELECT "Location Attendance" FROM table_43010 WHERE "Game" > '5' | wikisql |
CREATE TABLE All_Documents (
Document_ID INTEGER,
Date_Stored DATETIME,
Document_Type_Code CHAR(15),
Document_Name CHAR(255),
Document_Description CHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Employees (
Employee_ID INTEGER,
Role_Code CHAR(15),
Employee_Name VARCHAR(255),
... | Bar chart x axis role code y axis the total number, I want to display in descending by the Role_Code. | SELECT Role_Code, COUNT(*) FROM Employees GROUP BY Role_Code ORDER BY Role_Code DESC | nvbench |
CREATE TABLE table_29127804_3 (
surface VARCHAR,
location VARCHAR
) | what is the material of the surface in noida , uttar pradesh, india | SELECT surface FROM table_29127804_3 WHERE location = "Noida , Uttar Pradesh, India" | sql_create_context |
CREATE TABLE table_name_74 (
name VARCHAR,
transfer_fee VARCHAR,
moving_to VARCHAR
) | WHAT NAME HAS A FREE TRANSFER FREE AND RETIRED? | SELECT name FROM table_name_74 WHERE transfer_fee = "free" AND moving_to = "retired" | sql_create_context |
CREATE TABLE table_68531 (
"Venue" text,
"City" text,
"Tickets Sold / Available" text,
"Gross Revenue (1979)" text,
"Gross Revenue (2012)" text
) | What is the Gross Revenue (1979) of the Venue, lyceum theatre? | SELECT "Gross Revenue (1979)" FROM table_68531 WHERE "Venue" = 'lyceum theatre' | wikisql |
CREATE TABLE table_23552 (
"#" text,
"Original title" text,
"Directed by" text,
"Written by" text,
"Original airdate" text,
"Prod. code" text,
"Viewers" real
) | When 1.12 is the production code what is the original title? | SELECT "Original title" FROM table_23552 WHERE "Prod. code" = '1.12' | wikisql |
CREATE TABLE table_16003 (
"Nomination" text,
"Actors Name" text,
"Film Name" text,
"Director" text,
"Country" text
) | Which nominations was the film 27 Stolen Kisses nominated for? | SELECT "Nomination" FROM table_16003 WHERE "Film Name" = '27 Stolen Kisses' | wikisql |
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(... | For those employees who do not work in departments with managers that have ids between 100 and 200, visualize a bar chart about the distribution of last_name and manager_id . | SELECT LAST_NAME, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | nvbench |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
pro... | what is the latest flight in the day from BALTIMORE to ATLANTA | 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 = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATL... | atis |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | 疾病S14.067的病号郑思源在门诊诊断时的氨基末端B型利钠肽的结果定量及其单位分别是多少? | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZ... | css |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE fzzmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
... | 列出患者30728995的检验报告单日期在零二年八月二十七日之前的所对应的门诊就诊的流水号 | SELECT zzmzjzjlb.JZLSH FROM hz_info JOIN zzmzjzjlb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE hz_info.RYBH = '30728995' AND NOT zzmzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2002-08-27') UNION SELECT fzzmzjzjlb.JZLSH FROM hz_info JOI... | css |
CREATE TABLE table_name_63 (
population_density INTEGER,
population__2011_ VARCHAR,
change___percentage_ VARCHAR,
county VARCHAR
) | What is the Population density that has a Change (%) higher than 10.4, and a Population (2011) less than 8574, in the County of Queens? | SELECT AVG(population_density) FROM table_name_63 WHERE change___percentage_ > 10.4 AND county = "queens" AND population__2011_ < 8574 | 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 prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | what is marital status and gender of subject name sheila riley? | SELECT demographic.marital_status, demographic.gender FROM demographic WHERE demographic.name = "Sheila Riley" | mimicsql_data |
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... | 统计医院5713275的医疗记录中出院诊断为Y71.248的最低医疗费总额是多少?最高医疗费总额是多少? | SELECT MIN(MED_AMOUT), MAX(MED_AMOUT) FROM t_kc24 WHERE MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc21 WHERE MED_SER_ORG_NO = '5713275' AND OUT_DIAG_DIS_CD = 'Y71.248') | css |
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 patient (
uniquep... | what is patient 030-51920's allergy during the first hospital visit? | SELECT allergy.allergyname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-51920' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient... | eicu |
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CR... | Edits in a year, other than of own posts. | SELECT MIN(ph.UserDisplayName), COUNT(*) AS edits FROM PostHistory AS ph JOIN Posts AS p ON p.Id = PostId WHERE PostHistoryTypeId = 5 AND PostTypeId IN (1, 2) AND p.DeletionDate IS NULL AND p.OwnerUserId != ph.UserId GROUP BY ph.UserId ORDER BY edits DESC | sede |
CREATE TABLE table_13681_2 (
country VARCHAR,
highest_monthly_inflation_rate VARCHAR
) | what's the country with highest monthly inflation rate being 3.13 10 8 % | SELECT country FROM table_13681_2 WHERE highest_monthly_inflation_rate = "3.13 × 10 8 %" | sql_create_context |
CREATE TABLE table_name_79 (
year_signed INTEGER,
reason_for_separation VARCHAR,
year_separated VARCHAR
) | What is the most current year signed for separation of and a separation year of 1997? | SELECT MAX(year_signed) FROM table_name_79 WHERE reason_for_separation = "†" AND year_separated = "1997" | sql_create_context |
CREATE TABLE table_name_38 (
attendance INTEGER,
date VARCHAR,
week VARCHAR
) | What was the attendance on September 19, 1971, after week 1? | SELECT AVG(attendance) FROM table_name_38 WHERE date = "september 19, 1971" AND week > 1 | sql_create_context |
CREATE TABLE table_57159 (
"Rank" real,
"Name" text,
"Nation" text,
"Points" real,
"Placings" real
) | I want to know the highest rank with placings more than 123 and points greater than 88.06 | SELECT MAX("Rank") FROM table_57159 WHERE "Placings" > '123' AND "Points" > '88.06' | wikisql |
CREATE TABLE table_21165 (
"Position" real,
"Driver / Passenger" text,
"Equipment" text,
"Bike No" real,
"Points" real
) | Name the equipment for bike number being 3 | SELECT "Equipment" FROM table_21165 WHERE "Bike No" = '3' | wikisql |
CREATE TABLE table_name_1 (
round VARCHAR,
opposition VARCHAR
) | What round had the opponent Lyon? | SELECT round FROM table_name_1 WHERE opposition = "lyon" | sql_create_context |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wa... | what was the name of the lab test that patient 035-1391 last recieved in 05/2103? | 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 = '035-1391')) AND STRFTIME('%y-%m', lab.labresulttime) = '2103-05' ORDER BY lab.labresultti... | eicu |
CREATE TABLE Customers (
phone_number VARCHAR,
email_address VARCHAR,
amount_outstanding INTEGER
) | List phone number and email address of customer with more than 2000 outstanding balance. | SELECT phone_number, email_address FROM Customers WHERE amount_outstanding > 2000 | sql_create_context |
CREATE TABLE table_33965 (
"Rank" text,
"Name" text,
"Begin Date" text,
"End Date" text,
"Notes" text
) | what name has a Rank of lieutenant colonel, and a Begin Date of 1904-02-22 22 february 1904? | SELECT "Name" FROM table_33965 WHERE "Rank" = 'lieutenant colonel' AND "Begin Date" = '1904-02-22 22 february 1904' | wikisql |
CREATE TABLE table_6147 (
"Year" real,
"Finish position" text,
"1st day" text,
"2nd day" text,
"3rd day" text,
"4th Day" text
) | What year has 59th as a finish position? | SELECT "Year" FROM table_6147 WHERE "Finish position" = '59th' | wikisql |
CREATE TABLE Tryout (
pID numeric(5,0),
cName varchar(20),
pPos varchar(8),
decision varchar(3)
)
CREATE TABLE Player (
pID numeric(5,0),
pName varchar(20),
yCard varchar(3),
HS numeric(5,0)
)
CREATE TABLE College (
cName varchar(20),
state varchar(2),
enr numeric(5,0)
) | Show me a bar chart for what is minimum hours of the students playing in different position?, show by the y axis in ascending please. | SELECT pPos, MIN(T2.HS) FROM Tryout AS T1 JOIN Player AS T2 ON T1.pID = T2.pID GROUP BY pPos ORDER BY MIN(T2.HS) | nvbench |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
i... | what was the last time patient 011-23193 intake time on the first intensive care unit visit? | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-23193') AND NOT patient.unitdischargetime IS NULL... | eicu |
CREATE TABLE table_78158 (
"Year" text,
"Competition" text,
"Date" text,
"Location" text,
"Score" text,
"Result" text
) | What is the competition in tokyo with the result loss? | SELECT "Competition" FROM table_78158 WHERE "Location" = 'tokyo' AND "Result" = 'loss' | wikisql |
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
)
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 re... | Show me about the distribution of Sex and the sum of Height , and group by attribute Sex in a bar chart, could you display from low to high by the y axis? | SELECT Sex, SUM(Height) FROM people GROUP BY Sex ORDER BY SUM(Height) | nvbench |
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... | what is the number of patients whose insurance is government and lab test name is lactate dehydrogenase, csf? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Government" AND lab.label = "Lactate Dehydrogenase, CSF" | mimicsql_data |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | count the number of patients who had emergency room hospital admission. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" | mimicsql_data |
CREATE TABLE table_10703 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Attendance" real,
"Record" text
) | How many people were in attendance when the home shows as Bulls? | SELECT COUNT("Attendance") FROM table_10703 WHERE "Home" = 'bulls' | wikisql |
CREATE TABLE table_name_52 (
lost VARCHAR,
club VARCHAR,
played VARCHAR,
losing_bp VARCHAR
) | What is the total number of games lost when 22 have been played, the losing BP number is 2, and the club is Merthyr RFC? | SELECT lost FROM table_name_52 WHERE played = "22" AND losing_bp = "2" AND club = "merthyr rfc" | sql_create_context |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | was patient 006-40255 receiving since 5 years ago any medication? | SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-40255')) AND DATETIME(medication.drugstarttime) >= DATETIME(CURRENT_TI... | eicu |
CREATE TABLE table_name_86 (
score VARCHAR,
player VARCHAR
) | Name The Score of Player of seve ballesteros? | SELECT score FROM table_name_86 WHERE player = "seve ballesteros" | sql_create_context |
CREATE TABLE table_63741 (
"Rank" real,
"Name" text,
"Altitude (meters)" real,
"Range" text,
"Parent Range" text
) | What is the Altitude (meters) associated with a rank smaller than 10, and the range M hlig-Hofmann Mountains? | SELECT COUNT("Altitude (meters)") FROM table_63741 WHERE "Range" = 'mühlig-hofmann mountains' AND "Rank" < '10' | wikisql |
CREATE TABLE table_name_91 (
wicket_partnership VARCHAR,
season VARCHAR
) | What was the partnership in the season of 1928 | SELECT wicket_partnership FROM table_name_91 WHERE season = "1928" | sql_create_context |
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
... | Total score of my non-CW posts. | SELECT SUM(Score) AS "total_score", COUNT(Score) AS "number_of_posts" FROM Posts WHERE CommunityOwnedDate IS NULL AND OwnerUserId = '##UserId##' | sede |
CREATE TABLE table_17311759_4 (
score VARCHAR,
team VARCHAR
) | What are the scores made by Charlotte team | SELECT score FROM table_17311759_4 WHERE team = "Charlotte" | sql_create_context |
CREATE TABLE table_47861 (
"Date" text,
"Time" text,
"Opponent" text,
"Site" text,
"City" text
) | What city was the game held in when the opponent was Towson? | SELECT "City" FROM table_47861 WHERE "Opponent" = 'towson' | wikisql |
CREATE TABLE table_name_52 (
finals INTEGER,
pre_season INTEGER
) | Which Finals have a Pre-Season larger than 0? | SELECT MIN(finals) FROM table_name_52 WHERE pre_season > 0 | sql_create_context |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | what is the maximum days of hospital stay for patients primarily diagnosed for sigmoid diverticulitis, colovestical fistula/sda? | SELECT MAX(demographic.days_stay) FROM demographic WHERE demographic.diagnosis = "SIGMOID DIVERTICULITIS, COLOVESTICAL FISTULA/SDA" | mimicsql_data |
CREATE TABLE table_9636 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" text
) | What is the record that resulted in a loss at the RSF: Shooto Challenge 2? | SELECT "Record" FROM table_9636 WHERE "Res." = 'loss' AND "Event" = 'rsf: shooto challenge 2' | wikisql |
CREATE TABLE table_name_91 (
catalog VARCHAR,
region VARCHAR
) | What is the Catalog number for the region of Japan? | SELECT catalog FROM table_name_91 WHERE region = "japan" | sql_create_context |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | Find the number of patients who died and had a drug code of zosy4fpb. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.expire_flag = "1" AND prescriptions.formulary_drug_cd = "ZOSY4FPB" | mimicsql_data |
CREATE TABLE Transactions (
transaction_id INTEGER,
investor_id INTEGER,
transaction_type_code VARCHAR(10),
date_of_transaction DATETIME,
amount_of_transaction DECIMAL(19,4),
share_count VARCHAR(40),
other_details VARCHAR(255)
)
CREATE TABLE Ref_Transaction_Types (
transaction_type_code... | Find the transaction type descriptions and dates if the share count is smaller than 10, group by transaction type, count the date of transaction, and bin the date into the weekday interval, I want to order by the total number from low to high please. | SELECT T2.date_of_transaction, COUNT(T2.date_of_transaction) FROM Ref_Transaction_Types AS T1 JOIN Transactions AS T2 ON T1.transaction_type_code = T2.transaction_type_code WHERE T2.share_count < 10 GROUP BY transaction_type_description ORDER BY COUNT(date_of_transaction) | nvbench |
CREATE TABLE table_name_81 (
score VARCHAR,
home VARCHAR,
date VARCHAR
) | What score has vancouver as the home, and february 16 as the date? | SELECT score FROM table_name_81 WHERE home = "vancouver" AND date = "february 16" | sql_create_context |
CREATE TABLE table_name_14 (
margin INTEGER,
score VARCHAR
) | What was the margin of the score 52-12? | SELECT SUM(margin) FROM table_name_14 WHERE score = "52-12" | sql_create_context |
CREATE TABLE table_54186 (
"! Late 1941" text,
"Late 1942" real,
"Sept. 1943" real,
"Late 1943" real,
"Late 1944" real,
"1978 Veteran membership" real
) | What is the total number of the 1978 Veteran membership that has a late 1943 more than 78,000 and a september 1943 larger than 60,000? | SELECT COUNT("1978 Veteran membership") FROM table_54186 WHERE "Late 1943" > '78,000' AND "Sept. 1943" > '60,000' | wikisql |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE ta (
campus_job_id int,
... | Speaking of next semester , what classes is Dr. Rosario Aguilar-pariente teaching ? | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Rosario Aguilar-pariente%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_ins... | advising |
CREATE TABLE table_name_98 (
attendance INTEGER,
opponent VARCHAR
) | What is the low attendance rate against buffalo bills? | SELECT MIN(attendance) FROM table_name_98 WHERE opponent = "buffalo bills" | sql_create_context |
CREATE TABLE table_70382 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Record" text
) | On the date of June 15 what was the score? | SELECT "Score" FROM table_70382 WHERE "Date" = 'june 15' | wikisql |
CREATE TABLE table_27728 (
"Number" real,
"Name" text,
"Vertices" text,
"Hypotenuse 0 c" text,
"Vertical 0 b" text,
"Horizontal 0 a" text
) | Name the vertical for bian | SELECT "Vertical 0 b" FROM table_27728 WHERE "Name" = '边 BIAN' | wikisql |
CREATE TABLE table_71458 (
"Entrant" text,
"Constructor" text,
"Chassis" text,
"Engine \u2020" text,
"Tyre" text,
"Driver" text,
"Rounds" text
) | Which constructor made the car with a rb1 chassis and which is driven by David Coulthard? | SELECT "Constructor" FROM table_71458 WHERE "Chassis" = 'rb1' AND "Driver" = 'david coulthard' | 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 admission year is less than 2135 and diagnoses icd9 code is v1009? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2135" AND diagnoses.icd9_code = "V1009" | mimicsql_data |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
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),
... | For all employees who have the letters D or S in their first name, return a bar chart about the distribution of hire_date and the sum of department_id bin hire_date by weekday, show by the Y from low to high. | SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SUM(DEPARTMENT_ID) | nvbench |
CREATE TABLE table_14638077_2 (
pole_position VARCHAR,
rnd VARCHAR
) | who is the the pole position with rnd being 16 | SELECT pole_position FROM table_14638077_2 WHERE rnd = 16 | sql_create_context |
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
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 TAB... | show me flights from PHILADELPHIA to OAKLAND on friday | 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 = 'OAKLAND' AND date_day.day_number = 25 AND date_day.month_number = 6 AND d... | atis |
CREATE TABLE table_name_15 (
qual_2 VARCHAR,
team VARCHAR,
best VARCHAR
) | Name the Qual 2 of a Team of american spirit team johansson and a Best of 59.073? | SELECT qual_2 FROM table_name_15 WHERE team = "american spirit team johansson" AND best = "59.073" | sql_create_context |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | what is minimum age of patients whose marital status is single and primary disease is colangitis? | SELECT MIN(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "COLANGITIS" | mimicsql_data |
CREATE TABLE location (
restaurant_id int,
house_number int,
street_name varchar,
city_name varchar
)
CREATE TABLE geographic (
city_name varchar,
county varchar,
region varchar
)
CREATE TABLE restaurant (
id int,
name varchar,
food_type varchar,
city_name varchar,
rati... | give me a restaurant in mountain view that serves good arabic food ? | SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'mountain view' AND restaurant.food_type = 'arabic' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5 | restaurants |
CREATE TABLE table_22657 (
"Season" text,
"League" text,
"Division" text,
"GP" real,
"W" real,
"L" real,
"T" real,
"OTL" real,
"SOL" real,
"PTS" real,
"PCT" text,
"GF" real,
"GA" real,
"PIM" real,
"Coach(es)" text,
"Result" text
) | What is the highest GA when GF is 39? | SELECT MAX("GA") FROM table_22657 WHERE "GF" = '39' | wikisql |
CREATE TABLE table_20821 (
"Gun" text,
"m/v ft/s" real,
"Shell (lb)" text,
"Time to ft (m) at 25\u00b0 (seconds)" text,
"Time to ft (m) at 40\u00b0 (seconds)" text,
"Time to ft (m) at 55\u00b0 (seconds)" text,
"Max. height (ft)" real
) | If the gun used is the qf 12 pdr 12 cwt, what is the shell weight? | SELECT "Shell (lb)" FROM table_20821 WHERE "Gun" = 'QF 12 pdr 12 cwt' | wikisql |
CREATE TABLE table_name_55 (
fa_cup_goals INTEGER,
total_goals VARCHAR,
fa_cup_apps VARCHAR,
total_apps VARCHAR
) | What is the smallest number of FA Cup Goals for players with 4 FA Cup Appearances, 49 Total Appearances, and more than 17 total goals? | SELECT MIN(fa_cup_goals) FROM table_name_55 WHERE fa_cup_apps = "4" AND total_apps = "49" AND total_goals > 17 | sql_create_context |
CREATE TABLE table_50694 (
"Tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) | WHAT IS THE 2008 PERFORMANCE WITH A 2007 CAREER STATISTICS? | SELECT "2008" FROM table_50694 WHERE "2007" = 'career statistics' | wikisql |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
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,
JY... | 患者曹明智的身高多少厘米、体重多少公斤 | SELECT zzmzjzjlb.SG, zzmzjzjlb.TZ FROM person_info JOIN hz_info JOIN zzmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE person_info.XM = '曹明智' UNION SELECT fzzmzjzjlb.SG, fzzmzjzjlb.TZ FROM person_info JOIN hz_info JOIN ... | css |
CREATE TABLE table_name_15 (
place VARCHAR,
player VARCHAR,
country VARCHAR,
to_par VARCHAR
) | What is the place of plyaer Tim Herron from the United States with a to par of +1? | SELECT place FROM table_name_15 WHERE country = "united states" AND to_par = "+1" AND player = "tim herron" | sql_create_context |
CREATE TABLE table_204_586 (
id number,
"game" number,
"date" text,
"team" text,
"score" text,
"high points" text,
"high rebounds" text,
"high assists" text,
"location\nattendance" text,
"record" text
) | during the 2010 pre season , who did the la clippers play after utah ? | SELECT "team" FROM table_204_586 WHERE "date" > (SELECT "date" FROM table_204_586 WHERE "team" = 'utah') ORDER BY "date" LIMIT 1 | squall |
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_DIRE_CD text,
MED_DIRE_NM text,... | 二零零四年四月二十一日到二零一三年三月十八日,查一下在这段时间患者彭志勇买西药的次数 | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_NM = '彭志勇' AND t_kc22.STA_DATE BETWEEN '2004-04-21' AND '2013-03-18' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' | css |
CREATE TABLE table_203_353 (
id number,
"#" number,
"title" text,
"producer(s)" text,
"featured guest(s)" text,
"time" text
) | how many songs are less than 4 minutes in length ? | SELECT COUNT("title") FROM table_203_353 WHERE "time" < 4 | squall |
CREATE TABLE neighborhood (
id int,
business_id varchar,
neighborhood_name varchar
)
CREATE TABLE category (
id int,
business_id varchar,
category_name varchar
)
CREATE TABLE business (
bid int,
business_id varchar,
name varchar,
full_address varchar,
city varchar,
lati... | List all tips for ' Cafe Zinho ' in Pennsylvania in 2010 . | SELECT tip.text FROM business, tip WHERE business.name = 'Cafe Zinho' AND business.state = 'Pennsylvania' AND tip.business_id = business.business_id AND tip.year = 2010 | yelp |
CREATE TABLE table_20170644_5 (
position VARCHAR,
cfl_team VARCHAR
) | What position(s) drafted by the montreal alouettes? | SELECT position FROM table_20170644_5 WHERE cfl_team = "Montreal Alouettes" | sql_create_context |
CREATE TABLE debate_people (
Debate_ID int,
Affirmative int,
Negative int,
If_Affirmative_Win bool
)
CREATE TABLE people (
People_ID int,
District text,
Name text,
Party text,
Age int
)
CREATE TABLE debate (
Debate_ID int,
Date text,
Venue text,
Num_of_Audience int
... | Show the names of people and the number of times they have been on the affirmative side of debates. Show a pie chart. | SELECT Name, COUNT(*) FROM debate_people AS T1 JOIN people AS T2 ON T1.Affirmative = T2.People_ID GROUP BY T2.Name | nvbench |
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,... | 钱梦菲患者金额不低于7537.13元的药品在哪几次医疗记录中被开出过?医疗就诊编号分别是什么? | SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_NM = '钱梦菲' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE AMOUNT >= 7537.13) | css |
CREATE TABLE table_38788 (
"Round" text,
"Player" text,
"Position" text,
"Nationality" text,
"College/Junior/Club Team (League)" text
) | In what League is Left Wing Yanick Dupre? | SELECT "College/Junior/Club Team (League)" FROM table_38788 WHERE "Position" = 'left wing' AND "Player" = 'yanick dupre' | wikisql |
CREATE TABLE table_25721_3 (
episode_no INTEGER,
airdate VARCHAR
) | Which episode number aired on 18 october 2012? | SELECT MIN(episode_no) FROM table_25721_3 WHERE airdate = "18 October 2012" | sql_create_context |
CREATE TABLE table_31000 (
"Movies" text,
"December 25" text,
"December 26" text,
"December 27" text,
"December 28" text,
"December 25-28 total" text,
"Total 2-week Gross" text
) | What is the figure for December 28 for ang tanging ina mo (last na 'to!)? | SELECT "December 28" FROM table_31000 WHERE "Movies" = 'Ang Tanging Ina Mo (Last na ''To!)' | wikisql |
CREATE TABLE table_name_65 (
Id VARCHAR
) | what is 1977 when 1980 is chile? | SELECT 1977 FROM table_name_65 WHERE 1980 = "chile" | sql_create_context |
CREATE TABLE table_26451 (
"Name" text,
"Nationality" text,
"Position" text,
"Appearances" real,
"Starts" real,
"Minutes" real,
"Goals" real
) | What is the position of the player who is from the United States and has 30 minutes? | SELECT "Position" FROM table_26451 WHERE "Nationality" = 'United States' AND "Minutes" = '30' | wikisql |
CREATE TABLE table_63313 (
"School" text,
"Location" text,
"Mascot" text,
"Enrollment" real,
"IHSAA Class" text,
"# / County" text
) | What school is in Lagrange, with an IHSAA Class of aaa? | SELECT "School" FROM table_63313 WHERE "Location" = 'lagrange' AND "IHSAA Class" = 'aaa' | wikisql |
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
)
... | count the number of patients whose primary disease is sepsis and admission year is less than 2162? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "SEPSIS" AND demographic.admityear < "2162" | mimicsql_data |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.