context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_name_91 (
european_cup VARCHAR,
season VARCHAR
) | Which European Cup is in the 2006-07 season? | SELECT european_cup FROM table_name_91 WHERE season = "2006-07" | sql_create_context |
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidan... | All the downvoted posts of a user. | SELECT * FROM Posts WHERE OwnerUserId = '##UserID##' AND Score < 0 | sede |
CREATE TABLE table_name_5 (
winning_score VARCHAR,
runner_s__up VARCHAR
) | What was the winning score for runnerup Greg Norman | SELECT winning_score FROM table_name_5 WHERE runner_s__up = "greg norman" | sql_create_context |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
... | when did patient 12775 first got the minimum of heart rate yesterday? | SELECT chartevents.charttime FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 12775)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart ra... | mimic_iii |
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
... | Find meter_200 and the average of ID , and group by attribute meter_200, and visualize them by a bar chart, and order by the bar in descending. | SELECT meter_200, AVG(ID) FROM swimmer GROUP BY meter_200 ORDER BY meter_200 DESC | nvbench |
CREATE TABLE table_12901 (
"Class" text,
"Type" text,
"Sailors" real,
"Trapeze" real,
"First OG" real,
"Olympics so far" real
) | What is the lowest value for Olympics, when Sailors is greater than 1, when First OG is after 1948, and when Class is 'Flying Dutchman'? | SELECT MIN("Olympics so far") FROM table_12901 WHERE "Sailors" > '1' AND "First OG" > '1948' AND "Class" = 'flying dutchman' | wikisql |
CREATE TABLE table_29818 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | What's the score in andray blatche (17) high points? | SELECT COUNT("Score") FROM table_29818 WHERE "High points" = 'Andray Blatche (17)' | 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
)
... | what is the number of patients whose primary disease is sigmoid diverticulitis, colovestical fistula/sda and year of death is less than or equal to 2112? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "SIGMOID DIVERTICULITIS, COLOVESTICAL FISTULA/SDA" AND demographic.dod_year <= "2112.0" | mimicsql_data |
CREATE TABLE table_name_21 (
rank INTEGER,
title VARCHAR
) | What is the rank of Bronco Billy? | SELECT AVG(rank) FROM table_name_21 WHERE title = "bronco billy" | sql_create_context |
CREATE TABLE table_74170 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | Name the high assists for madison square garden 19,763 and record is 39 38 | SELECT "High assists" FROM table_74170 WHERE "Location Attendance" = 'Madison Square Garden 19,763' AND "Record" = '39–38' | wikisql |
CREATE TABLE trip (
id INTEGER,
duration INTEGER,
start_date TEXT,
start_station_name TEXT,
start_station_id INTEGER,
end_date TEXT,
end_station_name TEXT,
end_station_id INTEGER,
bike_id INTEGER,
subscription_type TEXT,
zip_code INTEGER
)
CREATE TABLE status (
station_i... | Draw a bar chart for what is the name of every city that has at least 15 stations and how many stations does it have?, and rank by the city from low to high. | SELECT city, COUNT(*) FROM station GROUP BY city ORDER BY city | nvbench |
CREATE TABLE table_28611413_2 (
title VARCHAR,
written_by VARCHAR
) | What is the title of the episode written by Frank Military? | SELECT title FROM table_28611413_2 WHERE written_by = "Frank Military" | sql_create_context |
CREATE TABLE table_203_421 (
id number,
"name" text,
"from" text,
"until" text,
"relationship with predecessor" text
) | who was the last head of medici ? | SELECT "name" FROM table_203_421 ORDER BY "from" DESC LIMIT 1 | squall |
CREATE TABLE table_8246 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" text
) | What is the attendance of tie no. 23? | SELECT "Attendance" FROM table_8246 WHERE "Tie no" = '23' | wikisql |
CREATE TABLE table_17194 (
"DVD Name" text,
"Released" text,
"Audio" text,
"Aspect Ratio" text,
"Duration" text,
"Number of Episodes" real,
"Num of Discs" real
) | What is the total number of discs where the run time was 4 hours 40 minutes? | SELECT COUNT("Num of Discs") FROM table_17194 WHERE "Duration" = '4 hours 40 minutes' | wikisql |
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE p... | In Fall 2007 , is it possible for me to take MCDB 457 ? | SELECT COUNT(*) > 0 FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, semester AS SEMESTERalias0 WHERE COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id AND NOT COURSEalias0.course_id IN... | advising |
CREATE TABLE table_23274514_4 (
high_points VARCHAR,
team VARCHAR
) | Who tied in the highest point scorer when playing against Phoenix? | SELECT high_points FROM table_23274514_4 WHERE team = "Phoenix" | sql_create_context |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
va... | tell me the name of the test that patient 8005 first received in 03/last year? | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT labevents.itemid FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8005) AND DATETIME(labevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') A... | mimic_iii |
CREATE TABLE Staff (
Staff_ID INTEGER,
Tourist_Attraction_ID INTEGER,
Name VARCHAR(40),
Other_Details VARCHAR(255)
)
CREATE TABLE Locations (
Location_ID INTEGER,
Location_Name VARCHAR(255),
Address VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Visits (
Visit_ID INTEGER,
... | Plot the total number by grouped by how to get there as a bar graph, and show from low to high by the total number. | SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) | nvbench |
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... | specify the icu stay of patient id 22377 | SELECT prescriptions.icustay_id FROM prescriptions WHERE prescriptions.subject_id = "22377" | mimicsql_data |
CREATE TABLE table_200_14 (
id number,
"act" text,
"year signed" number,
"# albums released under bad boy" number
) | when was the notorious b.i.g signed to bad boy ? | SELECT "year signed" FROM table_200_14 WHERE "act" = 'the notorious b.i.g' | squall |
CREATE TABLE table_26730 (
"Season" text,
"Champions" text,
"Runner-up" text,
"Third Place" text,
"Top Goalscorer" text,
"Club" text
) | Who had third place when the champions is ban k ostrava (1)? | SELECT "Third Place" FROM table_26730 WHERE "Champions" = 'Baník Ostrava (1)' | wikisql |
CREATE TABLE table_72069 (
"Player" text,
"No." text,
"Nationality" text,
"Position" text,
"Years in Toronto" text,
"School/Club Team" text
) | What school did player number 21 play for? | SELECT "School/Club Team" FROM table_72069 WHERE "No." = '21' | 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_... | cheapest fare from INDIANAPOLIS to ORLANDO on the 27 of 12 | 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, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis, flight, flight_fare WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND C... | atis |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TA... | I have the same problem. | SELECT Id AS "post_link", CreationDate FROM Posts WHERE Body LIKE '%I have the same problem%' AND CreationDate > '2014-01-01 00:00:00' | sede |
CREATE TABLE table_14350 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
) | What did billy andrade to par? | SELECT "To par" FROM table_14350 WHERE "Player" = 'billy andrade' | wikisql |
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... | 总计一下医疗记录中出院诊断为编号K30.264在编码为6353775的医院的的最低和最高医疗费总额是多少? | SELECT MIN(t_kc24.MED_AMOUT), MAX(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.MED_SER_ORG_NO = '6353775' AND qtb.OUT_DIAG_DIS_CD = 'K30.264' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.MED_SER_ORG_NO = '6353775' AND gyb.OUT_DIAG_DIS_CD = 'K30.264' UNION... | css |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellv... | until 10/29/2103, when did patient 028-53285 receive an intake for the first time? | 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 = '028-53285')) AND intakeoutput.cellpath LIKE '%intake%... | eicu |
CREATE TABLE table_44806 (
"Year" real,
"Network" text,
"Play-by-play" text,
"Color commentator(s)" text,
"Pregame host" text
) | What was the Play-by-play when the color commentator was Eric Wynalda, earlier than 2005? | SELECT "Play-by-play" FROM table_44806 WHERE "Color commentator(s)" = 'eric wynalda' AND "Year" < '2005' | wikisql |
CREATE TABLE table_9602 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"School/Club Team" text
) | What was the school/club after round 12, and picked smaller than 342? | SELECT "School/Club Team" FROM table_9602 WHERE "Round" > '12' AND "Pick" < '342' | wikisql |
CREATE TABLE table_25360865_1 (
_number INTEGER,
name VARCHAR
) | Name the most number for charvez davis | SELECT MAX(_number) FROM table_25360865_1 WHERE name = "Charvez Davis" | sql_create_context |
CREATE TABLE table_15187735_14 (
segment_c VARCHAR,
netflix VARCHAR
) | What is segment C in s07e05 | SELECT segment_c FROM table_15187735_14 WHERE netflix = "S07E05" | sql_create_context |
CREATE TABLE csu_fees (
campus number,
year number,
campusfee number
)
CREATE TABLE campuses (
id number,
campus text,
location text,
county text,
year number
)
CREATE TABLE degrees (
year number,
campus number,
degrees number
)
CREATE TABLE faculty (
campus number,
... | What campuses are in Los Angeles county? | SELECT campus FROM campuses WHERE county = "Los Angeles" | spider |
CREATE TABLE table_63654 (
"Round" text,
"Clubs remaining" real,
"Clubs involved" real,
"Winners from previous round" text,
"New entries this round" text,
"Leagues entering at this round" text
) | Which round has 4 clubs involved? | SELECT "Round" FROM table_63654 WHERE "Clubs involved" = '4' | wikisql |
CREATE TABLE table_name_23 (
lbsc_name VARCHAR
) | What is the largest 1st LBSC number with a LBSC Name of northcote? | SELECT MAX(1 AS st_lbsc_no) FROM table_name_23 WHERE lbsc_name = "northcote" | 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... | How many patients with aortic valve insuffiency ortic valve replacement /sda as their primary disease had abnormal delta lab test results? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "AORTIC VALVE INSUFFIENCY\AORTIC VALVE REPLACEMENT /SDA" AND lab.flag = "delta" | 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... | give me the number of patients whose admission type is urgent and procedure short title is lap periton adhesiolysis? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "URGENT" AND procedures.short_title = "Lap periton adhesiolysis" | mimicsql_data |
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
)
... | what is maximum age of patients whose gender is m and ethnicity is black/haitian? | SELECT MAX(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.ethnicity = "BLACK/HAITIAN" | mimicsql_data |
CREATE TABLE table_23783 (
"Epoch (UTC)" text,
"Periselene (km)" text,
"Aposelene (km)" text,
"Eccentricity" text,
"Inclination (deg) (to Moon equator)" text,
"Period (h)" text
) | What is every value for periselene if period is 4.947432? | SELECT "Periselene (km)" FROM table_23783 WHERE "Period (h)" = '4.947432' | wikisql |
CREATE TABLE table_name_89 (
area_km_2 INTEGER,
population VARCHAR,
status VARCHAR,
official_name VARCHAR
) | What is the area (in km2) for the village of Paquetville, with a population over 706? | SELECT AVG(area_km_2) FROM table_name_89 WHERE status = "village" AND official_name = "paquetville" AND population > 706 | sql_create_context |
CREATE TABLE table_73183 (
"Date" text,
"Team #1" text,
"Res." text,
"Team #2" text,
"Competition" text,
"Attendance" real,
"Remarks" text
) | Who was team #1 on 9 September 2006? | SELECT "Team #1" FROM table_73183 WHERE "Date" = '9 September 2006' | wikisql |
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... | 1534416这家医院所有就诊记录里,患者平均岁数是多少?根据不一样的科室编码和出院诊断列一下 | SELECT gwyjzb.MED_ORG_DEPT_CD, gwyjzb.OUT_DIAG_DIS_NM, AVG(gwyjzb.PERSON_AGE) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '1534416' GROUP BY gwyjzb.MED_ORG_DEPT_CD, gwyjzb.OUT_DIAG_DIS_NM UNION SELECT fgwyjzb.MED_ORG_DEPT_CD, fgwyjzb.OUT_DIAG_DIS_NM, AVG(fgwyjzb.PERSON_AGE) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '15... | css |
CREATE TABLE table_6013 (
"Type" text,
"wheelbase" text,
"M39 series" text,
"M809 series" text,
"M939 series" text
) | Name the M809 series for short wheelbase and M939 series of M931/932 | SELECT "M809 series" FROM table_6013 WHERE "wheelbase" = 'short' AND "M939 series" = 'm931/932' | wikisql |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date... | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, a scatter chart shows the correlation between commission_pct and manager_id . | SELECT COMMISSION_PCT, MANAGER_ID FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 | nvbench |
CREATE TABLE hz_info_zyjzjlb (
JZLSH number,
YLJGDM number,
zyjzjlb_id number
)
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,
... | 患者85722841被门诊诊断为疾病T18.984,他的免疫球蛋白A(敏感)的结果定量及单位是怎样的 | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN 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 = jyjgzbb.YLJGDM AND jybgb.BGDH = jy... | css |
CREATE TABLE table_56173 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was the attendance at Corio Oval? | SELECT "Crowd" FROM table_56173 WHERE "Venue" = 'corio oval' | wikisql |
CREATE TABLE table_name_35 (
director_s_ VARCHAR,
writer_s_ VARCHAR
) | Alex Winckler wrote the film, who was the director? | SELECT director_s_ FROM table_name_35 WHERE writer_s_ = "alex winckler" | 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 (... | show me the number of patients whose lab test category is chemistry and diagnoses short title is hematoma complic proc. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Hematoma complic proc" AND lab."CATEGORY" = "Chemistry" | mimicsql_data |
CREATE TABLE table_54078 (
"Year" real,
"Category" text,
"Character" text,
"For The Show" text,
"Result" text
) | In 2007 what category won? | SELECT "Category" FROM table_54078 WHERE "Result" = 'won' AND "Year" < '2007' | wikisql |
CREATE TABLE table_203_510 (
id number,
"township" text,
"fips" number,
"population\ncenter" text,
"population" number,
"population\ndensity\n(/mi2)" number,
"population\ndensity\n(/km2)" number,
"land area\n(mi2)" number,
"land area\n(km2)" number,
"water area\n(mi2)" number,
... | which township in pope county , arkansas has the least amount of water area ? | SELECT "township" FROM table_203_510 WHERE "water area\n(mi2)" = (SELECT MIN("water area\n(mi2)") FROM table_203_510) | squall |
CREATE TABLE staff (
staff_id number,
staff_address_id number,
nickname text,
first_name text,
middle_name text,
last_name text,
date_of_birth time,
date_joined_staff time,
date_left_staff time
)
CREATE TABLE customer_payments (
customer_id number,
datetime_payment time,
... | Which last names are both used by customers and by staff? | SELECT last_name FROM customers INTERSECT SELECT last_name FROM staff | spider |
CREATE TABLE table_17309500_1 (
assists VARCHAR,
games VARCHAR
) | Name the assists for 157 games | SELECT assists FROM table_17309500_1 WHERE games = 157 | sql_create_context |
CREATE TABLE table_name_38 (
year__ceremony_ VARCHAR,
language_s_ VARCHAR,
original_title VARCHAR
) | WHAT IS THE YEAR WITH DARI, AND TITLE osama ( )? | SELECT year__ceremony_ FROM table_name_38 WHERE language_s_ = "dari" AND original_title = "osama (أسامة)" | sql_create_context |
CREATE TABLE table_test_29 (
"id" int,
"bleeding" int,
"left_ventricular_ejection_fraction_lvef" int,
"systolic_blood_pressure_sbp" int,
"hemoglobin_a1c_hba1c" float,
"heart_disease" bool,
"trauma" bool,
"renal_disease" bool,
"creatinine_clearance_cl" float,
"hemorrhagic_stroke" ... | acute liver failure | SELECT * FROM table_test_29 WHERE liver_disease = 1 | criteria2sql |
CREATE TABLE table_name_6 (
silver VARCHAR,
nation VARCHAR,
bronze VARCHAR,
total VARCHAR
) | What is the total number of Silver when Bronze was smaller than 1 with a total smaller than 2 in Bulgaria? | SELECT COUNT(silver) FROM table_name_6 WHERE bronze < 1 AND total < 2 AND nation = "bulgaria" | sql_create_context |
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
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
d... | when did patient 19040's last intake since 680 days ago occur? | SELECT inputevents_cv.charttime 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 = 19040)) AND DATETIME(inputevents_cv.charttime) >= DATETIME(CURRENT_TIME(), '-680 day') ORDER... | mimic_iii |
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,
... | give me the number of patients whose lab test name is glucose, csf? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.label = "Glucose, CSF" | mimicsql_data |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
... | what was the first operation time in 2105 for patient 73693? | SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 73693) AND STRFTIME('%y', procedures_icd.charttime) = '2105' ORDER BY procedures_icd.charttime LIMIT 1 | mimic_iii |
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... | A bar chart shows the distribution of Sex and the sum of Height , and group by attribute Sex, show in ascending by the bars. | SELECT Sex, SUM(Height) FROM people GROUP BY Sex ORDER BY Sex | nvbench |
CREATE TABLE table_1242447_1 (
strongs_transliteration VARCHAR,
hebrew_word VARCHAR
) | What is the strongs transliteration of the hebrew word ? | SELECT strongs_transliteration FROM table_1242447_1 WHERE hebrew_word = "יוֹחָנָן" | sql_create_context |
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,
... | 患者的检测指标602455在门诊诊断为疾病G21.554的参考值范围下限和上限分别是? | SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE wdmzjzjlb.JZZDBM = 'G21.554' AND jyjgzbb.JCZBDM = '602455' UNION SELECT jyjgzbb.CKZFWX... | css |
CREATE TABLE table_44271 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Difference" text,
"Points 1" text
) | What was the Goal Difference for Postion 22? | SELECT "Goal Difference" FROM table_44271 WHERE "Position" = '22' | wikisql |
CREATE TABLE table_name_84 (
format VARCHAR,
region VARCHAR,
date VARCHAR
) | What is the format for the United States dated July 23, 2002? | SELECT format FROM table_name_84 WHERE region = "united states" AND date = "july 23, 2002" | sql_create_context |
CREATE TABLE table_204_503 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"notes" text
) | how many times did imma clopes compete ? | SELECT COUNT(*) FROM table_204_503 | squall |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
a... | what percentile is the magnesium value of 2.1 in the same age group as patient 010-25029 in the first hospital encounter? | SELECT DISTINCT t1.c1 FROM (SELECT lab.labresult, PERCENT_RANK() OVER (ORDER BY lab.labresult) AS c1 FROM lab WHERE lab.labname = 'magnesium' AND lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age = (SELECT patient.age FROM patient WHERE patient.uniquepid = '010-25029' AND NOT pat... | eicu |
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 the number of patients who had replacement of tube or enterostomy device of small intestine that had a hematology lab test category? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Replacement of tube or enterostomy device of small intestine" AND lab."CATEGORY" = "Hematology" | mimicsql_data |
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | what were the four most common intakes this year? | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT t1.itemid FROM (SELECT inputevents_cv.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM inputevents_cv WHERE DATETIME(inputevents_cv.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') GROUP BY inputevents_cv.it... | mimic_iii |
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... | what were the names of the output that patient 43779 had first on this month/15? | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT outputevents.itemid FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 43779)) AND DATETIME(outputevents.charttim... | mimic_iii |
CREATE TABLE table_44582 (
"Official Name" text,
"Status" text,
"Area km 2" real,
"Population" real,
"Census Ranking" text
) | What is the census ranking for the parish with an area larger than 243.31 square km? | SELECT "Census Ranking" FROM table_44582 WHERE "Area km 2" > '243.31' | wikisql |
CREATE TABLE table_26175 (
"Warship" text,
"tons ( L.ton )" real,
"Horse- power" real,
"Speed ( Knots )" text,
"Armour (Inch)" text,
"Main Artillery" text,
"Built Year" real
) | In how many different years was the warship that weights 1130 tons built? | SELECT COUNT("Built Year") FROM table_26175 WHERE "tons ( L.ton )" = '1130' | wikisql |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownV... | Total upvotes on questions, per day. | SELECT v.CreationDate, QuestionUpVotes = COUNT(*) FROM Votes AS v INNER JOIN Posts AS p ON p.Id = v.PostId WHERE p.PostTypeId = 1 AND v.VoteTypeId = 2 AND v.CreationDate BETWEEN @startDate AND @endDate GROUP BY v.CreationDate ORDER BY v.CreationDate | sede |
CREATE TABLE gwyjzb (
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,
... | 按照不相同的科室编码和加入院诊断疾病名称这个原则挑选,得到在医院8629605所有医疗就诊记录中的患者们年龄的平均数为何? | SELECT gwyjzb.MED_ORG_DEPT_CD, gwyjzb.IN_DIAG_DIS_NM, AVG(gwyjzb.PERSON_AGE) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '8629605' GROUP BY gwyjzb.MED_ORG_DEPT_CD, gwyjzb.IN_DIAG_DIS_NM UNION SELECT fgwyjzb.MED_ORG_DEPT_CD, fgwyjzb.IN_DIAG_DIS_NM, AVG(fgwyjzb.PERSON_AGE) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '86296... | css |
CREATE TABLE table_20091 (
"Name" text,
"Position" text,
"Number" real,
"School/Club Team" text,
"Season" text,
"Acquisition via" text
) | What was the school/club team whose season was in 2012 and were acquired via trade? | SELECT "School/Club Team" FROM table_20091 WHERE "Season" = '2012' AND "Acquisition via" = 'Trade' | wikisql |
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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | count the number of patients whose admission type is elective and procedure icd9 code is 3972? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND procedures.icd9_code = "3972" | mimicsql_data |
CREATE TABLE Timed_Locations_of_Things (
thing_id INTEGER,
Date_and_Time DATETIME,
Location_Code CHAR(15)
)
CREATE TABLE Services (
service_id INTEGER,
organization_id INTEGER,
service_type_code CHAR(15),
service_details VARCHAR(255)
)
CREATE TABLE Customers (
customer_id INTEGER,
... | What is the proportion of each customer's move in date? Show me the bar chart, sort X from low to high order please. | SELECT date_moved_in, COUNT(date_moved_in) FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY date_moved_in ORDER BY date_moved_in | nvbench |
CREATE TABLE table_35492 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"School/Club Team" text
) | what is the school that hosts jim goodman | SELECT "School/Club Team" FROM table_35492 WHERE "Player" = 'jim goodman' | wikisql |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
... | All users with selected rep. | SELECT * FROM Users WHERE Reputation >= '##Reputation:Int##' ORDER BY Reputation DESC | sede |
CREATE TABLE problem_category_codes (
problem_category_code text,
problem_category_description text
)
CREATE TABLE problem_status_codes (
problem_status_code text,
problem_status_description text
)
CREATE TABLE product (
product_id number,
product_name text,
product_details text
)
CREATE ... | List the names of all the distinct product names in alphabetical order? | SELECT DISTINCT product_name FROM product ORDER BY product_name | spider |
CREATE TABLE table_name_98 (
race VARCHAR,
position VARCHAR
) | Whice race ended with a DNF? | SELECT race FROM table_name_98 WHERE position = "dnf" | sql_create_context |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40)... | Group and count the job id for all employees whose salary is smaller than any salary of those employees whose job title is MK_MAN for visualizing a bar chart, and could you rank by the y axis in ascending please? | SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE SALARY < (SELECT MIN(SALARY) FROM employees WHERE JOB_ID = 'MK_MAN') GROUP BY JOB_ID ORDER BY COUNT(JOB_ID) | nvbench |
CREATE TABLE table_name_57 (
gold INTEGER,
silver INTEGER
) | What is the highest number of gold medals when the silver is less than 0? | SELECT MAX(gold) FROM table_name_57 WHERE silver < 0 | sql_create_context |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
d... | how much does the cost of a candidiasis of lung diagnosis cost? | SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'diagnoses_icd' AND cost.event_id IN (SELECT diagnoses_icd.row_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'candidiasis of lung')) | mimic_iii |
CREATE TABLE table_14388 (
"City" text,
"Highest temperature recorded or forecast" text,
"Date achieved or projected" text,
"Normal temperature" text,
"Deviation from normal" text
) | What is the normal temperature of Abbotsford, British Columbia? | SELECT "Normal temperature" FROM table_14388 WHERE "City" = 'abbotsford, british columbia' | 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,
... | how many patients of hispanic or latino ethnicity are diagnosed with drug induced delirium? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "HISPANIC OR LATINO" AND diagnoses.long_title = "Drug-induced delirium" | mimicsql_data |
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... | 58160776号团伙成员最常去的医生排序是怎么排的? | SELECT qtb.OUT_DIAG_DOC_CD, qtb.OUT_DIAG_DOC_NM FROM qtb WHERE qtb.PERSON_ID = '58160776' GROUP BY qtb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC UNION SELECT gyb.OUT_DIAG_DOC_CD, gyb.OUT_DIAG_DOC_NM FROM gyb WHERE gyb.PERSON_ID = '58160776' GROUP BY gyb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC UNION SELECT zyb.OUT_DIAG_DOC_... | css |
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
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | how many days has it been since patient 25733 was last tested for bicarbonate during the current hospital visit? | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', labevents.charttime)) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'bicarbonate') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25733 AND admissi... | mimic_iii |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName te... | data% tag answer count (2014 - today). | SELECT t.TagName, SUM(q.AnswerCount) AS answCnt FROM Posts AS q INNER JOIN Posts AS a ON q.AcceptedAnswerId = a.Id INNER JOIN Users AS ua ON ua.Id = a.OwnerUserId INNER JOIN PostTags AS pt ON pt.PostId = q.Id INNER JOIN Tags AS t ON pt.TagId = t.Id WHERE q.Id != a.Id AND q.OwnerUserId != a.OwnerUserId AND q.CreationDat... | sede |
CREATE TABLE Assessment_Notes (
notes_id INTEGER,
student_id INTEGER,
teacher_id INTEGER,
date_of_notes DATETIME,
text_of_notes VARCHAR(255),
other_details VARCHAR(255)
)
CREATE TABLE Teachers (
teacher_id INTEGER,
address_id INTEGER,
first_name VARCHAR(80),
middle_name VARCHAR(... | Show me about the distribution of date_address_to and the amount of date_address_to , and group by attribute other_details and bin date_address_to by weekday in a bar chart. | SELECT date_address_to, COUNT(date_address_to) FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental DESC | nvbench |
CREATE TABLE table_48835 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) | When his record was 15 1 1 (1) where did he fight? | SELECT "Location" FROM table_48835 WHERE "Record" = '15–1–1 (1)' | 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 the number of patients aged below 83 years who had the drug code fent100t? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "83" AND prescriptions.formulary_drug_cd = "FENT100T" | mimicsql_data |
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... | 患者苗纳兰的住院就诊检验报告单中有哪些报告的日期是在18年9月28以前的?查询这些住院就诊的流水号 | SELECT zyjzjlb.JZLSH FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.person_info_XM = '苗纳兰' AND NOT zyjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2018-09-28') | css |
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 the available flights from BALTIMORE to DALLAS with economy fares | 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, fare_basis, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND fare_basis.economy = 'YES' AND fare.fare_basis... | atis |
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 ... | 把患者方宾鸿在医院9017572就诊的所有记录里出院科室名字不包括疼痛的住院记录列出来 | SELECT * FROM person_info JOIN hz_info JOIN zyjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_i... | css |
CREATE TABLE table_55526 (
"Team 1" text,
"Agg." text,
"Team 2" text,
"1st leg" text,
"2nd leg" text
) | What is the team 2 for team 1 of Valletta? | SELECT "Team 2" FROM table_55526 WHERE "Team 1" = 'valletta' | wikisql |
CREATE TABLE table_16241 (
"Province" text,
"Population (2004 estimate)" real,
"Area (km\u00b2)" real,
"Density" text,
"GDP (2003, PPS in mil. \u20ac )" real,
"GDP per cap. (2003, in \u20ac)" real
) | What is the population estimate for the place that gad a 18496 million euro gdp? | SELECT "Population (2004 estimate)" FROM table_16241 WHERE "GDP (2003, PPS in mil. \u20ac )" = '18496' | wikisql |
CREATE TABLE table_1723 (
"Player" text,
"League" real,
"Scottish Cup" real,
"League Cup" real,
"Challenge Cup" real,
"Total" real
) | Name the maximum leagure for 0 scottish cup | SELECT MAX("League") FROM table_1723 WHERE "Scottish Cup" = '0' | wikisql |
CREATE TABLE STUDENT (
STU_NUM int,
STU_LNAME varchar(15),
STU_FNAME varchar(15),
STU_INIT varchar(1),
STU_DOB datetime,
STU_HRS int,
STU_CLASS varchar(2),
STU_GPA float(8),
STU_TRANSFER numeric,
DEPT_CODE varchar(18),
STU_PHONE varchar(4),
PROF_NUM int
)
CREATE TABLE CL... | What are the total number of credits offered by each department. | SELECT DEPT_CODE, SUM(T1.CRS_CREDIT) FROM COURSE AS T1 JOIN CLASS AS T2 ON T1.CRS_CODE = T2.CRS_CODE GROUP BY T1.DEPT_CODE | nvbench |
CREATE TABLE table_name_78 (
year INTEGER,
college VARCHAR,
pick VARCHAR
) | What is the earliest year for Alabama with a pick under 26? | SELECT MIN(year) FROM table_name_78 WHERE college = "alabama" AND pick < 26 | sql_create_context |
CREATE TABLE table_23870 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Tar Heels points" real,
"Opponents" real,
"Record" text
) | What was the date when the record was 1-0? | SELECT "Date" FROM table_23870 WHERE "Record" = '1-0' | wikisql |
CREATE TABLE table_name_46 (
fac___lc_apps INTEGER,
fa_yc VARCHAR,
fac___lc_g VARCHAR,
cl_g VARCHAR,
pl_apps VARCHAR
) | What is the average FAC/LC apps with a CL G greater than 0, less than 33 PL apps, a FAC/LC G of 0, and less than 2 FA YC? | SELECT AVG(fac___lc_apps) FROM table_name_46 WHERE cl_g > 0 AND pl_apps < 33 AND fac___lc_g = 0 AND fa_yc < 2 | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.