context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_48904 (
"State" text,
"Preliminary" real,
"Interview" real,
"Swimsuit" real,
"Evening Gown" real,
"Average" real
) | What state has a swimsuit less than 9.277, gown more than 8.944 and preliminary greater than 8.483? | SELECT "State" FROM table_48904 WHERE "Swimsuit" < '9.277' AND "Evening Gown" > '8.944' AND "Preliminary" < '8.483' | wikisql |
CREATE TABLE table_45291 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the lowest number of Gold, when the number of Bronze is less than 36, when the Rank is 2, and when Silver is less than 37? | SELECT MIN("Gold") FROM table_45291 WHERE "Bronze" < '36' AND "Rank" = '2' AND "Silver" < '37' | wikisql |
CREATE TABLE table_name_63 (
tournament VARCHAR,
date VARCHAR
) | What tournament was played 16 September 2012? | SELECT tournament FROM table_name_63 WHERE date = "16 september 2012" | sql_create_context |
CREATE TABLE Behavior_Incident (
incident_id INTEGER,
incident_type_code VARCHAR(10),
student_id INTEGER,
date_incident_start DATETIME,
date_incident_end DATETIME,
incident_summary VARCHAR(255),
recommendations VARCHAR(255),
other_details VARCHAR(255)
)
CREATE TABLE Addresses (
addr... | What are the number of the dates of the assessment notes?, list y-axis in asc order. | SELECT date_of_notes, COUNT(date_of_notes) FROM Assessment_Notes ORDER BY COUNT(date_of_notes) | nvbench |
CREATE TABLE table_57236 (
"Place" real,
"Name" text,
"From" real,
"Until" real,
"Titles" real,
"Seconds" text,
"Thirds" text
) | What place did R. Wenzel, who was active after 1934, have? | SELECT SUM("Place") FROM table_57236 WHERE "Name" = 'r. wenzel' AND "Until" > '1934' | wikisql |
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE fare (
fare... | what airline uses the code HP | SELECT DISTINCT airline_code FROM airline WHERE airline_code = 'HP' | atis |
CREATE TABLE table_29467 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text
) | What was the manner of departure for the manager of Cercle Brugge? | SELECT "Manner of departure" FROM table_29467 WHERE "Team" = 'Cercle Brugge' | wikisql |
CREATE TABLE table_6060 (
"Wicket" text,
"Score" real,
"Batting partners" text,
"Opposition" text,
"Venue" text,
"City" text,
"Year" real
) | In what Wicket in the City of Eastbourne with a Score of less than 368? | SELECT "Wicket" FROM table_6060 WHERE "Score" < '368' AND "City" = 'eastbourne' | wikisql |
CREATE TABLE table_name_76 (
result VARCHAR,
round VARCHAR,
opponent VARCHAR
) | what is the result when the round is less than 7 and the opponent is melbourne storm? | SELECT result FROM table_name_76 WHERE round < 7 AND opponent = "melbourne storm" | sql_create_context |
CREATE TABLE table_25129482_1 (
manager VARCHAR,
kitmaker VARCHAR,
location VARCHAR
) | How many managers for club in Turku where kitmaker is Puma? | SELECT COUNT(manager) FROM table_25129482_1 WHERE kitmaker = "Puma" AND location = "Turku" | sql_create_context |
CREATE TABLE table_34574 (
"Country name" text,
"Russian name" text,
"Cyrillic code" text,
"Latin 3-letter code" text,
"Latin 2-letter code" text,
"Numeric code" real
) | What is the Russian name with lbr as the Latin 3-letter code? | SELECT "Russian name" FROM table_34574 WHERE "Latin 3-letter code" = 'lbr' | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | count the number of patients whose days of hospital stay is greater than 1 and diagnoses icd9 code is 4280? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "1" AND diagnoses.icd9_code = "4280" | mimicsql_data |
CREATE TABLE table_name_71 (
week INTEGER,
attendance VARCHAR
) | Which Week has Attendance of 51,558? | SELECT MIN(week) FROM table_name_71 WHERE attendance = 51 OFFSET 558 | sql_create_context |
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time... | round trip fares NEW YORK to SAN JOSE | 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 = 'NEW YORK' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.cit... | atis |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
... | what procedure did patient 70709 receive the first time since 1 year ago. | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT procedures_icd.icd9_code FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 70709) AND DATETIME(procedures_icd.charttime) >= DATETIME(CURRENT_TI... | mimic_iii |
CREATE TABLE table_49310 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Tyres" text,
"Points" text
) | Which entrant has 49 points and a Mclaren M7A chassis? | SELECT "Entrant" FROM table_49310 WHERE "Points" = '49' AND "Chassis" = 'mclaren m7a' | wikisql |
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 (
... | what drug was prescribed to patient 013-27480 in the same day after the antibiotics - macrolide procedure when they came to the hospital first time? | SELECT t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-27480' AND NOT patient.hospit... | eicu |
CREATE TABLE artist (
Artist_ID int,
Artist text,
Age int,
Famous_Title text,
Famous_Release_date text
)
CREATE TABLE music_festival (
ID int,
Music_Festival text,
Date_of_ceremony text,
Category text,
Volume int,
Result text
)
CREATE TABLE volume (
Volume_ID int,
V... | A bar chart for returning the number of the categories of music festivals that have the result 'Awarded', and rank Category in descending order please. | SELECT Category, COUNT(Category) FROM music_festival WHERE Result = "Awarded" GROUP BY Category ORDER BY Category DESC | nvbench |
CREATE TABLE table_name_78 (
software VARCHAR,
cost___usd__ VARCHAR,
latest_stable_date__version_ VARCHAR
) | What is the free sotware with the latest stable date version of 1.1? | SELECT software FROM table_name_78 WHERE cost___usd__ = "free" AND latest_stable_date__version_ = "1.1" | sql_create_context |
CREATE TABLE table_1507852_5 (
bubbles VARCHAR,
category VARCHAR
) | how many bubbles with category being input | SELECT COUNT(bubbles) FROM table_1507852_5 WHERE category = "Input" | 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,
... | how many patients are born before 2053 and tested in lab with item id 51383? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2053" AND lab.itemid = "51383" | mimicsql_data |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,... | 沈元纬这个病人做的脸部检验的各项指标结果如何 | SELECT * 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.JZLSH_MZJZJLB AND jybgb.YLJGDM = jy... | css |
CREATE TABLE Behavior_Incident (
incident_id INTEGER,
incident_type_code VARCHAR(10),
student_id INTEGER,
date_incident_start DATETIME,
date_incident_end DATETIME,
incident_summary VARCHAR(255),
recommendations VARCHAR(255),
other_details VARCHAR(255)
)
CREATE TABLE Detention (
dete... | A line chart for what are the number of the dates of the assessment notes?, and sort by the x-axis from high to low please. | SELECT date_of_notes, COUNT(date_of_notes) FROM Assessment_Notes ORDER BY date_of_notes DESC | nvbench |
CREATE TABLE table_name_21 (
year VARCHAR,
venue VARCHAR,
result VARCHAR
) | How many years did the team place 2nd in Antwerp, Belgium? | SELECT COUNT(year) FROM table_name_21 WHERE venue = "antwerp, belgium" AND result = "2nd" | sql_create_context |
CREATE TABLE table_17493 (
"Subjects" text,
"First Year" text,
"Second Year" text,
"Third Year" text,
"Fourth Year" text
) | What is the first year course in the program where geometry is taken in the third year? | SELECT "First Year" FROM table_17493 WHERE "Third Year" = 'Geometry' | wikisql |
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE cours... | I 'd like to take a 400 -level course , but do n't want to do a lab , what are my options ? | SELECT DISTINCT name, number FROM course WHERE department = 'EECS' AND has_lab = 'N' AND number < 400 + 100 AND number >= 400 | advising |
CREATE TABLE table_name_80 (
country VARCHAR,
lane VARCHAR,
react VARCHAR
) | What is Country, when Lane is 5, and when React is greater than 0.166? | SELECT country FROM table_name_80 WHERE lane = 5 AND react > 0.166 | 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... | 门诊诊断为患者15378011患有疾病Q04.549的的检测指标342222的结果定量和其单位都是啥? | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM... | css |
CREATE TABLE table_18540104_1 (
episodes INTEGER
) | What is maximum number of episodes for a show? | SELECT MAX(episodes) FROM table_18540104_1 | sql_create_context |
CREATE TABLE table_55176 (
"Year" real,
"Event" text,
"Record" text,
"Athlete" text,
"Nationality" text
) | How many years was the record 3:40.8? | SELECT COUNT("Year") FROM table_55176 WHERE "Record" = '3:40.8' | wikisql |
CREATE TABLE Addresses (
address_id INTEGER,
line_1_number_building VARCHAR(80),
city VARCHAR(50),
zip_postcode VARCHAR(20),
state_province_county VARCHAR(50),
country VARCHAR(50)
)
CREATE TABLE Order_Items (
order_item_id INTEGER,
order_id INTEGER,
product_id INTEGER,
order_qua... | Show the number of addrens history for each customer in a bar chart, and display y-axis in desc order. | SELECT T2.customer_name, COUNT(T2.customer_name) FROM Customer_Address_History AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id JOIN Addresses AS T3 ON T1.address_id = T3.address_id GROUP BY T2.customer_name ORDER BY COUNT(T2.customer_name) DESC | nvbench |
CREATE TABLE characteristics (
characteristic_id number,
characteristic_type_code text,
characteristic_data_type text,
characteristic_name text,
other_characteristic_details text
)
CREATE TABLE ref_colors (
color_code text,
color_description text
)
CREATE TABLE ref_product_categories (
... | Return the names of products in the category 'Spices'. | SELECT product_name FROM products WHERE product_category_code = "Spices" | spider |
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
... | Low quality answers with high length. | SELECT Id AS "post_link", OwnerUserId AS "user_name", Score AS "score", LENGTH(Body) AS "length", Score * LENGTH(Body) AS "weighted" FROM Posts WHERE PostTypeId = 2 AND LENGTH(Body) >= 15000 AND Score <= 25 AND CommunityOwnedDate IS NULL ORDER BY 'weighted' DESC LIMIT 1000 | sede |
CREATE TABLE table_35063 (
"Team" text,
"Chassis" text,
"Engine" text,
"Tires" text,
"Drivers" text,
"Sponsor" text
) | what is the sponsor of motorola | SELECT "Team" FROM table_35063 WHERE "Sponsor" = 'motorola' | wikisql |
CREATE TABLE table_5456 (
"s Car plate (starting 1937)" text,
"Voivodeship or city" text,
"Capital" text,
"Area (1930) in 1,000skm 2" text,
"Population (1931) in 1,000s" text
) | Voivodeship or city of nowogr dzkie has what capital? | SELECT "Capital" FROM table_5456 WHERE "Voivodeship or city" = 'nowogródzkie' | wikisql |
CREATE TABLE table_name_95 (
year INTEGER,
competition VARCHAR,
waterford_score VARCHAR
) | What is the lowest year that has all-ireland hurling final as the competition, and 6-08 (24) as the waterford score? | SELECT MIN(year) FROM table_name_95 WHERE competition = "all-ireland hurling final" AND waterford_score = "6-08 (24)" | sql_create_context |
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 date of birth of Jane Dillard? | SELECT demographic.dob FROM demographic WHERE demographic.name = "Jane Dillard" | 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 diagnoses (
... | what is the number of patients whose admission type is urgent and admission year is less than 2184? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "URGENT" AND demographic.admityear < "2184" | mimicsql_data |
CREATE TABLE table_3038 (
"Character" text,
"Original Berkeley Cast" text,
"Original Broadway Cast" text,
"Original 1st US Tour Cast" text,
"Original UK Cast" text,
"Original Tokyo / Seoul Tour Cast" text,
"Original 3rd US Tour Cast" text
) | While the original 1st us tour cast included nicci claspell, who was in the original tokyo/seoul tour cast? | SELECT "Original Tokyo / Seoul Tour Cast" FROM table_3038 WHERE "Original 1st US Tour Cast" = 'Nicci Claspell' | wikisql |
CREATE TABLE table_name_27 (
state VARCHAR,
host VARCHAR
) | Which state is University of Tennessee based in? | SELECT state FROM table_name_27 WHERE host = "university of tennessee" | sql_create_context |
CREATE TABLE table_name_97 (
result VARCHAR,
attendance VARCHAR
) | Which stadium can hold 63,443 people? | SELECT result FROM table_name_97 WHERE attendance = "63,443" | sql_create_context |
CREATE TABLE table_65949 (
"Rank" real,
"Athlete" text,
"Country" text,
"Time" text,
"Notes" text
) | What rank was Lassi Karonen? | SELECT COUNT("Rank") FROM table_65949 WHERE "Athlete" = 'lassi karonen' | wikisql |
CREATE TABLE table_name_45 (
pick__number INTEGER,
name VARCHAR
) | What is the lowest pick number of John Scully? | SELECT MIN(pick__number) FROM table_name_45 WHERE name = "john scully" | sql_create_context |
CREATE TABLE table_16654785_2 (
average_climb___percentage_ VARCHAR,
length__m_ VARCHAR
) | How many have a length of 375? | SELECT COUNT(average_climb___percentage_) FROM table_16654785_2 WHERE length__m_ = 375 | sql_create_context |
CREATE TABLE table_name_74 (
away_team VARCHAR,
crowd INTEGER
) | When the crowd was bigger than 26,063, who was the Away team? | SELECT away_team FROM table_name_74 WHERE crowd > 26 OFFSET 063 | sql_create_context |
CREATE TABLE Drama_Workshop_Groups (
Workshop_Group_ID INTEGER,
Address_ID INTEGER,
Currency_Code CHAR(15),
Marketing_Region_Code CHAR(15),
Store_Name VARCHAR(255),
Store_Phone VARCHAR(255),
Store_Email_Address VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Customers (
Cust... | Show all the planned delivery dates and bin by weekday in a bar chart, and list by the Y from low to high. | SELECT Planned_Delivery_Date, COUNT(Planned_Delivery_Date) FROM Bookings ORDER BY COUNT(Planned_Delivery_Date) | nvbench |
CREATE TABLE table_80192 (
"City" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
) | Which city has the IATA SSG? | SELECT "City" FROM table_80192 WHERE "IATA" = 'ssg' | wikisql |
CREATE TABLE table_name_71 (
lost INTEGER,
against VARCHAR,
played VARCHAR,
team VARCHAR
) | What is the Lowest lost for Team Ypiranga-SP where the games Played is more than 10 and the goals Against is greater than 50? | SELECT MIN(lost) FROM table_name_71 WHERE played > 10 AND team = "ypiranga-sp" AND against > 50 | sql_create_context |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | Number of created accounts per week. | SELECT (TIME_TO_STR(CreationDate, '%y') + (TIME_TO_STR(CreationDate, '%W') - 1) / 52.0) AS YR_WK, COUNT(*) AS c FROM Users GROUP BY (TIME_TO_STR(CreationDate, '%y') + (TIME_TO_STR(CreationDate, '%W') - 1) / 52.0) ORDER BY (TIME_TO_STR(CreationDate, '%y') + (TIME_TO_STR(CreationDate, '%W') - 1) / 52.0) | sede |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (... | how many hours has it been since patient 015-23047 has been admitted to the icu? | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '015-23047' AND patient.unitdischargetime IS NULL | eicu |
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 allergy (
allergy... | since 2103, has patient 006-251537 been given any diagnosis? | SELECT COUNT(*) > 0 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-251537')) AND STRFTIME('%y', diagnosis.diagnosistime) >= '2103' | eicu |
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... | 从一四年八月十日到二一年十一月二十三日的这几年里,共有多少患者在医疗机构4098597的住院时长超过27天 | SELECT COUNT(*) FROM zyjzjlb JOIN hz_info_zyjzjlb JOIN hz_info ON hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.zyjzjlb_id = zyjzjlb.zyjzjlb_id AND hz_info_zyjzjlb.YLJGDM = hz_info.YLJGDM WHERE hz_info.YLJGDM = '40... | css |
CREATE TABLE Reviewer (
rID int,
name text
)
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
) | A bar chart for what are the number of the titles of all movies that have between 3 and 5 stars?, and list X-axis in asc order please. | SELECT title, COUNT(title) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5 GROUP BY title ORDER BY title | nvbench |
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... | 往日患者92882146有过什么异常情况? | SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN person_info_hz_info JOIN person_info 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.... | css |
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 ... | 这张编号为68651052326的检验报告单其开出的科室编码以及名称都是啥? | SELECT zyjybgb.KSBM, zyjybgb.KSMC FROM zyjybgb WHERE zyjybgb.BGDH = '68651052326' UNION SELECT mzjybgb.KSBM, mzjybgb.KSMC FROM mzjybgb WHERE mzjybgb.BGDH = '68651052326' | css |
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 prescriptions... | find the gender of subject id 2560. | SELECT demographic.gender FROM demographic WHERE demographic.subject_id = "2560" | mimicsql_data |
CREATE TABLE Customers (
customer_id INTEGER,
customer_first_name VARCHAR(20),
customer_last_name VARCHAR(20),
customer_address VARCHAR(255),
customer_phone VARCHAR(255),
customer_email VARCHAR(255),
other_customer_details VARCHAR(255)
)
CREATE TABLE Financial_Transactions (
transaction... | Show the transaction type and the number of transactions Plot them as bar chart, show from low to high by the the total number . | SELECT transaction_type, COUNT(*) FROM Financial_Transactions GROUP BY transaction_type ORDER BY COUNT(*) | nvbench |
CREATE TABLE Bookings (
Booking_ID INTEGER,
Customer_ID INTEGER,
Workshop_Group_ID VARCHAR(100),
Status_Code CHAR(15),
Store_ID INTEGER,
Order_Date DATETIME,
Planned_Delivery_Date DATETIME,
Actual_Delivery_Date DATETIME,
Other_Order_Details VARCHAR(255)
)
CREATE TABLE Clients (
... | A bar chart for what are the number of the names of the workshop groups that have bookings with status code 'stop'? | SELECT Store_Name, COUNT(Store_Name) FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T1.Status_Code = "stop" GROUP BY Store_Name | nvbench |
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, find email and salary , and visualize them by a bar chart, rank total number in descending order. | SELECT EMAIL, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SALARY DESC | nvbench |
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,
... | when did patient 011-29258 last receive his or her bedside glucose lab test until 52 months ago? | 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 = '011-29258')) AND lab.labname = 'bedside glucose' AND DATETIME(lab.labresulttime) <=... | eicu |
CREATE TABLE table_51598 (
"Block A" text,
"Kaz Hayashi" text,
"Ryuji Hijikata" text,
"TAKA Michinoku" text,
"\"brother\" YASSHI" text
) | Tell me the Ryuji Hijikata for Block A of Ryuji Hijikata | SELECT "Ryuji Hijikata" FROM table_51598 WHERE "Block A" = 'ryuji hijikata' | wikisql |
CREATE TABLE ftxmzjzjlb (
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,
MZZYZD... | 名字叫做王子安的患者在医院6839787期间门诊所诊断出名称不包含肾结石的门诊诊察记录一共是哪几条? | SELECT * FROM person_info JOIN hz_info JOIN txmzjzjlb 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 WHERE person_info.XM = '王子安' AND hz_info.YLJGDM = '6839787' AND NOT txmzjzjlb.JZZDSM LIKE '%肾结石%' UNION SELECT * FROM person_info J... | css |
CREATE TABLE table_73297 (
"Team name" text,
"Races" real,
"Won" real,
"RR1 Pts." real,
"RR2 Pts." real,
"RR3 Pts." real,
"Total Pts." real,
"Ranking" real
) | Name the most rr1 pts for 7 ranking | SELECT MAX("RR1 Pts.") FROM table_73297 WHERE "Ranking" = '7' | wikisql |
CREATE TABLE table_58038 (
"Number" real,
"Chapter" text,
"Installation Date" text,
"Location" text,
"Status" text
) | What chapter is located in Normal, Illinois? | SELECT "Chapter" FROM table_58038 WHERE "Location" = 'normal, illinois' | wikisql |
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... | give me the number of patients whose age is less than 49 and admission year is less than 2198? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "49" AND demographic.admityear < "2198" | mimicsql_data |
CREATE TABLE table_41552 (
"Year" real,
"Circuit" text,
"Winning drivers" text,
"Winning constructor" text,
"Regulations" text,
"Report" text
) | What regulations have hudson as the winning constructor? | SELECT "Regulations" FROM table_41552 WHERE "Winning constructor" = 'hudson' | 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_DIRE_CD text,
MED_DIRE_NM text,... | 在6110632这家医院所有医疗的就诊记录里,计算不同科室编码下统筹基金和全部医疗费的平均比 | SELECT t_kc21.MED_ORG_DEPT_CD, AVG(t_kc24.OVE_PAY) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '6110632' GROUP BY t_kc21.MED_ORG_DEPT_CD | css |
CREATE TABLE table_25779 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | How many values for high assists when the game is 81? | SELECT COUNT("High assists") FROM table_25779 WHERE "Game" = '81' | wikisql |
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... | 患者27615170在13年4月2日到21年3月6日内被开出的所有检验报告单的科室编码以及名称都是什么? | SELECT jybgb.KSBM, jybgb.KSMC FROM hz_info JOIN txmzjzjlb JOIN jybgb ON 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.JZLSH_MZJZJLB WHERE hz_info.RYBH = '27615170' AND jybgb.BGRQ BETWEEN '2013-04-02... | css |
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... | what is the admission location and diagnosis icd9 code of subject id 29961? | SELECT demographic.admission_location, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "29961" | mimicsql_data |
CREATE TABLE table_name_83 (
national_final_main_host VARCHAR,
semi_final_heat_host VARCHAR,
year_s_ VARCHAR
) | What is the name of the national final main host when the semi final/heat host shows internal selection in 2011? | SELECT national_final_main_host FROM table_name_83 WHERE semi_final_heat_host = "internal selection" AND year_s_ = "2011" | sql_create_context |
CREATE TABLE table_30421 (
"Series" text,
"Seasons" real,
"Races" real,
"Poles" real,
"Wins" real,
"Podiums (Non-win)" real,
"Point Finishes (Non-podium)" real,
"Teams" real,
"Total Points" real,
"Championships" real,
"Best Finish (Championship)" text
) | What's the most amount of point finishes for v8supercar? | SELECT MAX("Point Finishes (Non-podium)") FROM table_30421 WHERE "Series" = 'V8Supercar' | wikisql |
CREATE TABLE table_name_85 (
assist_pass VARCHAR,
score VARCHAR,
goal VARCHAR
) | Which Assist/pass has a Score of 1-0, and a Goal of 5? | SELECT assist_pass FROM table_name_85 WHERE score = "1-0" AND goal = "5" | sql_create_context |
CREATE TABLE table_name_22 (
callsign VARCHAR,
location VARCHAR
) | What's the callsign in Tacloban? | SELECT callsign FROM table_name_22 WHERE location = "tacloban" | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | how old is the patient named stephanie suchan? | SELECT demographic.age FROM demographic WHERE demographic.name = "Stephanie Suchan" | mimicsql_data |
CREATE TABLE table_15576 (
"Date" text,
"Visiting Team" text,
"Final Score" text,
"Host Team" text,
"Stadium" text
) | Which host team played against the New England Patriots? | SELECT "Host Team" FROM table_15576 WHERE "Visiting Team" = 'new england patriots' | wikisql |
CREATE TABLE table_58740 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Results" text
) | What is First Elected, when District is 'Minnesota 2'? | SELECT "First elected" FROM table_58740 WHERE "District" = 'minnesota 2' | wikisql |
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number... | JavaScript snippet tags that probably shouldn't be there. | SELECT Title, Tags, Id AS "post_link", Score, ViewCount FROM Posts WHERE PostTypeId = 1 AND Score = 0 AND NOT Tags LIKE '%javascript%' AND Body LIKE '%begin snippet: js hide: false%' | sede |
CREATE TABLE table_name_65 (
year VARCHAR,
engine VARCHAR
) | Name the total number of years for brm straight-4 | SELECT COUNT(year) FROM table_name_65 WHERE engine = "brm straight-4" | sql_create_context |
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar... | How many time a week does the class meet for MUSTHTRE 141 ? | SELECT DISTINCT course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_i... | advising |
CREATE TABLE table_name_63 (
home_venue VARCHAR,
state VARCHAR,
city VARCHAR
) | Which team plays in Goa, Salcette? | SELECT home_venue FROM table_name_63 WHERE state = "goa" AND city = "salcette" | sql_create_context |
CREATE TABLE table_21312 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location/Attendance" text,
"Record" text
) | Namethe score for july 16 | SELECT "Score" FROM table_21312 WHERE "Date" = 'July 16' | wikisql |
CREATE TABLE table_name_34 (
state VARCHAR,
reason_for_termination VARCHAR,
active_service VARCHAR
) | Which state has a Reason for termination of retirement, and an Active service of 1926 1928? | SELECT state FROM table_name_34 WHERE reason_for_termination = "retirement" AND active_service = "1926–1928" | sql_create_context |
CREATE TABLE claims_documents (
claim_id number,
document_type_code text,
created_by_staff_id number,
created_date number
)
CREATE TABLE claims_processing (
claim_processing_id number,
claim_id number,
claim_outcome_code text,
claim_stage_id number,
staff_id number
)
CREATE TABLE s... | How many distinct claim outcome codes are there? | SELECT COUNT(DISTINCT claim_outcome_code) FROM claims_processing | spider |
CREATE TABLE table_34962 (
"Eruptions" text,
"Country" text,
"Location" text,
"Year" real,
"Volcanic Explosivity Index" text,
"Fatalities" text
) | How many fatalities does Italy have? | SELECT "Fatalities" FROM table_34962 WHERE "Country" = 'italy' | wikisql |
CREATE TABLE table_name_46 (
japanese_name VARCHAR,
korean_name VARCHAR
) | What is the Japanese name of the Province with a Korean name of Chungcheong-Bukdo? | SELECT japanese_name FROM table_name_46 WHERE korean_name = "chungcheong-bukdo" | sql_create_context |
CREATE TABLE table_23406517_2 (
bearing___degrees VARCHAR
) | How many values for 24 mountains when the bearing or degrees is 67.6 - 82.5 82.6 - 97.5 97.6 - 112.5? | SELECT COUNT(24 AS _mountains) FROM table_23406517_2 WHERE bearing___degrees = "67.6 - 82.5 82.6 - 97.5 97.6 - 112.5" | sql_create_context |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | For those records from the products and each product's manufacturer, a scatter chart shows the correlation between code and price , and group by attribute name. | SELECT T1.Code, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Name | nvbench |
CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
CREATE TABLE Apartment_Bookings (
apt_booking_id INTEGER,
apt_id INTEGER,
guest_id INTEGER,
booking_status_code CHAR(15),
booking_start_date DATETIME,
booking_end_date DATETIME
)
CREATE TABLE Guests (
gues... | What is the number of booking start dates of the apartments with more than 2 bedrooms for each year? Return a bar chart. | SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2 | nvbench |
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 ... | 名字叫郎高义的病患他的身高和体重都是多少? | SELECT mzjzjlb.SG, mzjzjlb.TZ FROM person_info JOIN hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND 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.YL... | css |
CREATE TABLE table_15893020_2 (
average VARCHAR
) | What is the highest number of 5w when there was a 21.33 average? | SELECT MAX(5 AS w) FROM table_15893020_2 WHERE average = "21.33" | sql_create_context |
CREATE TABLE table_204_577 (
id number,
"name" text,
"first operational" text,
"numeral system" text,
"computing mechanism" text,
"programming" text,
"turing complete" text
) | what operational date is next to zuse z3 ? | SELECT "first operational" FROM table_204_577 WHERE "name" = 'zuse z3' | squall |
CREATE TABLE table_23292220_3 (
first_broadcast VARCHAR,
seans_team VARCHAR
) | What was the first broadcast date of the episode in which Sean's team is made up of Peter Serafinowicz and Johnny Vegas? | SELECT first_broadcast FROM table_23292220_3 WHERE seans_team = "Peter Serafinowicz and Johnny Vegas" | sql_create_context |
CREATE TABLE table_name_41 (
company VARCHAR,
revenues__us$_billion_ VARCHAR,
rank VARCHAR,
market_value__us$_billion_ VARCHAR,
assets__us$_billion_ VARCHAR
) | Which company has a market value greater than 1, Assets (US$ billion) smaller than 10.7, a Rank smaller than 10, and revenue (US$ billion) of 9.3? | SELECT company FROM table_name_41 WHERE market_value__us$_billion_ > 1 AND assets__us$_billion_ < 10.7 AND rank < 10 AND revenues__us$_billion_ = 9.3 | sql_create_context |
CREATE TABLE table_57896 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Record" text
) | What is the Record with a Score with 80 87, and a Visitor with bucks? | SELECT "Record" FROM table_57896 WHERE "Score" = '80–87' AND "Visitor" = 'bucks' | wikisql |
CREATE TABLE table_name_43 (
round VARCHAR,
race VARCHAR
) | What shows for round when the race was Int. Adac Preis Von Zweibr cken? | SELECT round FROM table_name_43 WHERE race = "int. adac preis von zweibrücken" | sql_create_context |
CREATE TABLE table_1815 (
"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
) | What was the title of the episode that had 13.82 million U.S. viewers? | SELECT "Title" FROM table_1815 WHERE "U.S. viewers (millions)" = '13.82' | wikisql |
CREATE TABLE table_name_31 (
wasatch VARCHAR,
total_time VARCHAR
) | What Wasatch time corresponds to a total time of 122:13:40? | SELECT wasatch FROM table_name_31 WHERE total_time = "122:13:40" | 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,
... | 请提供云秀美这位病患从17.9.12起,截止到20.12.29期间就诊医生数 | SELECT COUNT(wdmzjzjlb.ZZYSGH) FROM person_info JOIN hz_info JOIN wdmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE person_info.XM = '云秀美' AND wdmzjzjlb.JZKSRQ BETWEEN '2017-09-12' AND '2020-12-29' UNION SELECT COUNT(bd... | css |
CREATE TABLE table_23031 (
"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
) | Name the original air date for 15.74 viewers | SELECT "Original air date" FROM table_23031 WHERE "U.S. viewers (millions)" = '15.74' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.