context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
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... | 编号为85512169的参保人年门诊医疗费一共多少钱? | SELECT SUM(mzb.MED_CLINIC_ID) FROM mzb WHERE mzb.PERSON_NM = '85512169' | css |
CREATE TABLE table_name_59 (
league VARCHAR,
manager VARCHAR
) | Manager of lyman lamb / marty berghammer is in what league? | SELECT league FROM table_name_59 WHERE manager = "lyman lamb / marty berghammer" | sql_create_context |
CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
Budget_Type_Code CHAR(15),
Document_Details VARCHAR(255)
)
CREATE TABLE Statements (
Statement_ID INTEGER,
Statement_Details VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE A... | Show all statement id and the number of accounts for each statement in a scatter chart | SELECT Statement_ID, COUNT(*) FROM Accounts GROUP BY Statement_ID | nvbench |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE zyjzjlb_jybgb (
YLJGDM_ZYJZJLB text,
BGDH number,
YLJGDM number
)
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC te... | 检验报告单14839053409的标本采集部位是什么部分? | SELECT jybgb.BBCJBW FROM jybgb WHERE jybgb.BGDH = '14839053409' | css |
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,... | 自零六年六月七日起,截止到零八年二月六日,病患水悦心在医院住过几次 | SELECT COUNT(*) FROM t_kc21 WHERE PERSON_NM = '水悦心' AND IN_HOSP_DATE BETWEEN '2006-06-07' AND '2008-02-06' AND CLINIC_TYPE = '住院' | css |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime t... | has patient 035-11300 been prescribed a drug during this year? | 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 = '035-11300')) AND DATETIME(medication.drugstarttime, 'start of year') = DAT... | eicu |
CREATE TABLE table_66091 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" text
) | What is the lane total when rank is 2? | SELECT SUM("Lane") FROM table_66091 WHERE "Rank" = '2' | wikisql |
CREATE TABLE table_31878 (
"Played in" text,
"Matches" text,
"Lost" text,
"Drawn" text,
"Points for" text,
"Points against" text
) | How many against points for 16 matches? | SELECT "Points against" FROM table_31878 WHERE "Matches" = '16' | wikisql |
CREATE TABLE table_name_22 (
moving_to VARCHAR,
country VARCHAR
) | Name the moving to for fra | SELECT moving_to FROM table_name_22 WHERE country = "fra" | sql_create_context |
CREATE TABLE table_3874 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | What is every team with location attendance of Philips Arena 12,140? | SELECT "Team" FROM table_3874 WHERE "Location Attendance" = 'Philips Arena 12,140' | wikisql |
CREATE TABLE table_name_59 (
country VARCHAR,
prize VARCHAR,
director_s_ VARCHAR
) | Which country did the Director(s) of kota nagaoka come from and win 300,000? | SELECT country FROM table_name_59 WHERE prize = "¥300,000" AND director_s_ = "kota nagaoka" | sql_create_context |
CREATE TABLE table_name_30 (
place VARCHAR,
score VARCHAR,
player VARCHAR
) | WHAT IS THE PLACE THAT HAS SCORE OF 65 OR BETTER, FOR ROCCO MEDIATE? | SELECT place FROM table_name_30 WHERE score > 65 AND player = "rocco mediate" | sql_create_context |
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name te... | Breakdown of answers by score. | SELECT Score, COUNT(Id) FROM Posts WHERE PostTypeId = 2 AND OwnerUserId = '##uid?28111##' GROUP BY Score ORDER BY Score DESC | sede |
CREATE TABLE table_name_14 (
year INTEGER,
engine VARCHAR,
entrant VARCHAR
) | For engines of Maserati Straight-6 and entrants of H H Gould, what is the latest year? | SELECT MAX(year) FROM table_name_14 WHERE engine = "maserati straight-6" AND entrant = "h h gould" | sql_create_context |
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 prescription... | how many patients posses self pay insurance and were diagnosed with blood in stool? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Self Pay" AND diagnoses.long_title = "Blood in stool" | mimicsql_data |
CREATE TABLE table_42386 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the smallest total number of medals for rank 11 and more than 0 silver medals? | SELECT MIN("Total") FROM table_42386 WHERE "Rank" = '11' AND "Silver" > '0' | wikisql |
CREATE TABLE table_name_38 (
attendance INTEGER,
time VARCHAR
) | What is the attendance amount of the race with a time of 2:07? | SELECT MAX(attendance) FROM table_name_38 WHERE time = "2:07" | sql_create_context |
CREATE TABLE table_name_12 (
gold INTEGER,
bronze VARCHAR,
total VARCHAR,
silver VARCHAR,
rank VARCHAR
) | How many golds had a silver of more than 1, rank more than 1, total of more than 4 when the bronze was also more than 4? | SELECT SUM(gold) FROM table_name_12 WHERE silver > 1 AND rank > 1 AND total > 4 AND bronze > 4 | sql_create_context |
CREATE TABLE table_70513 (
"Call sign" text,
"Frequency MHz" real,
"City of license" text,
"ERP W" real,
"Height m ( ft )" text,
"Class" text,
"FCC info" text
) | What's the sum of ERP W with a Frequency MHz that larger than 97.7? | SELECT COUNT("ERP W") FROM table_70513 WHERE "Frequency MHz" > '97.7' | wikisql |
CREATE TABLE table_33595 (
"Rank" real,
"Heat" real,
"Lane" real,
"Name" text,
"Nationality" text
) | How many heats had 5 lanes and a rank less than 110 for the nationality of Honduras? | SELECT COUNT("Heat") FROM table_33595 WHERE "Lane" = '5' AND "Rank" > '110' AND "Nationality" = 'honduras' | wikisql |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decima... | For all employees who have the letters D or S in their first name, show me the trend about employee_id over hire_date with a line chart. | SELECT HIRE_DATE, EMPLOYEE_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' | nvbench |
CREATE TABLE table_23235679_1 (
written_by VARCHAR,
directed_by VARCHAR
) | Name who wrote the episode directed by pam cooke & jansen yee | SELECT written_by FROM table_23235679_1 WHERE directed_by = "Pam Cooke & Jansen Yee" | sql_create_context |
CREATE TABLE table_66611 (
"School" text,
"Location" text,
"Mascot" text,
"Enrollment" real,
"IHSAA Class" text,
"County" text
) | Which Location has an Enrollment larger than 543? | SELECT "Location" FROM table_66611 WHERE "Enrollment" > '543' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
... | what is insurance and death status of subject id 8990? | SELECT demographic.insurance, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "8990" | mimicsql_data |
CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15),
Workshop_Group_ID INTEGER,
Product_Description VARCHAR(255),
Product_Name VARCHAR(255),
Product_Price DECIMAL(20,4),
Other_Product_Service_Details VARCHAR(255)
)
CREATE TABLE Clients (
Client_ID INTEGER,
Address... | Show all cities along with the number of drama workshop groups in each city with a bar chart, and rank by the X in ascending. | SELECT City_Town, COUNT(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID GROUP BY T1.City_Town ORDER BY City_Town | nvbench |
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
ins... | Who is scheduled to teach MACROMOL 517 ? | SELECT DISTINCT instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'MACROMOL' AND course.number = 517 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offeri... | advising |
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 whose first name does not contain the letter M, give me a line chart to show the hire date and the corresponding salaries, and sort x-axis in asc order. | SELECT HIRE_DATE, SALARY FROM employees WHERE NOT FIRST_NAME LIKE '%M%' ORDER BY HIRE_DATE | nvbench |
CREATE TABLE table_18916 (
"Country" text,
"Currency name" text,
"Month with highest inflation rate" text,
"Highest monthly inflation rate" text,
"Equivalent daily inflation rate" text,
"Time required for prices to double" text
) | what's the currency name with highest monthly inflation rate being 29,500% | SELECT "Currency name" FROM table_18916 WHERE "Highest monthly inflation rate" = '29,500%' | wikisql |
CREATE TABLE table_name_68 (
total VARCHAR,
rank VARCHAR,
bronze VARCHAR
) | Name the total number of total for rank of 7 and bronze less than 1 | SELECT COUNT(total) FROM table_name_68 WHERE rank = "7" AND bronze < 1 | sql_create_context |
CREATE TABLE table_7470 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
) | What are the lowest points for an engine with a Dallara F303 chassis? | SELECT MIN("Points") FROM table_7470 WHERE "Chassis" = 'dallara f303' | wikisql |
CREATE TABLE table_54479 (
"Track" real,
"Title" text,
"Performer" text,
"Length" text,
"Original Album" text
) | What is the title of the track after 11? | SELECT "Title" FROM table_54479 WHERE "Track" > '11' | wikisql |
CREATE TABLE table_15568886_14 (
proto_austronesian VARCHAR,
proto_oceanic VARCHAR
) | Name the number of proto austronesian for *natu | SELECT COUNT(proto_austronesian) FROM table_15568886_14 WHERE proto_oceanic = "*natu" | sql_create_context |
CREATE TABLE restaurant_type (
restypeid number,
restypename text,
restypedescription text
)
CREATE TABLE type_of_restaurant (
resid number,
restypeid number
)
CREATE TABLE restaurant (
resid number,
resname text,
address text,
rating number
)
CREATE TABLE visits_restaurant (
... | Show me all the restaurants. | SELECT resname FROM restaurant | spider |
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text... | Return a bar chart about the distribution of meter_700 and ID , order in ascending by the Y. | SELECT meter_700, ID FROM swimmer ORDER BY ID | nvbench |
CREATE TABLE diagnoses (
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 procedures (
... | Provide me the number of female patients who have neoplasm of uncertain behavior of other lymphatic and hematopoietic tissues/bone marrow transplant as their primary disease. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.diagnosis = "NEOPLASM OF UNCERTAIN BEHAVIOR OF OTHER LYMPHATIC AND HEMATOPOIETIC TISSUES\BONE MARROW TRANSPLANT" | mimicsql_data |
CREATE TABLE Department_Stores (
dept_store_id INTEGER,
dept_store_chain_id INTEGER,
store_name VARCHAR(80),
store_address VARCHAR(255),
store_phone VARCHAR(80),
store_email VARCHAR(80)
)
CREATE TABLE Staff_Department_Assignments (
staff_id INTEGER,
department_id INTEGER,
date_assig... | Bar chart of maximal product price from each product type code, and I want to list in ascending by the bars please. | SELECT product_type_code, MAX(product_price) FROM Products GROUP BY product_type_code ORDER BY product_type_code | nvbench |
CREATE TABLE table_204_52 (
id number,
"#" number,
"date" text,
"venue" text,
"opponent" text,
"score" text,
"result" text,
"competition" text
) | what competition was on 9 may 2006 ? | SELECT "competition" FROM table_204_52 WHERE "date" = '9 may 2006' | squall |
CREATE TABLE table_name_60 (
population INTEGER,
official_name VARCHAR,
area_km_2 VARCHAR
) | What is the total population for Saint-Antoine with an area squared of 6.43? | SELECT SUM(population) FROM table_name_60 WHERE official_name = "saint-antoine" AND area_km_2 > 6.43 | sql_create_context |
CREATE TABLE table_name_96 (
track VARCHAR,
translation VARCHAR
) | Which track translates to Flemish Women? | SELECT track FROM table_name_96 WHERE translation = "flemish women" | sql_create_context |
CREATE TABLE table_name_40 (
to_par VARCHAR,
score VARCHAR
) | Which To par has a Score of 67-72-71-75=285? | SELECT to_par FROM table_name_40 WHERE score = 67 - 72 - 71 - 75 = 285 | 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, find name and code , and group by attribute name, and visualize them by a bar chart, and could you display by the x axis in ascending? | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.Name | nvbench |
CREATE TABLE table_name_40 (
points VARCHAR,
club VARCHAR
) | Club Clwb Rygbi Cymru Caerdydd RFC has how many points? | SELECT points FROM table_name_40 WHERE club = "clwb rygbi cymru caerdydd rfc" | sql_create_context |
CREATE TABLE table_name_15 (
population VARCHAR,
area VARCHAR
) | What is the population of area of 11? | SELECT population FROM table_name_15 WHERE area = "11" | sql_create_context |
CREATE TABLE table_name_98 (
event VARCHAR,
location VARCHAR
) | What bombing happened in Brighton, UK? | SELECT event FROM table_name_98 WHERE location = "brighton, uk" | sql_create_context |
CREATE TABLE table_name_84 (
maximum_fps INTEGER,
width VARCHAR,
height VARCHAR
) | What is the lowest maximum of fps with a width of 3072 and a height less than 1620? | SELECT MIN(maximum_fps) FROM table_name_84 WHERE width = 3072 AND height < 1620 | sql_create_context |
CREATE TABLE table_36304 (
"Tournament" text,
"1988" text,
"1989" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text,
"1998" text
) | Which 1991 has an A 1993 ? | SELECT "1991" FROM table_36304 WHERE "1993" = 'a' | wikisql |
CREATE TABLE table_52083 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | How many people attended the game that the Away team scored 10.17 (77) points in? | SELECT COUNT("Crowd") FROM table_52083 WHERE "Away team score" = '10.17 (77)' | wikisql |
CREATE TABLE table_80359 (
"Tournament" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) | Name the 2010 for tournament of us open | SELECT "2010" FROM table_80359 WHERE "Tournament" = 'us open' | wikisql |
CREATE TABLE mzb (
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... | 编号为84990400的患者在2001年12月18日到2018年12月10日内自费金额高于5315.8元的药品量统共有多少? | SELECT COUNT(*) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_ID = '84990400' AND t_kc22.STA_DATE BETWEEN '2001-12-18' AND '2018-12-10' AND t_kc22.SELF_PAY_AMO > 5315.8 UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gyb.PERSON_ID = '84990... | css |
CREATE TABLE table_65550 (
"Position" real,
"Gymnast" text,
"A Score" real,
"B Score" real,
"Total" real
) | What was their position when the score of B was less than 9.05, a total was 15.275, and A Score larger than 6.4? | SELECT AVG("Position") FROM table_65550 WHERE "B Score" < '9.05' AND "Total" = '15.275' AND "A Score" > '6.4' | wikisql |
CREATE TABLE table_63120 (
"Tournament" text,
"Wins" real,
"Top-5" real,
"Events" real,
"Cuts made" real
) | In the Open Championship with more than 3 cuts made, what is the average wins? | SELECT AVG("Wins") FROM table_63120 WHERE "Tournament" = 'the open championship' AND "Cuts made" > '3' | wikisql |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE labevents (
row_id number,
sub... | what are the top five most prescribed drugs for patients who were prescribed sulfasalazine_ at the same time during this year? | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'sulfasalazine_' AND DATETIME(prescriptions.startdate, 'start of y... | mimic_iii |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
war... | tube feeding had ever been given to patient 30509 until 11/2105? | SELECT COUNT(*) > 0 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 = 30509)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'tube fee... | mimic_iii |
CREATE TABLE table_20873 (
"Year (affiliation)" text,
"Wins" real,
"Losses" real,
"Winning Pct." text,
"GB (Division Standing)" text,
"Manager" text
) | Name the most losses for leslie mann | SELECT MAX("Losses") FROM table_20873 WHERE "Manager" = 'Leslie Mann' | wikisql |
CREATE TABLE table_685 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Results" text,
"Candidates" text
) | In which district is the incumbent Marcia C. Kaptur? | SELECT "District" FROM table_685 WHERE "Incumbent" = 'Marcia C. Kaptur' | wikisql |
CREATE TABLE table_203_770 (
id number,
"ages attained (years)" text,
"catholic" text,
"protestant and other christian" text,
"other religion" text,
"none or not stated" text
) | which age range had over 45.6 % catholic ? | SELECT "ages attained (years)" FROM table_203_770 WHERE "catholic" > 45.6 | squall |
CREATE TABLE table_7595 (
"Format name" text,
"Container" text,
"Video coding" text,
"Bit depth" real,
"Color sampling" text,
"Frame size" text,
"Video bit rate, Mbit/s" text,
"Audio coding" text
) | What bit depth has 4:1:1 as the color sampling? | SELECT SUM("Bit depth") FROM table_7595 WHERE "Color sampling" = '4:1:1' | wikisql |
CREATE TABLE table_68825 (
"Year" real,
"Region total" real,
"Goondiwindi" real,
"Waggamba" real,
"Inglewood" real
) | What is the region total after 2001 when Goondiwindi had more than 4,103 and Inglewood was at 2,613? | SELECT COUNT("Region total") FROM table_68825 WHERE "Goondiwindi" > '4,103' AND "Inglewood" = '2,613' AND "Year" > '2001' | wikisql |
CREATE TABLE table_32682 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was the away team score when the team team score was 15.8 (98)? | SELECT "Away team score" FROM table_32682 WHERE "Home team score" = '15.8 (98)' | wikisql |
CREATE TABLE mzjzjlb_jybgb (
YLJGDM_MZJZJLB text,
BGDH number,
YLJGDM number
)
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,
... | 哪些工号及姓名的医务人员在患者03603176就诊过程中为他检测C反应蛋白的,时间是从0一年三月九日到0八年三月十二日 | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGD... | css |
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE requirement (... | Tell me all who has , is , or will be teaching Research International Economics ? | SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN course ON course.course_id = course_offering.course_id WHERE course.name L... | advising |
CREATE TABLE table_45584 (
"State" text,
"Type" text,
"Name" text,
"Title" text,
"Royal house" text,
"From" text
) | Which Royal house has a name of ding? | SELECT "Royal house" FROM table_45584 WHERE "Name" = 'ding' | wikisql |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE admissions (
row_id numbe... | in the last year, how many drugs had been prescribed to patient 65309? | SELECT COUNT(*) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 65309) AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') | mimic_iii |
CREATE TABLE table_41399 (
"Player" text,
"Club" text,
"League" real,
"FA Cup" real,
"FA Trophy" real,
"League Cup" real,
"Total" real
) | How many Total that has a FA Trophy of 0 and a Player of charlie butler? | SELECT COUNT("Total") FROM table_41399 WHERE "FA Trophy" = '0' AND "Player" = 'charlie butler' | wikisql |
CREATE TABLE table_50870 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | Who had the high points in the game @ Charlotte? | SELECT "High points" FROM table_50870 WHERE "Team" = '@ charlotte' | wikisql |
CREATE TABLE table_22166 (
"Satellite" text,
"COSPAR ID" text,
"SATCAT No." real,
"Product Number" real,
"Launch Date" text,
"Estimated End Date[ clarification needed ]" text,
"Estimated Operational Life" text
) | What was the launch date the satellite with cospar ID is 2008-033A? | SELECT "Launch Date" FROM table_22166 WHERE "COSPAR ID" = '2008-033A' | wikisql |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | 列出患者奚妮娜的检验报告单中结果指标均正常的检验报告单号 | SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb 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.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB ... | css |
CREATE TABLE table_1341884_45 (
party VARCHAR,
incumbent VARCHAR
) | what is the political affiliation of ray roberts | SELECT party FROM table_1341884_45 WHERE incumbent = "Ray Roberts" | sql_create_context |
CREATE TABLE table_203_299 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"notes" text
) | how many times was golding in 2nd position ? | SELECT COUNT(*) FROM table_203_299 WHERE "position" = 2 | squall |
CREATE TABLE table_33818 (
"Date" text,
"Label" text,
"Region" text,
"Format" text,
"Catalog" text
) | Which Format has a Catalog of 561 445-1? | SELECT "Format" FROM table_33818 WHERE "Catalog" = '561 445-1' | wikisql |
CREATE TABLE table_name_79 (
name VARCHAR,
transfer_window VARCHAR,
moving_from VARCHAR
) | What is the name of the player with a winter transfer window moving from Roma? | SELECT name FROM table_name_79 WHERE transfer_window = "winter" AND moving_from = "roma" | sql_create_context |
CREATE TABLE table_11554 (
"NGC number" real,
"Object type" text,
"Constellation" text,
"Right ascension ( J2000 )" text,
"Declination ( J2000 )" text
) | Which object type had an NGC number greater than 6357 and a declination (J2000) of 45 34 ? | SELECT "Object type" FROM table_11554 WHERE "NGC number" > '6357' AND "Declination ( J2000 )" = '°45′34″' | wikisql |
CREATE TABLE table_name_30 (
replaced_by VARCHAR,
position_in_table VARCHAR,
manner_of_departure VARCHAR
) | Who was the manager that was positioned 11th in table and resigned in departure? | SELECT replaced_by FROM table_name_30 WHERE position_in_table = "11th" AND manner_of_departure = "resigned" | sql_create_context |
CREATE TABLE table_56602 (
"Faroese" text,
"Norwegian (bokm\u00e5l)" text,
"Norwegian (nynorsk)" text,
"English" text,
"Icelandic" text,
"Danish" text,
"Swedish" text,
"German" text,
"Dutch" text
) | Which Icelandic has a Danish of bl t/bl ? | SELECT "Icelandic" FROM table_56602 WHERE "Danish" = 'blåt/blå' | wikisql |
CREATE TABLE school_details (
school_id number,
nickname text,
colors text,
league text,
class text,
division text
)
CREATE TABLE school_performance (
school_id number,
school_year text,
class_a text,
class_aa text
)
CREATE TABLE school (
school_id number,
school text,
... | Find the team of the player of the highest age. | SELECT team FROM player ORDER BY age DESC LIMIT 1 | spider |
CREATE TABLE table_8635 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | Can you tell me the High points that has the Date of january 31? | SELECT "High points" FROM table_8635 WHERE "Date" = 'january 31' | wikisql |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE R... | Number of Users with 1 rep. | SELECT COUNT(*) FROM Users WHERE Reputation = 1 AND (CreationDate = LastAccessDate) | sede |
CREATE TABLE table_2940 (
"Rank" real,
"Building [A ]" text,
"City" text,
"Country" text,
"Height (m)" text,
"Height (ft)" text,
"Floors" real,
"Built" text
) | What's the Stock Exchange Plaza's rank? | SELECT "Rank" FROM table_2940 WHERE "Building [A ]" = 'Stock Exchange Plaza' | wikisql |
CREATE TABLE enroll (
class_code text,
stu_num number,
enroll_grade text
)
CREATE TABLE department (
dept_code text,
dept_name text,
school_code text,
emp_num number,
dept_address text,
dept_extension text
)
CREATE TABLE professor (
emp_num number,
dept_code text,
prof_... | How many classes exist for each school? | SELECT COUNT(*), T3.school_code FROM class AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T2.dept_code = T3.dept_code GROUP BY T3.school_code | spider |
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,
... | provide the number of patients whose drug code is diph25l? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "DIPH25L" | mimicsql_data |
CREATE TABLE files (
f_id number,
artist_name text,
file_size text,
duration text,
formats text
)
CREATE TABLE genre (
g_name text,
rating text,
most_popular_in text
)
CREATE TABLE song (
song_name text,
artist_name text,
country text,
f_id number,
genre_is text,
... | List the names of all genres in alphabetical oder, together with its ratings. | SELECT g_name, rating FROM genre ORDER BY g_name | spider |
CREATE TABLE table_14984078_1 (
week VARCHAR,
date VARCHAR
) | What week of the season did the date December 2, 1962 fall on? | SELECT week FROM table_14984078_1 WHERE date = "December 2, 1962" | sql_create_context |
CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
)
CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
) | What is the total number of each ship type? Give me a pie chart. | SELECT Type, COUNT(Type) FROM ship GROUP BY Type | nvbench |
CREATE TABLE table_28870 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text,
"Candidates" text
) | What was the result of the election featuring andrew stevenson (j) 100%? | SELECT "Result" FROM table_28870 WHERE "Candidates" = 'Andrew Stevenson (J) 100%' | wikisql |
CREATE TABLE table_name_42 (
producer VARCHAR,
director VARCHAR
) | Who was the producer for the film directed by 1997? | SELECT producer FROM table_name_42 WHERE director = "1997" | sql_create_context |
CREATE TABLE table_23512864_4 (
election_year INTEGER,
speaker VARCHAR
) | If the speaker is R. Muthiah, what is the election year maximum? | SELECT MAX(election_year) FROM table_23512864_4 WHERE speaker = "R. Muthiah" | sql_create_context |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE course (
c... | Are there classes that would be useful for me to take before taking ENGR 407 ? | SELECT DISTINCT advisory_requirement FROM course WHERE department = 'ENGR' AND number = 407 | advising |
CREATE TABLE table_21761 (
"Year" real,
"Network" text,
"Play-by-play" text,
"Color commentator" text,
"Sideline reporters" text,
"Pregame host" text,
"Pregame analysts" text
) | Who had the play-by-play on espn with sideline reporter monica gonzalez? | SELECT "Play-by-play" FROM table_21761 WHERE "Network" = 'ESPN' AND "Sideline reporters" = 'Monica Gonzalez' | 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 (
... | Tell me the type of hospital admission for patient Betty Campbell had. | SELECT demographic.admission_type FROM demographic WHERE demographic.name = "Betty Campbell" | mimicsql_data |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost numb... | what was the last microbiology test time of patient 16472 in 07/this year? | SELECT microbiologyevents.charttime FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 16472) AND DATETIME(microbiologyevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m', microbiolo... | mimic_iii |
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... | tell me the primary disease and time of discharge for patient with patient id 2560. | SELECT demographic.diagnosis, demographic.dischtime FROM demographic WHERE demographic.subject_id = "2560" | mimicsql_data |
CREATE TABLE table_53256 (
"Player" text,
"Car." real,
"Yards" text,
"Avg." text,
"Long" real
) | Who has greater than 8 Long and a 73 Yards? | SELECT "Player" FROM table_53256 WHERE "Long" > '8' AND "Yards" = '73' | wikisql |
CREATE TABLE table_47569 (
"City" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
) | Which country has the Narita International Airport? | SELECT "Country" FROM table_47569 WHERE "Airport" = 'narita international airport' | wikisql |
CREATE TABLE table_57930 (
"Episode" text,
"Air Date" text,
"Rating" real,
"Share" real,
"Rating/Share 18\u201349" text,
"Viewers (m)" real,
"Timeslot Rank" real,
"Night Rank" text,
"Overall Rank" real
) | What is the rank of the episode with a share of 6 and timeslot rank smaller than 4? | SELECT AVG("Overall Rank") FROM table_57930 WHERE "Share" = '6' AND "Timeslot Rank" < '4' | wikisql |
CREATE TABLE table_27839 (
"Settlement" text,
"Cyrillic Name" text,
"Type" text,
"Population (2011)" real,
"Largest ethnic group (2002)" text,
"Dominant religion (2002)" text
) | What type is the settlement of Lok? | SELECT "Type" FROM table_27839 WHERE "Settlement" = 'Lok' | wikisql |
CREATE TABLE table_57854 (
"Country" text,
"Population" text,
"Area (km\u00b2)" text,
"GDP (nominal)" text,
"GDP per capita (nominal)" text
) | Which country has a GDP (nominal) of $29.9 billion? | SELECT "Country" FROM table_57854 WHERE "GDP (nominal)" = '$29.9 billion' | wikisql |
CREATE TABLE table_name_8 (
lane INTEGER,
nationality VARCHAR,
rank VARCHAR
) | for the rank of 3 for the united states, what is the average lane? | SELECT AVG(lane) FROM table_name_8 WHERE nationality = "united states" AND rank = 3 | sql_create_context |
CREATE TABLE airports (
apid integer,
name text,
city text,
country text,
x real,
y real,
elevation bigint,
iata character varchar(3),
icao character varchar(4)
)
CREATE TABLE routes (
rid integer,
dst_apid integer,
dst_ap varchar(4),
src_apid bigint,
src_ap varc... | Find the names of the top 10 airlines that operate the most number of routes. Plot them as bar chart. | SELECT T1.name, T1.alid FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid ORDER BY COUNT(*) DESC LIMIT 10 | nvbench |
CREATE TABLE table_name_36 (
wins INTEGER,
poles INTEGER
) | What is the highest number of wins associated with under 0 poles? | SELECT MAX(wins) FROM table_name_36 WHERE poles < 0 | sql_create_context |
CREATE TABLE table_name_77 (
high_points VARCHAR,
score VARCHAR
) | Which player was the high points scorer during the game with an end score of W 93-85? | SELECT high_points FROM table_name_77 WHERE score = "w 93-85" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.