context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | which patients have td route of drug administration? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.route = "TD" | mimicsql_data |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
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,
... | what are the three most frequently ordered lab tests for patients who have been diagnosed with pure hyperglyceridemia earlier until 1 year ago during the same hospital visit? | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id W... | mimic_iii |
CREATE TABLE table_29987 (
"Pick" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | For nhl team is san jose sharks mention all the college/junior/club team | SELECT "College/junior/club team" FROM table_29987 WHERE "NHL team" = 'San Jose Sharks' | wikisql |
CREATE TABLE table_22110 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Results" text,
"Candidates" text
) | What are the results of incumbent dave weldon? | SELECT COUNT("Results") FROM table_22110 WHERE "Incumbent" = 'Dave Weldon' | 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... | what number of patients with diagnoses icd9 code 99592 passed away in or before the year 2164? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.dod_year <= "2164.0" AND diagnoses.icd9_code = "99592" | mimicsql_data |
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... | 在10年3月5日到13年8月3日期间,韩芳洲这位参保人门诊检查费有多少元 | SELECT SUM(t_kc22.AMOUNT) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '韩芳洲' AND t_kc22.t_kc21_CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2010-03-05' AND '2013-08-03' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | css |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE diagnosis (
diagnosisid number... | what is the difference between patient 027-165214's total number of inputs and outputs on this month/24? | SELECT (SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-165214')) AND intakeoutput.cellpath ... | eicu |
CREATE TABLE table_37169 (
"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 lost has 528 as the points? | SELECT "Lost" FROM table_37169 WHERE "Points for" = '528' | wikisql |
CREATE TABLE table_19169116_8 (
score VARCHAR,
opponent VARCHAR
) | Name the score for opponent of cleveland | SELECT score FROM table_19169116_8 WHERE opponent = "Cleveland" | sql_create_context |
CREATE TABLE table_24517 (
"Regional" text,
"Champions" text,
"Runners-up" text,
"Third place" text,
"Fourth place" text
) | who got the first position when fujieda city government got the fourth position? | SELECT "Champions" FROM table_24517 WHERE "Fourth place" = 'Fujieda City Government' | wikisql |
CREATE TABLE table_train_116 (
"id" int,
"mini_mental_state_examination_mmse" int,
"hemoglobin_a1c_hba1c" float,
"body_weight" float,
"hepatic_disease" bool,
"geriatric_depression_scale_gds" int,
"NOUSE" float
) | the spouse will have to score 27 or higher on the mmse. | SELECT * FROM table_train_116 WHERE mini_mental_state_examination_mmse >= 27 | criteria2sql |
CREATE TABLE table_33655 (
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score" text
) | Which tournament was played on clay and there was a score of 4 6, 6 1, 6 4? | SELECT "Tournament" FROM table_33655 WHERE "Surface" = 'clay' AND "Score" = '4–6, 6–1, 6–4' | wikisql |
CREATE TABLE table_9367 (
"Date" text,
"Series" text,
"Circuit" text,
"City / State" text,
"Winner" text,
"Team" text
) | What is City / State, when Circuit is Eastern Creek Raceway, and when Winner is Michael Donaher? | SELECT "City / State" FROM table_9367 WHERE "Circuit" = 'eastern creek raceway' AND "Winner" = 'michael donaher' | 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
)
... | tell me the number of patients born before 2112 who had other lysis of peritoneal adhesions procedure. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "2112" AND procedures.short_title = "Oth periton adhesiolysis" | mimicsql_data |
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... | 病患柏慧艳在0564335号医院中就诊期间其所看科室名字里有免疫科的所有门诊就诊记录的流水号是什么? | SELECT wdmzjzjlb.JZLSH 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 hz_info.YLJGDM = '0564335' AND wdmzjzjlb.JZKSMC LIKE '%免疫科%' UNION SELECT bdmzjzjlb.... | css |
CREATE TABLE product_categories (
production_type_code text,
product_type_description text,
vat_rating number
)
CREATE TABLE order_items (
order_item_id number,
order_id number,
product_id number,
product_quantity text,
other_order_item_details text
)
CREATE TABLE customers (
custo... | What are the ids, names, dates of opening, and other details for accounts corresponding to the customer with the first name 'Meaghan'? | SELECT T1.account_id, T1.date_account_opened, T1.account_name, T1.other_account_details FROM accounts AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan' | spider |
CREATE TABLE VOTING_RECORD (
Id VARCHAR
)
CREATE TABLE STUDENT (
LName VARCHAR,
PRESIDENT_Vote VARCHAR,
Advisor VARCHAR
) | Find the distinct last names of all the students who have president votes and whose advisor is not 2192. | SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote EXCEPT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = "2192" | sql_create_context |
CREATE TABLE match_season (
Team VARCHAR
) | How many distinct teams are involved in match seasons? | SELECT COUNT(DISTINCT Team) FROM match_season | sql_create_context |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
... | Posts containing Google redirect links. | SELECT Id AS "post_link" FROM Posts WHERE Body LIKE 'http://stackoverflow.com/users/3639582/shaunak-d' | sede |
CREATE TABLE table_22220 (
"Year" real,
"Delegate" text,
"Hometown" text,
"Pageant" text,
"Result" text,
"Other awards" text
) | How many awards did milagros gutierrez win? | SELECT "Other awards" FROM table_22220 WHERE "Delegate" = 'Milagros Gutierrez' | wikisql |
CREATE TABLE table_26986076_5 (
tues_24_aug VARCHAR,
fri_27_aug VARCHAR
) | When 20' 58.50 107.929mph is Friday August 27th What is Tuesday 24th August? | SELECT tues_24_aug FROM table_26986076_5 WHERE fri_27_aug = "20' 58.50 107.929mph" | sql_create_context |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREAT... | what is the first value of the bedside glucose of patient 002-58884 a month before? | SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-58884')) AND lab.labname = 'bedside glucose' AND DATETIME(lab.labresulttime, 'start... | eicu |
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 zyjzjlb (
CYBQDM text,
CYBQMC... | 检验报告单的编码为00805364143的报告人工号以及姓名是谁? | SELECT jybgb.BGRGH, jybgb.BGRXM FROM jybgb WHERE jybgb.BGDH = '00805364143' | css |
CREATE TABLE Maintenance_Engineers (
engineer_id INTEGER,
company_id INTEGER,
first_name VARCHAR(50),
last_name VARCHAR(50),
other_details VARCHAR(255)
)
CREATE TABLE Third_Party_Companies (
company_id INTEGER,
company_type VARCHAR(5),
company_name VARCHAR(255),
company_address VARC... | A stacked bar chart showing the number of faults for different fault short name and skills required to fix them The x-axis is falut short name and group by skill description, and list by the bars from high to low. | SELECT fault_short_name, COUNT(fault_short_name) FROM Part_Faults AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.part_fault_id = T2.part_fault_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id GROUP BY skill_description, fault_short_name ORDER BY fault_short_name DESC | nvbench |
CREATE TABLE table_79659 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in final" text,
"Score" text,
"Prize Money" text
) | Who was the opponent on carpet in a final? | SELECT "Opponent in final" FROM table_79659 WHERE "Surface" = 'carpet' | wikisql |
CREATE TABLE table_64141 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | How many gold medals for Bulgaria (BUL) with 2 silvers and a less than 18 rank? | SELECT SUM("Gold") FROM table_64141 WHERE "Silver" = '2' AND "Nation" = 'bulgaria (bul)' AND "Rank" < '18' | wikisql |
CREATE TABLE table_name_10 (
year INTEGER,
chassis VARCHAR,
points VARCHAR
) | What is the year with a Kurtis Kraft 500a chassis, and less than 1.5 points? | SELECT SUM(year) FROM table_name_10 WHERE chassis = "kurtis kraft 500a" AND points < 1.5 | sql_create_context |
CREATE TABLE table_41019 (
"Team" text,
"Tries for" real,
"Tries against" real,
"Try diff" text,
"Points for" real,
"Points against" real,
"Points diff" text
) | How many Points against that have a Team of harlequins and Tries against smaller than 8? | SELECT SUM("Points against") FROM table_41019 WHERE "Team" = 'harlequins' AND "Tries against" < '8' | 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 ... | 在医院9316112中,病患50636004就诊科室名没有老年病这三个字的所有门诊就诊记录的流水号是什么 | SELECT mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '50636004' AND hz_info.YLJGDM = '9316112' AND NOT mzjzjlb.JZKSMC LIKE '%老年病%' | css |
CREATE TABLE table_name_38 (
score VARCHAR,
name VARCHAR
) | What is Score, when Name is Nicole ? | SELECT score FROM table_name_38 WHERE name = "nicole 赖淞凤" | sql_create_context |
CREATE TABLE table_58325 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the high bronze total for nations ranked 12? | SELECT MAX("Bronze") FROM table_58325 WHERE "Rank" = '12' | 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... | 名为李红旭的病人有哪些检验报告单的报告日期在零六年三月二十日以后?这些报告单所对应的住院就诊的流水号是什么 | SELECT zyjzjlb.JZLSH FROM person_info JOIN hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND ... | css |
CREATE TABLE Course_Authors_and_Tutors (
author_id INTEGER,
author_tutor_ATB VARCHAR(3),
login_name VARCHAR(40),
password VARCHAR(40),
personal_name VARCHAR(80),
middle_name VARCHAR(80),
family_name VARCHAR(80),
gender_mf VARCHAR(1),
address_line_1 VARCHAR(80)
)
CREATE TABLE Student... | A bar chart shows the distribution of family_name and gender_mf . | SELECT family_name, gender_mf FROM Course_Authors_and_Tutors ORDER BY personal_name | nvbench |
CREATE TABLE table_28799 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Position in table" text,
"Incoming manager" text,
"Date of appointment" text
) | Who was the outgoing manager of the team whose incoming manager was Dougie Freedman? | SELECT "Outgoing manager" FROM table_28799 WHERE "Incoming manager" = 'Dougie Freedman' | wikisql |
CREATE TABLE table_name_84 (
record VARCHAR,
time VARCHAR
) | What is the record of the match at 6:00? | SELECT record FROM table_name_84 WHERE time = "6:00" | sql_create_context |
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... | tell me the gender and procedure icd9 code of patient with patient id 2560. | SELECT demographic.gender, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "2560" | mimicsql_data |
CREATE TABLE table_name_81 (
erp_w VARCHAR,
call_sign VARCHAR
) | What is the total number of the ERP W with a call sign of w242ak? | SELECT COUNT(erp_w) FROM table_name_81 WHERE call_sign = "w242ak" | sql_create_context |
CREATE TABLE table_203_457 (
id number,
"tramway" text,
"country" text,
"city" text,
"height of pylons" text,
"span width,\nleaning straight line" text,
"span width,\nhorizontal measurement" text,
"height of cable over ground" text,
"year of inauguration" number,
"notes" text
) | how much greater is the height of cable over ground measurement for the peak 2 peak gondola when compared with that of the vanoise express ? | SELECT (SELECT "height of cable over ground" FROM table_203_457 WHERE "tramway" = 'peak 2 peak gondola') - (SELECT "height of cable over ground" FROM table_203_457 WHERE "tramway" = 'vanoise express') | squall |
CREATE TABLE table_name_4 (
money___$__ VARCHAR,
place VARCHAR,
player VARCHAR
) | Which money has player Jack Fleck with t1 place? | SELECT money___$__ FROM table_name_4 WHERE place = "t1" AND player = "jack fleck" | sql_create_context |
CREATE TABLE table_name_57 (
score VARCHAR,
set_2 VARCHAR
) | What is the overall score when the set 2 score is 25 18? | SELECT score FROM table_name_57 WHERE set_2 = "25–18" | sql_create_context |
CREATE TABLE table_65603 (
"Player" text,
"Test debut" text,
"Year" real,
"Cross-code debut" text,
"Date" text,
"Position" text
) | What is the position earlier than 1907, with a cross-code debut of inaugural rl test v new zealand, and a test debut of inaugural ru test v new zealand? | SELECT "Position" FROM table_65603 WHERE "Year" < '1907' AND "Cross-code debut" = 'inaugural rl test v new zealand' AND "Test debut" = 'inaugural ru test v new zealand' | wikisql |
CREATE TABLE table_203_35 (
id number,
"pos" text,
"rider" text,
"manufacturer" text,
"time/retired" text,
"points" number
) | how many riders in the top 15 were riding a honda ? | SELECT COUNT("rider") FROM table_203_35 WHERE "pos" <= 15 AND "manufacturer" = 'honda' | squall |
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_... | i need a flight from PITTSBURGH to LOS ANGELES thursday evening | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'LOS ANGELES' AND date_day.day_number = 24 AND date_day.month_number = 5 ... | atis |
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConce... | Answers which have beaten Richard. | SELECT ParentId AS "post_link", Id AS "Post Link", PostTypeId AS "Post Type", OwnerUserId AS "User Link", Score AS "Score" FROM Posts AS P WHERE ParentId IN (SELECT ParentId AS "Post Link" FROM Posts AS TargetP WHERE OwnerUserId = '##TargetUserId##' AND P.Score > TargetP.Score) GROUP BY ParentId, Id, PostTypeId, OwnerU... | sede |
CREATE TABLE department (
Department_ID int,
Name text,
Creation text,
Ranking int,
Budget_in_Billions real,
Num_Employees real
)
CREATE TABLE head (
head_ID int,
name text,
born_state text,
age real
)
CREATE TABLE management (
department_ID int,
head_ID int,
tempor... | Give me a bar chart for budget_in_billions of each name, and sort by the Y-axis from high to low please. | SELECT Name, Budget_in_Billions FROM department ORDER BY Budget_in_Billions DESC | nvbench |
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text... | 患者43148907在05年1月3日到09年12月17日,是找的哪些工号及姓名的医务人员检测免疫球蛋白M(标准)的 | (SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb... | css |
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 did not have any job in the past, a bar chart shows the distribution of hire_date and the sum of manager_id bin hire_date by time. | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | nvbench |
CREATE TABLE table_20799905_1 (
obama_percentage VARCHAR,
mccain_percentage VARCHAR
) | What percentage did Obama get when McCain got 52.8%? | SELECT obama_percentage FROM table_20799905_1 WHERE mccain_percentage = "52.8%" | sql_create_context |
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),
time_slot_id varchar(4)
)
CREATE TABLE course (
course_id varchar(8),
title varchar(50),
dept_name varchar(20),
credits numer... | Display a bar chart for what is the lowest salary in departments with average salary greater than the overall average, and list by the total number from high to low. | SELECT dept_name, MIN(salary) FROM instructor GROUP BY dept_name ORDER BY MIN(salary) DESC | nvbench |
CREATE TABLE table_name_11 (
circuit VARCHAR,
winning_driver VARCHAR
) | Which circuit did Guy Edwards win? | SELECT circuit FROM table_name_11 WHERE winning_driver = "guy edwards" | sql_create_context |
CREATE TABLE table_71557 (
"Name" text,
"Years" text,
"Gender" text,
"Area" text,
"Authority" text,
"Decile" real,
"Roll" real
) | What is the total number of Rolls of State schools in Hapuku with a Decile greater than 4? | SELECT COUNT("Roll") FROM table_71557 WHERE "Authority" = 'state' AND "Area" = 'hapuku' AND "Decile" > '4' | wikisql |
CREATE TABLE table_67342 (
"Driver" text,
"Team" text,
"Laps" real,
"Time/Retired" text,
"Grid" real,
"Points" real
) | Which driver has 7 points for team Australia? | SELECT "Driver" FROM table_67342 WHERE "Points" = '7' AND "Team" = 'team australia' | wikisql |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
va... | tell me the five most common diagnoses for patients who had previously been diagnosed with swelling in head & neck in the same month in 2105? | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions... | mimic_iii |
CREATE TABLE table_name_3 (
county VARCHAR,
year_left VARCHAR
) | From what county was the team that left the conference in 1993? | SELECT county FROM table_name_3 WHERE year_left = "1993" | sql_create_context |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE icustays (
row_id number,
subject_id number,
h... | show me the five year survival rate of patients who were prescribed lactulose after they were diagnosed with digestive neoplasm nos? | SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t4.charttime) > 5 * 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 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... | 列出医院5211360所有医疗就诊记录中患者的平均年龄是多少?保留平均年龄大于10岁的记录并且要根据不同的科室名称和出院诊断疾病名称 | SELECT qtb.MED_ORG_DEPT_NM, qtb.OUT_DIAG_DIS_NM, AVG(qtb.PERSON_AGE) FROM qtb WHERE qtb.MED_SER_ORG_NO = '5211360' GROUP BY qtb.MED_ORG_DEPT_NM, qtb.OUT_DIAG_DIS_NM HAVING AVG(qtb.PERSON_AGE) > 10 UNION SELECT gyb.MED_ORG_DEPT_NM, gyb.OUT_DIAG_DIS_NM, AVG(gyb.PERSON_AGE) FROM gyb WHERE gyb.MED_SER_ORG_NO = '5211360' GR... | css |
CREATE TABLE table_75296 (
"Position" text,
"Game 1" text,
"Game 2" text,
"Game 3" text,
"Exhibition*" text
) | What game 1 has halfback as a position? | SELECT "Game 1" FROM table_75296 WHERE "Position" = 'halfback' | wikisql |
CREATE TABLE buildings (
id number,
name text,
city text,
height number,
stories number,
status text
)
CREATE TABLE companies (
id number,
name text,
headquarters text,
industry text,
sales_billion number,
profits_billion number,
assets_billion number,
market_val... | Show the industries shared by companies whose headquarters are 'USA' and companies whose headquarters are 'China'. | SELECT industry FROM companies WHERE headquarters = "USA" INTERSECT SELECT industry FROM companies WHERE headquarters = "China" | spider |
CREATE TABLE table_11303 (
"Player" text,
"Position" text,
"Tries" real,
"Goals" real,
"Points" real
) | What is the average number of Tries for Nathan McAvoy? | SELECT AVG("Tries") FROM table_11303 WHERE "Player" = 'nathan mcavoy' | wikisql |
CREATE TABLE table_name_92 (
release_date VARCHAR,
series VARCHAR,
title VARCHAR
) | What is the release date of the mm series which has the title confederate honey? | SELECT release_date FROM table_name_92 WHERE series = "mm" AND title = "confederate honey" | sql_create_context |
CREATE TABLE table_1133 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game Site" text,
"Attendance" real
) | Name the number of week for game site being memorial stadium for buffalo bills | SELECT COUNT("Week") FROM table_1133 WHERE "Game Site" = 'Memorial Stadium' AND "Opponent" = 'Buffalo Bills' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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 te... | 在00年6月14日到2015年5月27日之内名叫沈景辉的患者被开出的所有检验报告单的检验报告单号都有什么? | SELECT zyjybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb 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 = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB WHERE person_info.XM = '沈景辉' ... | css |
CREATE TABLE table_23242933_2 (
original_air_date VARCHAR,
us_viewers__millions_ VARCHAR
) | When did 6.09 million people in the US see the original airing of an episode of the show? | SELECT original_air_date FROM table_23242933_2 WHERE us_viewers__millions_ = "6.09" | sql_create_context |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | Return a scatter chart about the correlation between Team_ID and All_Games_Percent . | SELECT Team_ID, All_Games_Percent FROM basketball_match | nvbench |
CREATE TABLE table_29520 (
"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
) | List the 1st air date for season 12. | SELECT "Original air date" FROM table_29520 WHERE "No. in season" = '12' | wikisql |
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 CLINIC_TYPE = '住院' AND MOD(MED_AMOUT, 1) = 0 | css |
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 demographic (... | provide the number of patients whose primary disease is complete heart block and drug route is tp? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.diagnosis = "COMPLETE HEART BLOCK" AND prescriptions.route = "TP" | mimicsql_data |
CREATE TABLE table_33001 (
"Driver" text,
"Car #" real,
"Make" text,
"Points" real,
"Laps" real,
"Winnings" text
) | How many total laps for the driver with Winnings of $116,033, and a Car # smaller than 18? | SELECT COUNT("Laps") FROM table_33001 WHERE "Winnings" = '$116,033' AND "Car #" < '18' | wikisql |
CREATE TABLE table_59161 (
"Year" real,
"Team/Chassis" text,
"Engine" text,
"Tyres" text,
"Pts." real
) | Which Team/Chassis has less than 65 points? | SELECT "Team/Chassis" FROM table_59161 WHERE "Pts." < '65' | wikisql |
CREATE TABLE table_34252 (
"interval name" text,
"size (steps)" real,
"size (cents)" real,
"just ratio" text,
"just (cents)" real,
"error" text
) | ratio of 16:13 has how many highest size (steps)? | SELECT MAX("size (steps)") FROM table_34252 WHERE "just ratio" = '16:13' | wikisql |
CREATE TABLE table_name_1 (
nominating_festival VARCHAR,
director_s_ VARCHAR
) | Name the nominating festival for director of 2004 | SELECT nominating_festival FROM table_name_1 WHERE director_s_ = "2004" | sql_create_context |
CREATE TABLE gwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | 查一下88581683这个病人在医院6417819中,出院诊断疾病名称包含失调的医疗就诊记录编码 | SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_ID = '88581683' AND gwyjzb.MED_SER_ORG_NO = '6417819' AND gwyjzb.OUT_DIAG_DIS_NM LIKE '%失调%' UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '88581683' AND fgwyjzb.MED_SER_ORG_NO = '6417819' AND fgwyjzb.OUT_DIAG_DIS_NM LIKE '%失调%' | css |
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... | 95072739患者开出的药品在哪几次医疗记录中被均高于8153.6元?列出医疗就诊编号都是什么? | SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '95072739' AND NOT qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT <= 8153.6) UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '95072739' AND NOT gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_k... | css |
CREATE TABLE table_32496 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Who is the away team with a score of 7.8 (50)? | SELECT "Away team" FROM table_32496 WHERE "Away team score" = '7.8 (50)' | wikisql |
CREATE TABLE order_items (
order_item_id number,
order_id number,
product_id number,
order_quantity text,
other_item_details text
)
CREATE TABLE customers (
customer_id text,
address_id number,
customer_name text,
customer_phone text,
customer_email_address text,
other_detai... | What are the store names of drama workshop groups? | SELECT store_name FROM drama_workshop_groups | spider |
CREATE TABLE table_name_51 (
losses VARCHAR,
south_west_dfl VARCHAR,
against VARCHAR
) | How many Losses have South West DFL of coleraine, and an Against smaller than 891? | SELECT COUNT(losses) FROM table_name_51 WHERE south_west_dfl = "coleraine" AND against < 891 | sql_create_context |
CREATE TABLE table_name_64 (
gold INTEGER,
nation VARCHAR,
bronze VARCHAR
) | Name the Gold which has a Nation of australia, and a Bronze smaller than 1? | SELECT MIN(gold) FROM table_name_64 WHERE nation = "australia" AND bronze < 1 | sql_create_context |
CREATE TABLE table_68739 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Pts." real
) | In 1972, what was the highest number of points with a Ford engine and an entrant of Brooke Bond Oxo Team Surtees? | SELECT MAX("Pts.") FROM table_68739 WHERE "Engine" = 'ford' AND "Entrant" = 'brooke bond oxo team surtees' AND "Year" = '1972' | wikisql |
CREATE TABLE table_47496 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Difference" text,
"Points 1" text
) | What is the average goals against when there are more than 42 played? | SELECT AVG("Goals Against") FROM table_47496 WHERE "Played" > '42' | wikisql |
CREATE TABLE table_203_349 (
id number,
"no. in\nseries" number,
"no. in\nseason" number,
"title" text,
"directed by" text,
"written by" text,
"original air date" text,
"production\ncode" text,
"u.s. viewers\n(millions)" number
) | when was a title aired previous to july 5 , 2007 ? | SELECT "title" FROM table_203_349 WHERE "original air date" < (SELECT "original air date" FROM table_203_349 WHERE "original air date" = 'july 5, 2007') ORDER BY "original air date" DESC LIMIT 1 | squall |
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 products with a price between 60 and 120, find name and code , and visualize them by a bar chart, sort by the X from low to high. | SELECT Name, Code FROM Products WHERE Price BETWEEN 60 AND 120 ORDER BY Name | nvbench |
CREATE TABLE table_name_21 (
tournament VARCHAR,
away_team VARCHAR,
home_team VARCHAR
) | What was the tournament where Japan was the home team and Mexico was the away team? | SELECT tournament FROM table_name_21 WHERE away_team = "mexico" AND home_team = "japan" | sql_create_context |
CREATE TABLE table_24808 (
"Player" text,
"Bundesliga" real,
"DFB-Pokal" real,
"UEFA Intertoto Cup" real,
"UEFA Cup" real,
"DFB-Ligapokal" real,
"Total" real
) | How many dfb-pokal did kevin-prince boateng have? | SELECT COUNT("DFB-Pokal") FROM table_24808 WHERE "Player" = 'Kevin-Prince Boateng' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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... | what is the number of patients whose admission type is elective and procedure long title is removal of t-tube, other bile duct tube, or liver tube? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND procedures.long_title = "Removal of T-tube, other bile duct tube, or liver tube" | mimicsql_data |
CREATE TABLE table_59684 (
"Date" text,
"Race" text,
"Track" text,
"Location" text,
"Distance" text,
"Surface" text,
"Purse" text,
"Finish" text
) | What is the Location of the Event on March 30, 2008? | SELECT "Location" FROM table_59684 WHERE "Date" = 'march 30, 2008' | wikisql |
CREATE TABLE table_name_85 (
institution VARCHAR,
enrollment INTEGER
) | Which college's enrollment is less than 1,000? | SELECT institution FROM table_name_85 WHERE enrollment < 1 OFFSET 000 | sql_create_context |
CREATE TABLE table_name_40 (
family VARCHAR,
name VARCHAR
) | Which family has a Name of humpback whale? | SELECT family FROM table_name_40 WHERE name = "humpback whale" | sql_create_context |
CREATE TABLE table_37148 (
"Rank" real,
"Country/territory/entity" text,
"Population" real,
"% of world population" text,
"Region" text
) | Name the most population for seychelles and rank less than 13 | SELECT MAX("Population") FROM table_37148 WHERE "Country/territory/entity" = 'seychelles' AND "Rank" < '13' | wikisql |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodici... | what were the four most commonly given microbiology tests for patients who had previously undergone diagnostic ultrasound of heart - transthoracic echocardiography within the same month? | SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'diagnostic ultrasound of heart - transthorac... | eicu |
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 ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TAB... | What are the names of the people that are teaching Core classes next Winter ? | SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instr... | advising |
CREATE TABLE table_name_49 (
player VARCHAR,
club_province VARCHAR
) | Who is the player from Aurillac? | SELECT player FROM table_name_49 WHERE club_province = "aurillac" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | give the number of patients whose death status is 1 and were given hydrocortisone oint 0.5%. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.expire_flag = "1" AND prescriptions.drug = "Hydrocortisone Oint 0.5%" | mimicsql_data |
CREATE TABLE table_45032 (
"Heat" real,
"Lane" real,
"Name" text,
"Country" text,
"Mark" text
) | What's the lowest lane found for a mark of 8.09 pb? | SELECT MIN("Lane") FROM table_45032 WHERE "Mark" = '8.09 pb' | wikisql |
CREATE TABLE table_name_74 (
home VARCHAR,
leading_scorer VARCHAR
) | Who was the home team of the game with manu gin bili (34) as the leading scorer? | SELECT home FROM table_name_74 WHERE leading_scorer = "manu ginóbili (34)" | sql_create_context |
CREATE TABLE Customer_Events (
Customer_Event_ID INTEGER,
customer_id INTEGER,
date_moved_in DATETIME,
property_id INTEGER,
resident_id INTEGER,
thing_id INTEGER
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_details VARCHAR(255)
)
CREATE TABLE Services (
service_id INTEG... | Give me a bar chart that the X-axis is the date_moved_in and the Y-axis is Count them, please bin X-axis into Year interval. | SELECT date_moved_in, COUNT(date_moved_in) FROM Customer_Events | nvbench |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,... | Top 100 users from bangladesh. | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%bangladesh%' OR LOWER(Location) LIKE '%bd' OR LOWER(Location) LIKE '%dhaka%' ORDER BY Reputation DESC LIMIT 100 | sede |
CREATE TABLE Accounts (
account_id INTEGER,
customer_id INTEGER,
date_account_opened DATETIME,
account_name VARCHAR(50),
other_account_details VARCHAR(255)
)
CREATE TABLE Invoice_Line_Items (
order_item_id INTEGER,
invoice_number INTEGER,
product_id INTEGER,
product_title VARCHAR(80... | Show the number of accounts for each customer in a bar chart grouping by customer's last name, and I want to display in ascending by the bars. | SELECT customer_last_name, COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY customer_last_name | nvbench |
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId numbe... | Top 200 SO Users from Mathura. | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE LOWER(Location) LIKE '%delhi%' OR UPPER(Location) LIKE '%DELHI%' OR Location LIKE '%Delhi%' AND Reputation <= 5000 ORDER BY Reputation DESC LIMIT 200 | sede |
CREATE TABLE table_75662 (
"Rank" real,
"Municipality" text,
"Province" text,
"Status" text,
"Area (km 2 )" real
) | What's the total of Rank that has an Area (KM 2) of 1050.14? | SELECT SUM("Rank") FROM table_75662 WHERE "Area (km 2 )" = '1050.14' | wikisql |
CREATE TABLE table_70869 (
"Name" text,
"Population (2009 estimate)" text,
"Largest City" text,
"Largest Metropolitan Area" text,
"Number of States" text
) | What is the 2009 estimate population of the Northeast? | SELECT "Population (2009 estimate)" FROM table_70869 WHERE "Name" = 'northeast' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.