context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
... | what are all the flights available between PITTSBURGH and DALLAS FORT WORTH | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND CITY_2.city_code = AIRP... | atis |
CREATE TABLE table_name_3 (
date VARCHAR,
visitor VARCHAR
) | What is the date of the game with the Rockets as the visitor team? | SELECT date FROM table_name_3 WHERE visitor = "rockets" | sql_create_context |
CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
Budget_Type_Code CHAR(15),
Document_Details VARCHAR(255)
)
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Documen... | Show the number of documents created in each day and bin document date by year interval and group by document type description with a group line chart, sort by the Document_Date in ascending. | SELECT Document_Date, COUNT(Document_Date) FROM Ref_Document_Types AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code GROUP BY Document_Type_Description ORDER BY Document_Date | nvbench |
CREATE TABLE table_69830 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
) | In 1972, how many points did the entrant with the March 721G Chassis have? | SELECT "Points" FROM table_69830 WHERE "Year" > '1972' AND "Chassis" = 'march 721g' | wikisql |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | 病人韦嘉泽有多少次医院是在03年3月16日到12年1月12日内去的? | SELECT (SELECT COUNT(*) 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 txmzjzjlb.JZKSRQ BETWEEN '2003-03-16' AND '2012-01-12' UNION SELECT COUNT(*) FROM p... | css |
CREATE TABLE table_4004 (
"\u2116" real,
"#" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (millions)" text
) | What is the last number in season of the episodes written by Dan Vebber? | SELECT MAX("#") FROM table_4004 WHERE "Written by" = 'Dan Vebber' | wikisql |
CREATE TABLE table_name_13 (
date VARCHAR,
home_team VARCHAR
) | On which date was Essendon the home team? | SELECT date FROM table_name_13 WHERE home_team = "essendon" | sql_create_context |
CREATE TABLE table_59348 (
"Club" text,
"Played" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
) | WHAT IS THE LOST WITH 1 LOSING BONUS, 148 POINTS? | SELECT "Lost" FROM table_59348 WHERE "Losing bonus" = '1' AND "Points for" = '148' | wikisql |
CREATE TABLE diagnoses (
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
)
C... | how many patients of black/african american ethnicity use the drug code myco500i? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND prescriptions.formulary_drug_cd = "MYCO500I" | mimicsql_data |
CREATE TABLE table_name_60 (
lane INTEGER,
athlete VARCHAR,
react VARCHAR,
rank VARCHAR,
time VARCHAR
) | Which Lane has a Rank larger than 3, and a Time larger than 45.63, and a Reaction smaller than 0.28800000000000003, and an Athlete of geiner mosquera? | SELECT MAX(lane) FROM table_name_60 WHERE rank > 3 AND time > 45.63 AND react < 0.28800000000000003 AND athlete = "geiner mosquera" | sql_create_context |
CREATE TABLE TRANSACTIONS (
amount_of_transaction INTEGER,
transaction_type_code VARCHAR,
share_count VARCHAR
) | Show the minimum amount of transactions whose type code is 'PUR' and whose share count is bigger than 50. | SELECT MIN(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = "PUR" AND share_count > 50 | sql_create_context |
CREATE TABLE party (
party_id number,
party_theme text,
location text,
first_year text,
last_year text,
number_of_hosts number
)
CREATE TABLE party_host (
party_id number,
host_id number,
is_main_in_charge others
)
CREATE TABLE host (
host_id number,
name text,
national... | Which parties have hosts of age above 50? Give me the party locations. | SELECT T3.location FROM party_host AS T1 JOIN host AS T2 ON T1.host_id = T2.host_id JOIN party AS T3 ON T1.party_id = T3.party_id WHERE T2.age > 50 | spider |
CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address VARCHAR(255),
building_manager VARCHAR(50),
building_phone VARCHAR(80)
)
CREATE TABLE Guests (
guest_id INTEGER,
... | Show the number of apartment bookings for each year and bin booking start date by year interval in a bar chart. | SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id | nvbench |
CREATE TABLE table_65145 (
"School" text,
"Location" text,
"Mascot" text,
"Enrollment" real,
"IHSAA Class" text,
"County" text
) | Which County has a Location of edinburgh? | SELECT "County" FROM table_65145 WHERE "Location" = 'edinburgh' | wikisql |
CREATE TABLE table_name_16 (
election VARCHAR
) | What is the 2nd party in the 1874 election? | SELECT 2 AS nd_party FROM table_name_16 WHERE election = "1874" | sql_create_context |
CREATE TABLE table_30199 (
"Sponsored name" text,
"Non-sponsored name" text,
"Sponsor" text,
"Stadium" text,
"City" text,
"Country" text,
"Sport" text,
"Sponsorship Ended" real
) | What country are the new orleans shell shockers from? | SELECT "Country" FROM table_30199 WHERE "Sponsored name" = 'New Orleans Shell Shockers' | 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 demographic (
subject_id text,
hadm_id t... | count the number of patients taking main type drug prescription who had white-russian ethnic background. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND prescriptions.drug_type = "MAIN" | mimicsql_data |
CREATE TABLE table_11407 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
) | What was the lowest attendance for a score of 5 - 0? | SELECT MIN("Attendance") FROM table_11407 WHERE "Score" = '5 - 0' | wikisql |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | 查一下06437336患者的医疗记录,分别列出医疗费总额不在6223.95元以下的入院诊断疾病名和编码 | SELECT t_kc24.t_kc21_OUT_DIAG_DIS_CD, t_kc24.t_kc21_OUT_DIAG_DIS_NM FROM t_kc24 WHERE t_kc24.t_kc21_PERSON_ID = '06437336' AND t_kc24.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 6223.95) | css |
CREATE TABLE table_name_78 (
week VARCHAR,
attendance INTEGER
) | In what Week was the Attendance 39,434? | SELECT COUNT(week) FROM table_name_78 WHERE attendance < 39 OFFSET 434 | sql_create_context |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | 患者陶乐贤来之前哪些检查项目已经做过了 | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '陶乐贤' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | css |
CREATE TABLE table_204_554 (
id number,
"rank" number,
"name" text,
"nation" text,
"time" text,
"speed" number,
"note" text
) | which country had more athletes , belarus or lithuania ? | SELECT "nation" FROM table_204_554 WHERE "nation" IN ('belarus', 'lithuania') GROUP BY "nation" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE table_2135 (
"Order" real,
"Couple" text,
"Karen" text,
"Nicky" text,
"Jason" text,
"Ruthie" text,
"Robin" text,
"Total" text,
"Skating song" text,
"Scoreboard" text,
"Public vote" text
) | what is the public vote on graeme & kristina | SELECT "Public vote" FROM table_2135 WHERE "Couple" = 'Graeme & Kristina' | wikisql |
CREATE TABLE table_name_78 (
to_par VARCHAR,
score VARCHAR
) | What is the To par value that goes with a Score of 70-69=139? | SELECT to_par FROM table_name_78 WHERE score = 70 - 69 = 139 | sql_create_context |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
CREATE TABLE t_kc21 (
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 ... | 在不同科室编码下,列出所有医疗就诊记录在医院9913454的统筹基金支出与医疗费总额的平均比值是多少? | 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 = '9913454' GROUP BY t_kc21.MED_ORG_DEPT_CD | css |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,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),
POSTAL_CODE varchar(12),
CITY ... | For those employees who was hired before 2002-06-21, give me the trend about department_id over hire_date . | SELECT HIRE_DATE, DEPARTMENT_ID FROM employees WHERE HIRE_DATE < '2002-06-21' | nvbench |
CREATE TABLE table_39300 (
"Nationality" text,
"Matches" real,
"Drawn" real,
"Lost" real,
"Win %" real
) | Nationality of england, and a Matches smaller than 510, and a Lost of 4, and a Win % smaller than 28.6 had what lowest drawn? | SELECT MIN("Drawn") FROM table_39300 WHERE "Nationality" = 'england' AND "Matches" < '510' AND "Lost" = '4' AND "Win %" < '28.6' | wikisql |
CREATE TABLE table_name_75 (
notes VARCHAR,
country VARCHAR
) | Poland has what notes? | SELECT notes FROM table_name_75 WHERE country = "poland" | sql_create_context |
CREATE TABLE table_15851 (
"Aircraft" text,
"Description" text,
"Max Gross Weight" text,
"Total disk area" text,
"Max disk Loading" text
) | What if the description of a ch-47d chinook? | SELECT "Description" FROM table_15851 WHERE "Aircraft" = 'CH-47D Chinook' | wikisql |
CREATE TABLE table_21106 (
"Story #" real,
"Title" text,
"Doctor" text,
"Narrator" text,
"Format" text,
"release date" text,
"Notes" text
) | Which narrator has the bonus interview with Frazer Hines? | SELECT "Narrator" FROM table_21106 WHERE "Notes" = 'Bonus interview with Frazer Hines' | wikisql |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | 在哪几次医疗记录中患者21485426被开出的均低于7162.91元的药品?列出医疗就诊编号是什么? | SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '21485426' AND NOT MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE AMOUNT >= 7162.91) | css |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE microb... | what were the three most frequently prescribed drugs for patients who were previously prescribed with aripiprazole during the same hospital encounter since 4 years ago? | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate, admissions.hadm_id FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'aripiprazole' AND DATETIME(prescriptions.star... | mimic_iii |
CREATE TABLE table_68922 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
) | Name the sum of points for chassis of brm p160e and year more than 1974 | SELECT SUM("Points") FROM table_68922 WHERE "Chassis" = 'brm p160e' AND "Year" > '1974' | wikisql |
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label te... | what drugs are being added to patient 92788's today compared to those yesterday? | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 92788) AND DATETIME(prescriptions.startdate, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT prescriptions.drug FROM prescriptions WHERE... | mimic_iii |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | 团伙成员70821376号的常开药品的顺序是啥样的? | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '70821376' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC | css |
CREATE TABLE table_name_77 (
team VARCHAR,
position VARCHAR
) | What is the Team of the Fullback Player? | SELECT team FROM table_name_77 WHERE position = "fullback" | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | how many of the private patients had formation of cutaneous uretero-ileostomy? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.long_title = "Formation of cutaneous uretero-ileostomy" | mimicsql_data |
CREATE TABLE table_33634 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Stadium" text,
"Record" text,
"Attendance" text
) | What was the attendance of the game on October 17, 2004? | SELECT "Attendance" FROM table_33634 WHERE "Date" = 'october 17, 2004' | wikisql |
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,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM ... | 49009000615住院就诊的门诊中医诊断是啥?想知道它的编号 | SELECT zyjzjlb.MZZYZDZZBM FROM zyjzjlb WHERE zyjzjlb.JZLSH = '49009000615' | 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 demographic (... | how many patients whose primary disease is colangitis and year of death is less than or equal to 2174? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "COLANGITIS" AND demographic.dod_year <= "2174.0" | mimicsql_data |
CREATE TABLE table_18 (
"Equivalent NATO Rank Code" text,
"Rank in Spanish" text,
"Rank in English" text,
"Commonwealth equivalent" text,
"US Air Force equivalent" text
) | What could a spanish coronel be addressed as in the commonwealth military? | SELECT "Commonwealth equivalent" FROM table_18 WHERE "Rank in Spanish" = 'Coronel' | wikisql |
CREATE TABLE table_name_19 (
high_rebounds VARCHAR,
score VARCHAR
) | What were the high rebounds when the score was l 101 109 (ot)? | SELECT high_rebounds FROM table_name_19 WHERE score = "l 101–109 (ot)" | sql_create_context |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE diagnoses_icd (
row_id number,
... | show me the four year survival rate of patients who were prescribed dextrose 5% after they were diagnosed with sarcoidosis? | SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t4.charttime) > 4 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.subject_id, t2.charttime FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd... | mimic_iii |
CREATE TABLE table_53095 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What is essendon's home team score? | SELECT "Home team score" FROM table_53095 WHERE "Home team" = 'essendon' | wikisql |
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 number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
a... | calculate how many times patient 65962 has had a troponin t test in the lab until 10/2104. | SELECT COUNT(*) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'troponin t') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 65962) AND STRFTIME('%y-%m', labevents.charttime) <= '2104-10' | mimic_iii |
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, show me about the distribution of founder and the sum of code , and group by attribute founder in a bar chart, rank by the X-axis from high to low. | SELECT T2.Founder, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Founder ORDER BY T2.Founder DESC | nvbench |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airp... | i'd like a flight from WASHINGTON that stops in DENVER and goes on to SAN FRANCISCO | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND CIT... | atis |
CREATE TABLE table_41227 (
"Season" text,
"Competition" text,
"Round" text,
"Club" text,
"Home" text,
"Away" text
) | Which away has apoel as the club? | SELECT "Away" FROM table_41227 WHERE "Club" = 'apoel' | wikisql |
CREATE TABLE table_16813 (
"model" text,
"max. motive power" text,
"max. torque at rpm" text,
"engine displacement" text,
"engine type" text,
"engine configuration & notes 0-100km/h" text
) | What is the engine type when the max torque at rpm is n m ( lbf ft ) @ 4,800 Answers:? | SELECT "engine type" FROM table_16813 WHERE "max. torque at rpm" = 'N·m ( lbf·ft ) @ 4,800' | wikisql |
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varchar(12),
EMP_INITIAL varchar(1),
EMP_JOBCODE varchar(5),
EMP_HIREDATE datetime,
EMP_DOB datetime
)
CREATE TABLE DEPARTM... | Find the first name and gpa of the students whose gpa is lower than the average gpa of all students Plot them as bar chart, show in descending by the y-axis. | SELECT STU_FNAME, SUM(STU_GPA) FROM STUDENT WHERE STU_GPA < (SELECT AVG(STU_GPA) FROM STUDENT) GROUP BY STU_FNAME ORDER BY SUM(STU_GPA) DESC | nvbench |
CREATE TABLE table_name_29 (
nbr_number INTEGER,
class VARCHAR,
road_number VARCHAR
) | What is the highest NBR number that corresponds to the J class and the road number of 1211? | SELECT MAX(nbr_number) FROM table_name_29 WHERE class = "j" AND road_number = 1211 | sql_create_context |
CREATE TABLE table_68765 (
"Group" real,
"Half-Life (s)" real,
"Decay Constant (s \u22121 )" real,
"Yield, Neutrons per Fission" real,
"Fraction" real
) | What is the lowest Half-Life with a Yield, Neutrons per Fission greater than 0.0054600000000000004 and a Fraction less than 0.002568? | SELECT MIN("Half-Life (s)") FROM table_68765 WHERE "Yield, Neutrons per Fission" > '0.0054600000000000004' AND "Fraction" < '0.002568' | wikisql |
CREATE TABLE table_67401 (
"Rank" text,
"Bowling" text,
"Player" text,
"Venue" text,
"Date" text
) | What ranking is james franklin? | SELECT "Rank" FROM table_67401 WHERE "Player" = 'james franklin' | wikisql |
CREATE TABLE table_1656555_1 (
archbishop VARCHAR,
ordained_bishop VARCHAR
) | Which archbishop was ordained as bishop November 30, 1925? | SELECT archbishop FROM table_1656555_1 WHERE ordained_bishop = "November 30, 1925" | sql_create_context |
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... | 名叫云清卓的患者有过哪些疾病史? | SELECT qtb.IN_DIAG_DIS_CD, qtb.IN_DIAG_DIS_NM FROM qtb WHERE qtb.PERSON_NM = '云清卓' UNION SELECT gyb.IN_DIAG_DIS_CD, gyb.IN_DIAG_DIS_NM FROM gyb WHERE gyb.PERSON_NM = '云清卓' UNION SELECT zyb.IN_DIAG_DIS_CD, zyb.IN_DIAG_DIS_NM FROM zyb WHERE zyb.PERSON_NM = '云清卓' UNION SELECT mzb.IN_DIAG_DIS_CD, mzb.IN_DIAG_DIS_NM FROM mz... | css |
CREATE TABLE table_21781578_2 (
season_no VARCHAR,
us_viewers__millions_ VARCHAR
) | What was the number of season number entries that had US Viewers of 12.30 million? | SELECT COUNT(season_no) FROM table_21781578_2 WHERE us_viewers__millions_ = "12.30" | sql_create_context |
CREATE TABLE table_name_93 (
date VARCHAR,
home_team VARCHAR
) | What date was the game when home team crystal palace played? | SELECT date FROM table_name_93 WHERE home_team = "crystal palace" | sql_create_context |
CREATE TABLE table_32808 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | When was the game that was held at the Princes Park? | SELECT "Date" FROM table_32808 WHERE "Venue" = 'princes park' | wikisql |
CREATE TABLE table_39688 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the number of Bronze medals of the Nation with 64 total and silver greater than 16? | SELECT COUNT("Bronze") FROM table_39688 WHERE "Total" = '64' AND "Silver" > '16' | wikisql |
CREATE TABLE table_18012738_1 (
story_no VARCHAR,
written_by VARCHAR
) | Name the story number for paul cornell | SELECT story_no FROM table_18012738_1 WHERE written_by = "Paul Cornell" | sql_create_context |
CREATE TABLE table_train_24 (
"id" int,
"systolic_blood_pressure_sbp" int,
"do_not_resuscitate_dnr" bool,
"temperature" float,
"hypotension" bool,
"cardiac_arrest" bool,
"age" float,
"NOUSE" float
) | post cardiac arrest | SELECT * FROM table_train_24 WHERE cardiac_arrest = 1 | criteria2sql |
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 icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | until 2103, how many patients had been diagnosed with diplopia? | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_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 = 'diplopia') AND STRFTIME('%y', diagnoses_icd.charttime) <= ... | mimic_iii |
CREATE TABLE table_51899 (
"Player" text,
"Height" text,
"School" text,
"Hometown" text,
"College" text,
"NBA Draft" text
) | Which NBA draft has a School of huntington high school? | SELECT "NBA Draft" FROM table_51899 WHERE "School" = 'huntington high school' | wikisql |
CREATE TABLE prereq (
course_id varchar(8),
prereq_id varchar(8)
)
CREATE TABLE advisor (
s_ID varchar(5),
i_ID varchar(5)
)
CREATE TABLE section (
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
building varchar(15),
room_number varchar(7),
... | What is the average capacity for rooms in each building? Draw a bar chart, rank by the X-axis in descending. | SELECT building, AVG(capacity) FROM classroom GROUP BY building ORDER BY building DESC | nvbench |
CREATE TABLE table_name_45 (
bushi VARCHAR,
kenny_omega VARCHAR
) | Name the BUSHI when it has kenny omega of yang (7:27) | SELECT bushi FROM table_name_45 WHERE kenny_omega = "yang (7:27)" | sql_create_context |
CREATE TABLE Customer_Event_Notes (
Customer_Event_Note_ID INTEGER,
Customer_Event_ID INTEGER,
service_type_code CHAR(15),
resident_id INTEGER,
property_id INTEGER,
date_moved_in DATETIME
)
CREATE TABLE Residents_Services (
resident_id INTEGER,
service_id INTEGER,
date_moved_in DATE... | What is the proportion of each customer's move in date? Show me the bar chart, and show by the how many date moved in in asc 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 COUNT(date_moved_in) | 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 whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the sum of department_id over the hire_date bin hire_date by time by a bar chart. | SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 | nvbench |
CREATE TABLE supplier_addresses (
supplier_id number,
address_id number,
date_from time,
date_to time
)
CREATE TABLE products (
product_id number,
product_type_code text,
product_name text,
product_price number
)
CREATE TABLE order_items (
order_item_id number,
order_id number,... | Give the maximum and minimum product prices for each product type, grouped and ordered by product type. | SELECT MAX(product_price), MIN(product_price), product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code | spider |
CREATE TABLE table_12962773_10 (
height VARCHAR,
no VARCHAR
) | How tall was Player #10? | SELECT height FROM table_12962773_10 WHERE no = 10 | sql_create_context |
CREATE TABLE table_13644 (
"Team 1" text,
"Agg." text,
"Team 2" text,
"1st leg" text,
"2nd leg" text
) | Who is team 1 with an agg of 2-5? | SELECT "Team 1" FROM table_13644 WHERE "Agg." = '2-5' | wikisql |
CREATE TABLE table_7560 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | What is the Record when antonio davis (14) had the high rebounds? | SELECT "Record" FROM table_7560 WHERE "High rebounds" = 'antonio davis (14)' | wikisql |
CREATE TABLE jybgb (
YLJGDM text,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text,
BGDH text,
BGRQ time,
JYLX number,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
JZLX number,
KSBM text,
KSMC text,
SQRGH text,
SQRXM text,
BGRGH text,
BGRXM text,
SHRGH ... | 在检验报告单23063677904中都有哪些类型的检验? | SELECT JYLX FROM jybgb WHERE BGDH = '23063677904' | css |
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,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ tim... | 名叫袁秀筠的患者检测指标634250从09年10月15日到14年10月24日的情况如何? | SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM... | css |
CREATE TABLE table_26240046_1 (
season_4 INTEGER,
character VARCHAR
) | How many season 4 appearances are there by Mrs. Jennifer Knight? | SELECT MIN(season_4) FROM table_26240046_1 WHERE character = "Mrs. Jennifer Knight" | sql_create_context |
CREATE TABLE Participates_in (
stuid INTEGER,
actid INTEGER
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Faculty_Participates_in (
FacID INTEGER... | How many male and female assistant professors do we have, display in descending by the X-axis. | SELECT Sex, COUNT(*) FROM Faculty WHERE Rank = "AsstProf" GROUP BY Sex ORDER BY Sex DESC | nvbench |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | 患者18088627在医院6281545中做的入院诊断中包含阿弗的疾病名的医疗就诊记录编号有哪些 | SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '18088627' AND MED_SER_ORG_NO = '6281545' AND IN_DIAG_DIS_NM LIKE '%阿弗%' | css |
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CRE... | Answers that are possibly link only which were posted by new users and question asker is new. | SELECT p.Id AS "post_link", p.CreationDate, LEN(p.Body) AS BodyLength FROM Posts AS p INNER JOIN Users AS u ON u.Id = p.OwnerUserId INNER JOIN Posts AS parentPost ON parentPost.Id = p.ParentId INNER JOIN Users AS parentUser ON parentUser.Id = parentPost.OwnerUserId WHERE p.PostTypeId = 2 AND p.Body LIKE '%a href%' AND ... | sede |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic ... | what is maximum age of patients whose ethnicity is white and days of hospital stay is 5? | SELECT MAX(demographic.age) FROM demographic WHERE demographic.ethnicity = "WHITE" AND demographic.days_stay = "5" | mimicsql_data |
CREATE TABLE table_8 (
"Pick" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | What are the nationalities of the player picked from Thunder Bay Flyers (ushl) | SELECT "Nationality" FROM table_8 WHERE "College/junior/club team" = 'Thunder Bay Flyers (USHL)' | wikisql |
CREATE TABLE table_name_4 (
team VARCHAR,
venue VARCHAR
) | What is Team, when Venue is ' kr Saraco lu Stadium'? | SELECT team FROM table_name_4 WHERE venue = "şükrü saracoğlu stadium" | sql_create_context |
CREATE TABLE table_29633639_1 (
premiere VARCHAR,
peak VARCHAR
) | what is the number of the premiere for the 34 peak | SELECT premiere FROM table_29633639_1 WHERE peak = 34 | sql_create_context |
CREATE TABLE diagnoses (
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
)
C... | how many patients whose admission type is emergency and procedure short title is insert 2 vascular stents? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.short_title = "Insert 2 vascular stents" | mimicsql_data |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE procedures... | what was patient 16572's intake for the last time until 1926 days ago? | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT inputevents_cv.itemid 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 = 16572)) AND DATETIME(inputevents_cv.... | mimic_iii |
CREATE TABLE table_name_71 (
year VARCHAR,
wins VARCHAR
) | What is Year, when Wins is '0'? | SELECT year FROM table_name_71 WHERE wins = "0" | sql_create_context |
CREATE TABLE table_13301516_1 (
title VARCHAR,
us_viewers__millions_ VARCHAR
) | Which episode was watched by 11.75 million U.S. viewers? | SELECT title FROM table_13301516_1 WHERE us_viewers__millions_ = "11.75" | sql_create_context |
CREATE TABLE table_45169 (
"Year" real,
"Championship" text,
"Winning score" text,
"Margin" text,
"Runner-up" text
) | What was the winning score in 1980? | SELECT "Winning score" FROM table_45169 WHERE "Year" = '1980' | wikisql |
CREATE TABLE table_name_4 (
record VARCHAR,
game VARCHAR
) | What is the record of game 7? | SELECT record FROM table_name_4 WHERE game = 7 | sql_create_context |
CREATE TABLE table_10783 (
"Call sign" text,
"Frequency MHz" text,
"City of license" text,
"ERP W" text,
"FCC info" text
) | Name the FCC info for call sign of kpcc | SELECT "FCC info" FROM table_10783 WHERE "Call sign" = 'kpcc' | wikisql |
CREATE TABLE table_9746 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | What was the result of the los angeles rams game? | SELECT "Result" FROM table_9746 WHERE "Opponent" = 'los angeles rams' | wikisql |
CREATE TABLE table_6864 (
"Number on map" real,
"Name" text,
"Colour" text,
"Construction commenced" real,
"Population" real
) | What is the average number for Northgate which commenced its construction before 1951? | SELECT AVG("Number on map") FROM table_6864 WHERE "Name" = 'northgate' AND "Construction commenced" < '1951' | 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,... | 把2002年5月23日到2004年11月6日期间患者92983235在8089445的医疗机构一共开了多少西药查看一下 | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_ID = '92983235' AND t_kc22.STA_DATE BETWEEN '2002-05-23' AND '2004-11-06' AND t_kc21.MED_SER_ORG_NO = '8089445' AND t_kc22.MED_INV... | css |
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDispl... | UpVotes - DownVotes over time. | SELECT CONCAT(YEAR(CreationDate), '-', MONTH(CreationDate)) AS "Month", COUNT(PostId) AS "Posts", SUM(CASE VoteTypeId WHEN 2 THEN 1 ELSE 0 END) AS "upvotes", SUM(CASE VoteTypeId WHEN 3 THEN 1 ELSE 0 END) AS "downvotes" FROM Votes GROUP BY YEAR(CreationDate), MONTH(CreationDate) ORDER BY YEAR(CreationDate), MONTH(Creati... | sede |
CREATE TABLE table_27698941_6 (
game VARCHAR,
score VARCHAR
) | What is the game number for the game with a score of l 90 106 (ot)? | SELECT game FROM table_27698941_6 WHERE score = "L 90–106 (OT)" | sql_create_context |
CREATE TABLE table_12873 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Results" text
) | In what year did the Democratic incumbent that was re-elected first take office? | SELECT "First elected" FROM table_12873 WHERE "Results" = 're-elected' AND "Party" = 'democratic' | wikisql |
CREATE TABLE table_43926 (
"Sport" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the total associated with Bronzes over 35? | SELECT "Total" FROM table_43926 WHERE "Bronze" > '35' | 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... | 69939554这个病人被门诊诊断为脑外伤所致精神障碍,他做的胱抑素C2代的结果定量及其单位分别是啥 | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb 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 AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jyb... | css |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodic (
... | tell me the top four most frequently prescribed drugs for patients with an age of 30s since 2101? | SELECT t1.drugname FROM (SELECT medication.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 30 AND 39) AND STRFTIME('%y', medication.drugstarttime) >= '2101' GROUP BY medication.drugn... | eicu |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | For those records from the products and each product's manufacturer, give me the comparison about the average of code over the name , and group by attribute name, display in desc by the X please. | SELECT T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name DESC | nvbench |
CREATE TABLE table_17756 (
"Clinical Status" text,
"Compound Name" text,
"Trademark" text,
"Marine Organism \u03b1" text,
"Chemical Class" text,
"Molecular Target" text,
"Clinical Trials \u03b2" text,
"Disease Area" text
) | How many trademarks list a molecular target of minor groove of dna and a clinical status value of phase i? | SELECT COUNT("Trademark") FROM table_17756 WHERE "Molecular Target" = 'Minor Groove of DNA' AND "Clinical Status" = 'Phase I' | wikisql |
CREATE TABLE station (
id INTEGER,
name TEXT,
lat NUMERIC,
long NUMERIC,
dock_count INTEGER,
city TEXT,
installation_date TEXT
)
CREATE TABLE weather (
date TEXT,
max_temperature_f INTEGER,
mean_temperature_f INTEGER,
min_temperature_f INTEGER,
max_dew_point_f INTEGER,
... | What are the different ids and names of the stations that have had more than 12 bikes available. Plot them as bar chart. | SELECT name, id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12 | nvbench |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.