context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_204_627 (
id number,
"date" text,
"opponent" text,
"score" text,
"top scorer (total points)" text,
"venue (location)" text
) | who scored more points , hrabak or singson ? | SELECT "top scorer (total points)" FROM table_204_627 WHERE "top scorer (total points)" IN ('mike hrabak', 'dale singson') ORDER BY "top scorer (total points)" DESC LIMIT 1 | squall |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
d... | what was the insurance name of patient 3125 during their current hospital encounter? | SELECT admissions.insurance FROM admissions WHERE admissions.subject_id = 3125 AND admissions.dischtime IS NULL | mimic_iii |
CREATE TABLE table_65799 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | What's the score on December 12, 1998? | SELECT "Score" FROM table_65799 WHERE "Date" = 'december 12, 1998' | wikisql |
CREATE TABLE employee (
emp_num number,
emp_lname text,
emp_fname text,
emp_initial text,
emp_jobcode text,
emp_hiredate time,
emp_dob time
)
CREATE TABLE student (
stu_num number,
stu_lname text,
stu_fname text,
stu_init text,
stu_dob time,
stu_hrs number,
stu_c... | Find names of all students who took some course and the course description. | SELECT T1.stu_fname, T1.stu_lname, T4.crs_description FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN class AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code | spider |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | Give me the comparison about Team_ID over the All_Road by a bar chart, and list by the Y-axis from high to low. | SELECT All_Road, Team_ID FROM basketball_match ORDER BY Team_ID DESC | nvbench |
CREATE TABLE course (
course_id text,
title text,
dept_name text,
credits number
)
CREATE TABLE takes (
id text,
course_id text,
sec_id text,
semester text,
year number,
grade text
)
CREATE TABLE student (
id text,
name text,
dept_name text,
tot_cred number
)
C... | What are the names of students who have taken Statistics courses? | SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id = T2.course_id JOIN student AS T3 ON T2.id = T3.id WHERE T1.dept_name = 'Statistics' | spider |
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,
... | 看看病患83449469做过的检查有什么 | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_ID = '83449469' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED... | css |
CREATE TABLE table_203802_2 (
english_party_name VARCHAR
) | What percent of the parliamentary election did the pensioners party receive | SELECT 2013 AS _parliamentary_election FROM table_203802_2 WHERE english_party_name = "Pensioners Party" | 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... | 在哪几次医疗记录中给患者37030215开出的药品均不超过2381.99元以及医疗就诊编号都是多少? | SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '37030215' AND NOT MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE AMOUNT > 2381.99) | css |
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 text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | 低于15岁的病人的医疗记录的医疗费总额是多少?统计平均值 | SELECT AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc21_t_kc24.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_AGE < 15) | css |
CREATE TABLE table_29301 (
"Frequency" text,
"Call sign" text,
"Name" text,
"Format" text,
"Owner" text,
"Target city/ market" text,
"City of license" text
) | What is the market for KLRJ? | SELECT "Target city/ market" FROM table_29301 WHERE "Call sign" = 'KLRJ' | wikisql |
CREATE TABLE table_203_494 (
id number,
"party" text,
"votes" number,
"%" number,
"swing" number,
"seats" number,
"change" number
) | which party held the most seats but had a lesser turnout ? | SELECT "party" FROM table_203_494 ORDER BY "seats" DESC LIMIT 1 | squall |
CREATE TABLE table_name_24 (
label VARCHAR,
year INTEGER
) | What label is after 2004? | SELECT label FROM table_name_24 WHERE year > 2004 | sql_create_context |
CREATE TABLE table_name_84 (
score VARCHAR,
date VARCHAR
) | What was the score for the date of 15/6/03 | SELECT score FROM table_name_84 WHERE date = "15/6/03" | sql_create_context |
CREATE TABLE table_204_841 (
id number,
"no." number,
"temple" text,
"honzon (main image)" text,
"city/town/village" text,
"prefecture" text
) | what is the first city/town/village listed in the table ? | SELECT "city/town/village" FROM table_204_841 WHERE id = 1 | squall |
CREATE TABLE table_13759592_2 (
institution VARCHAR,
founded VARCHAR
) | Which institution was founded in 1923? | SELECT institution FROM table_13759592_2 WHERE founded = 1923 | sql_create_context |
CREATE TABLE table_name_49 (
name VARCHAR,
term_end VARCHAR
) | What was the name of the leader whose term ended in 2013? | SELECT name FROM table_name_49 WHERE term_end = "2013" | sql_create_context |
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | IGNOREAnswers With Higher Score Than Accepted. | SELECT Title, Id, Score, ViewCount FROM Posts WHERE PostTypeId = 1 | sede |
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE state (
state_code text,
... | what flights go from SAN FRANCISCO to WASHINGTON via INDIANAPOLIS | 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 = 'WASHINGTON' AND CITY_2... | atis |
CREATE TABLE table_15463188_16 (
school_club_team VARCHAR,
number VARCHAR
) | Name the school/club team for 9 | SELECT school_club_team FROM table_15463188_16 WHERE number = "9" | sql_create_context |
CREATE TABLE table_204_357 (
id number,
"year" number,
"div." text,
"pos." text,
"cup" text,
"top scorer (league)" text,
"score" number
) | the number of times alisher kholigov was the top scorer in the league ? | SELECT COUNT(*) FROM table_204_357 WHERE "top scorer (league)" = 'alisher kholiqov' | squall |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
c... | had neurontin, midazolam (versed) 2 mg/2ml inj 2 mg or sodium chloride 0.9% 250 ml lvp been prescribed to patient 009-16880? | 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 = '009-16880')) AND medication.drugname IN ('neurontin', 'midazolam (versed) ... | eicu |
CREATE TABLE table_name_80 (
year INTEGER,
attendance INTEGER
) | How many years have less than 28,505 attendance? | SELECT AVG(year) FROM table_name_80 WHERE attendance < 28 OFFSET 505 | sql_create_context |
CREATE TABLE table_name_40 (
premierships VARCHAR,
venue VARCHAR
) | How many premierships for the queensland raceway? | SELECT premierships FROM table_name_40 WHERE venue = "queensland raceway" | sql_create_context |
CREATE TABLE table_19897294_11 (
no_in_season VARCHAR,
no_in_series VARCHAR
) | What episode in the season was episode us18 in the series? | SELECT COUNT(no_in_season) FROM table_19897294_11 WHERE no_in_series = "US18" | sql_create_context |
CREATE TABLE table_228973_5 (
written_by VARCHAR,
no_in_series VARCHAR
) | How many people wrote episode 68 in the series? | SELECT COUNT(written_by) FROM table_228973_5 WHERE no_in_series = 68 | sql_create_context |
CREATE TABLE table_27131 (
"Week" real,
"Date" text,
"Kickoff" text,
"Opponent" text,
"Final score" text,
"Team record" text,
"Game site" text,
"Attendance" real
) | What was the largest attendance at the Rheinstadion? | SELECT MAX("Attendance") FROM table_27131 WHERE "Game site" = 'Rheinstadion' | wikisql |
CREATE TABLE table_72512 (
"Round" real,
"Pick #" text,
"Player" text,
"Position" text,
"Nationality" text,
"College/junior/club team (league)" text
) | What is the pick number for round 2? | SELECT "Pick #" FROM table_72512 WHERE "Round" = '2' | wikisql |
CREATE TABLE table_36177 (
"Week" real,
"Date" text,
"Opponent" text,
"Location" text,
"Time ( ET )" text,
"Result" text,
"Record" text
) | Time ( ET ) of 1:00pm, and a Result of w 34 14 has what record? | SELECT "Record" FROM table_36177 WHERE "Time ( ET )" = '1:00pm' AND "Result" = 'w 34–14' | wikisql |
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, return a scatter chart about the correlation between code and code . | SELECT T1.Code, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code | nvbench |
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 text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | 在零六年六月三十日到零八年一月二十六日这一期间,统计手术量排在倒数的19个科室的ID和名称 | SELECT t_kc22.MED_ORG_DEPT_CD, t_kc22.MED_ORG_DEPT_NM FROM t_kc22 WHERE t_kc22.STA_DATE BETWEEN '2006-06-30' AND '2008-01-26' AND t_kc22.MED_INV_ITEM_TYPE = '手术费' GROUP BY t_kc22.MED_ORG_DEPT_CD ORDER BY COUNT(*) LIMIT 19 | css |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | count the number of patients whose year of birth is less than 2120 and lab test fluid is urine? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2120" AND lab.fluid = "Urine" | 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... | 编号为3173533的医院在零一年五月二十日到一六年十月十三日的这段时间里,有多少医疗费总额不超过8682.9元的科室 | SELECT COUNT(*) FROM (SELECT gwyjzb.MED_ORG_DEPT_CD FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '3173533' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2001-05-20' AND '2016-10-13' GROUP BY gwyjzb.MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) <= 8682.9 UNION SELECT fgwyjzb.... | css |
CREATE TABLE table_170097_1 (
pressure_in_hpa__mbar_ VARCHAR,
vacuum_range VARCHAR
) | What is the pressure in ultra high vacuum? | SELECT pressure_in_hpa__mbar_ FROM table_170097_1 WHERE vacuum_range = "Ultra high vacuum" | sql_create_context |
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar... | Has the class PEDDENT 593 been taught by anyone else , specifically Lutgarde Raskin ? | SELECT COUNT(*) > 0 FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'PEDDENT' AND course.number = 593 AND instructor.name LIKE '%Lutgarde Raskin%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instru... | advising |
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 jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
... | 列出孔华茂患者出院科室有哪几个名称不包含胸外在医院7783092中的住院就诊记录有哪些呢? | SELECT * FROM person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE person_info.XM = '孔华茂' AND hz_info.YLJGDM = '7783092' AND NOT zyjzjlb.CYKSMC LIKE '%胸外%' | css |
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | Cool guys - upvoters who never downvote others. Users with the most upvote count with zero downvote count | SELECT Id AS "user_link", DownVotes, UpVotes, (DownVotes + UpVotes) AS totalVotes FROM Users WHERE Reputation > 125 AND UpVotes > 1000 AND DownVotes = 0 ORDER BY UpVotes DESC | sede |
CREATE TABLE table_59298 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | What week did Cleveland Browns played? | SELECT AVG("Week") FROM table_59298 WHERE "Opponent" = 'cleveland browns' | wikisql |
CREATE TABLE table_9688 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | What is the result for week 12 against the Green Bay Packers? | SELECT "Result" FROM table_9688 WHERE "Week" > '12' AND "Opponent" = 'green bay packers' | wikisql |
CREATE TABLE table_15002265_1 (
womens_doubles VARCHAR,
mens_doubles VARCHAR
) | who is the the womens doubles with mens doubles being leopold bauer alfred kohlhauser | SELECT womens_doubles FROM table_15002265_1 WHERE mens_doubles = "Leopold Bauer Alfred Kohlhauser" | sql_create_context |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime... | what was the name of the drug that since 2 months ago patient 005-73237 was last prescribed? | SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-73237')) AND DATETIME(medication.drugstarttime) >= DATETIME(CUR... | eicu |
CREATE TABLE table_17635 (
"State" text,
"Preliminaries" text,
"Interview" text,
"Swimsuit" text,
"Evening Gown" text,
"Average" text
) | What swimsuit score did the state of Virginia contestant achieve? | SELECT COUNT("Swimsuit") FROM table_17635 WHERE "State" = 'Virginia' | wikisql |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImage... | Comment - to - post ratio. | SELECT COUNT(DISTINCT p.Id) AS "Posts", COUNT(DISTINCT c.Id) AS "Comments", (COUNT(DISTINCT c.Id) * 1.00) / COUNT(DISTINCT p.Id) AS "Comments/Post" FROM Posts AS p LEFT JOIN Comments AS c ON c.PostId = p.Id | sede |
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... | provide the number of patients whose admission type is urgent and diagnoses icd9 code is 5939? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "URGENT" AND diagnoses.icd9_code = "5939" | mimicsql_data |
CREATE TABLE table_35558 (
"Date" text,
"Placing" text,
"Beat by" text,
"Location" text,
"Distance" text
) | What was the placing of the race in which Chic won by 8gf? | SELECT "Placing" FROM table_35558 WHERE "Beat by" = 'won' AND "Distance" = '8gf' | wikisql |
CREATE TABLE table_45003 (
"Aircraft" text,
"Origin" text,
"Squadron" text,
"Display Aircraft" real,
"Dates" text
) | What are the dates of squadron 33? | SELECT "Dates" FROM table_45003 WHERE "Squadron" = 'squadron 33' | wikisql |
CREATE TABLE table_39427 (
"Category" text,
"Type" text,
"Attribute" text,
"Bubbles" text,
"Cancelable" text
) | Tell me the type for category of mouse and attribute of ondblclick | SELECT "Type" FROM table_39427 WHERE "Category" = 'mouse' AND "Attribute" = 'ondblclick' | wikisql |
CREATE TABLE table_52597 (
"Name" text,
"Years" text,
"Gender" text,
"Area" text,
"Authority" text,
"Decile" real,
"Roll" real
) | What is the highest decile value with a roll greater than 301 in Hauraki? | SELECT MAX("Decile") FROM table_52597 WHERE "Roll" > '301' AND "Area" = 'hauraki' | wikisql |
CREATE TABLE table_name_79 (
lane INTEGER,
nationality VARCHAR,
react VARCHAR
) | What is the average lane for Kenya with react larger than 0.212? | SELECT AVG(lane) FROM table_name_79 WHERE nationality = "kenya" AND react > 0.212 | sql_create_context |
CREATE TABLE table_21242 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | What was the Timberwolves' record on April 3? | SELECT "Record" FROM table_21242 WHERE "Date" = 'April 3' | wikisql |
CREATE TABLE mzjzjlb (
YLJGDM text,
JZLSH text,
KH text,
KLX number,
MJZH text,
HZXM text,
NLS number,
NLY number,
ZSEBZ number,
JZZTDM number,
JZZTMC text,
JZJSSJ time,
TXBZ number,
ZZBZ number,
WDBZ number,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
... | 查一下37432825患者59180800896的这次医疗就诊的检验报告单 | SELECT * FROM jybgb WHERE JZLSH = '59180800896' | css |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE... | For those employees who was hired before 2002-06-21, find hire_date and the average of employee_id bin hire_date by weekday, and visualize them by a bar chart. | SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' | nvbench |
CREATE TABLE table_name_14 (
heat VARCHAR,
lane VARCHAR,
mark VARCHAR,
name VARCHAR
) | When the lane is under 2 and the name is virgen benavides with a mark of 7.29, what's the total number of Heat found? | SELECT COUNT(heat) FROM table_name_14 WHERE mark = "7.29" AND name = "virgen benavides" AND lane < 2 | sql_create_context |
CREATE TABLE table_204_756 (
id number,
"year" number,
"team" text,
"games" number,
"combined tackles" number,
"tackles" number,
"assisted tackles" number,
"sacks" number,
"forced fumbles" number,
"fumble recoveries" number,
"fumble return yards" number,
"interceptions" n... | what is the only season he has fewer than three sacks ? | SELECT "year" FROM table_204_756 WHERE "sacks" < 3 | squall |
CREATE TABLE table_name_21 (
crowd INTEGER,
home_team VARCHAR
) | What was the attendance when South Melbourne played as the home team? | SELECT MIN(crowd) FROM table_name_21 WHERE home_team = "south melbourne" | sql_create_context |
CREATE TABLE table_7785 (
"Year" real,
"Tournament" text,
"Surface" text,
"Round" text,
"Winner" text,
"Score" text
) | What is Score, when Year is before 2007, and when Tournament is 'Sydney'? | SELECT "Score" FROM table_7785 WHERE "Year" < '2007' AND "Tournament" = 'sydney' | wikisql |
CREATE TABLE instructor (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
salary numeric(8,2)
)
CREATE TABLE department (
dept_name varchar(20),
building varchar(15),
budget numeric(12,2)
)
CREATE TABLE course (
course_id varchar(8),
title varchar(50),
dept_name varchar... | Find the name and budget of departments whose budgets are more than the average budget Visualize by bar chart, and could you display by the budget from low to high? | SELECT dept_name, budget FROM department WHERE budget > (SELECT AVG(budget) FROM department) ORDER BY budget | nvbench |
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Bod... | Get User Info (Total answers and Accepted Answers). Returns the URL with the user's original inputted URL, the users reputation, number of answers posted, number of answers accepted.. Returns the URL with the user's original inputted URL, the users reputation, number of answers posted, number of answers accepted.
For ... | SELECT answer.OwnerUserId AS "user_link", 'http://codegolf.stackexchange.com/users/' + CAST(answer.OwnerUserId AS TEXT(10)) AS "permalink", Users.Reputation, COUNT(answer.Id) AS "total_answers", COUNT(question.Id) AS "accepted_answers" FROM Posts AS answer LEFT OUTER JOIN Posts AS question ON question.AcceptedAnswerId ... | sede |
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... | provide the number of patients who has stayed in the hospital for more than 9 days with a main drug type | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "9" AND prescriptions.drug_type = "MAIN" | mimicsql_data |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | 在11年3月24日到16年7月23日这段时间,患者陶展鹏一共有多少检验报告单,把这些检验报告单的审核日期列出来 | SELECT jybgb.SHSJ FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb 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 WHERE person_info.XM = '陶展鹏' AND jybg... | css |
CREATE TABLE certificate (
eid number(9,0),
aid number(9,0)
)
CREATE TABLE flight (
flno number(4,0),
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0)
)
CREATE TABLE aircraft (
ai... | Show aircraft names and number of flights for each aircraft, and show by the name in desc. | SELECT name, COUNT(*) FROM flight AS T1 JOIN aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid ORDER BY name DESC | nvbench |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
ic... | what was the name of the allergy that until 58 months ago patient 011-35642 had. | SELECT allergy.allergyname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-35642')) AND DATETIME(allergy.allergytime) <= DATETIME(CURRENT_TIME()... | eicu |
CREATE TABLE table_28628309_9 (
category VARCHAR,
player VARCHAR
) | What are the names of the categories when the player is olsen racela? | SELECT category FROM table_28628309_9 WHERE player = "Olsen Racela" | sql_create_context |
CREATE TABLE table_name_31 (
title VARCHAR,
year VARCHAR,
platform VARCHAR
) | Which title has a year prior to 2008 and xbox 360 as the platform? | SELECT title FROM table_name_31 WHERE year < 2008 AND platform = "xbox 360" | sql_create_context |
CREATE TABLE flight (
flno number(4,0),
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0)
)
CREATE TABLE employee (
eid number(9,0),
name varchar2(30),
salary number(10,2)
)
CREATE... | Show name and distance for all aircrafts Visualize by bar chart, and display in desc by the names. | SELECT name, distance FROM aircraft ORDER BY name DESC | nvbench |
CREATE TABLE table_38818 (
"Game" text,
"Date" text,
"Result" text,
"Site" text,
"Series" text
) | Name the site for game of game 2 | SELECT "Site" FROM table_38818 WHERE "Game" = 'game 2' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
... | what is maximum age of patients whose primary disease is overdose and days of hospital stay is 69? | SELECT MAX(demographic.age) FROM demographic WHERE demographic.diagnosis = "OVERDOSE" AND demographic.days_stay = "69" | mimicsql_data |
CREATE TABLE people (
People_ID int,
Name text,
Height real,
Weight real,
Date_of_Birth text
)
CREATE TABLE entrepreneur (
Entrepreneur_ID int,
People_ID int,
Company text,
Money_Requested real,
Investor text
) | What are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor, rank from high to low by the x axis. | SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor ORDER BY Investor DESC | nvbench |
CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
CREATE TABLE Apartment_Bookings (
apt_booking_id INTEGER,
apt_id INTEGER,
guest_id INTEGER,
booking_status_code CHAR(15),
booking_start_date DATETIME,
booking_end_date DATETIME
)
CREATE TABLE View_Unit_Status ... | What is the number of booking start dates of the apartments with type code 'Duplex' in each year? Return a bar chart, list by the how many booking start date in desc. | SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = "Duplex" ORDER BY COUNT(booking_start_date) DESC | nvbench |
CREATE TABLE table_55215 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Who is the home team that scored 12.14 (86) when their opponent scored 22.15 (147)? | SELECT "Home team" FROM table_55215 WHERE "Home team score" = '12.14 (86)' AND "Away team score" = '22.15 (147)' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (... | what is drug route of drug name buspirone? | SELECT prescriptions.route FROM prescriptions WHERE prescriptions.drug = "BusPIRone" | mimicsql_data |
CREATE TABLE table_name_23 (
tenure VARCHAR,
name VARCHAR
) | What is Gary David Saunders' Tenure? | SELECT tenure FROM table_name_23 WHERE name = "gary david saunders" | sql_create_context |
CREATE TABLE table_11625 (
"Year" real,
"Athlete" text,
"Country/State" text,
"Time" text,
"Location" text
) | Which Athlete is from the United Kingdom? | SELECT "Athlete" FROM table_11625 WHERE "Country/State" = 'united kingdom' | wikisql |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | 看下患者戚婉然在二零零五年十一月二日到二零一零年三月十八日内所有检验结果指标记录的检测人为章光济的检验指标流水号可以吗 | SELECT jyjgzbb.JYZBLSH FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jyb... | css |
CREATE TABLE table_204_245 (
id number,
"#" number,
"wrestlers" text,
"reign" number,
"date" text,
"days\nheld" number,
"location" text,
"event" text,
"notes" text
) | other than scorpio , jr. and super crazy , name a championship that took place at iwl oktoberfest . | SELECT "wrestlers" FROM table_204_245 WHERE "wrestlers" <> 'scorpio, jr. and super crazy' AND "event" = 'iwl oktoberfest' | squall |
CREATE TABLE event (
id number,
name text,
stadium_id number,
year text
)
CREATE TABLE record (
id number,
result text,
swimmer_id number,
event_id number
)
CREATE TABLE stadium (
id number,
name text,
capacity number,
city text,
country text,
opening_year numbe... | Find the name and nationality of the swimmer who has won (i.e., has a result of 'win') more than 1 time. | SELECT t1.name, t1.nationality FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE result = 'Win' GROUP BY t2.swimmer_id HAVING COUNT(*) > 1 | spider |
CREATE TABLE table_1346137_4 (
party VARCHAR,
incumbent VARCHAR
) | What was the winning party when the incumbent was richard s. whaley? | SELECT party FROM table_1346137_4 WHERE incumbent = "Richard S. Whaley" | sql_create_context |
CREATE TABLE table_31321 (
"SAR No." real,
"Builder" text,
"Year" real,
"Works No." real,
"Firebox" text,
"Driver Diameter" text
) | What are the works numbers where the year is 1929 and the driver diameter is 60'/1520mm? | SELECT "Works No." FROM table_31321 WHERE "Year" = '1929' AND "Driver Diameter" = '60"/1520mm' | wikisql |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutput... | what is the average value of heartrate of patient 002-44624? | SELECT AVG(vitalperiodic.heartrate) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-44624')) AND NOT vitalperiodic.heartrate IS NULL | eicu |
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time... | show me the flights from BOSTON to PITTSBURGH | 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, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBU... | atis |
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 patients whose year of death is less than or equal to 2183 and drug code is rosi8? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dod_year <= "2183.0" AND prescriptions.formulary_drug_cd = "ROSI8" | mimicsql_data |
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8),
PROF_NUM int
)
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION varchar(4),
PROF_HIG... | Find the average gpa of all students in each department with a pie chart. | SELECT DEPT_CODE, AVG(STU_GPA) FROM STUDENT GROUP BY DEPT_CODE | nvbench |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
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,
H... | 把2001年6月19日到2017年10月17日期间患者葛志文的主要就医医生是哪位了解一下 | SELECT t_kc21.OUT_DIAG_DOC_CD, t_kc21.OUT_DIAG_DOC_NM FROM t_kc21 WHERE t_kc21.PERSON_NM = '葛志文' AND t_kc21.IN_HOSP_DATE BETWEEN '2001-06-19' AND '2017-10-17' GROUP BY t_kc21.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC LIMIT 1 | css |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | tell me the admission type and primary disease of subject id 2560. | SELECT demographic.admission_type, demographic.diagnosis FROM demographic WHERE demographic.subject_id = "2560" | mimicsql_data |
CREATE TABLE table_25147 (
"Year" real,
"Championship" text,
"54 holes" text,
"Winning score" text,
"Margin" text,
"Runner(s)-up" text
) | Name the year for willie goggin | SELECT "Year" FROM table_25147 WHERE "Runner(s)-up" = 'Willie Goggin' | wikisql |
CREATE TABLE table_14253123_1 (
area_sq_mi__km_2____rank_ VARCHAR,
county_seat VARCHAR
) | When Vincennes is the county seat what is the area sq mi (km 2 ) (rank) ? | SELECT area_sq_mi__km_2____rank_ FROM table_14253123_1 WHERE county_seat = "Vincennes" | sql_create_context |
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program (
program_id int,
name v... | Do you know who the instructor is for Interdisciplinary English this semester ? | 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 INNER JOIN semester... | advising |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE... | what was the monthly maximum value of weight for patient 23930 in 2103? | SELECT MAX(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 23930)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admi... | mimic_iii |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
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,
C... | 去除金额最低的药品,其余按金额降序排列,列出患者被医疗就诊90671631959中开出的所有药品编码和金额及其名称的多少? | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.AMOUNT FROM t_kc22 WHERE t_kc21_t_kc22.MED_CLINIC_ID = '90671631959' AND t_kc22.AMOUNT > (SELECT MIN(t_kc22.AMOUNT) FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.ME... | css |
CREATE TABLE table_27374004_2 (
club VARCHAR,
chairman VARCHAR
) | What is the club when the chairman is roger lambrecht? | SELECT club FROM table_27374004_2 WHERE chairman = "Roger Lambrecht" | sql_create_context |
CREATE TABLE table_name_18 (
first_elected INTEGER,
incumbent VARCHAR
) | What is John Shadegg's First Elected date? | SELECT AVG(first_elected) FROM table_name_18 WHERE incumbent = "john shadegg" | sql_create_context |
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 countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE T... | For all employees who have the letters D or S in their first name, for department_id, hire_date, visualize the trend, and could you rank x axis from low to high order? | SELECT HIRE_DATE, DEPARTMENT_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY HIRE_DATE | nvbench |
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... | Closed questions in the [row] tag. | SELECT DISTINCT Id, Score, Title FROM Posts AS p JOIN (SELECT PostId FROM PostHistory AS ph JOIN PostHistoryTypes AS pht ON ph.PostHistoryTypeId = pht.Id WHERE pht.Name = 'Post Closed') AS closed ON p.Id = closed.PostId WHERE Tags LIKE '%<row>%' AND NOT ClosedDate IS NULL AND Score > -3 AND AcceptedAnswerId IS NULL ORD... | sede |
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 sum of revenue over the headquarter , and group by attribute headquarter by a bar chart, rank in ascending by the y-axis. | SELECT Headquarter, SUM(Revenue) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY SUM(Revenue) | nvbench |
CREATE TABLE table_46422 (
"Name" text,
"Country" text,
"Loan Club" text,
"Started" text,
"Ended" text,
"Start Source" text,
"End Source" text
) | when was the loan ended when the country is ghana? | SELECT "Ended" FROM table_46422 WHERE "Country" = 'ghana' | wikisql |
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
... | All my answers in stackoverflow. All my answers in stackoverflow | SELECT * FROM Posts AS q INNER JOIN Posts AS a ON q.Id = a.ParentId WHERE a.OwnerUserId = @UserId AND a.PostTypeId = 2 ORDER BY q.CreationDate | sede |
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 ... | 日期均在2013年8月27日之前患者喻鸿达在哪些门诊就诊记录对应的检验报告单的报告?列出门诊就诊流水号是啥? | 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.person_info_XM = '喻鸿达' AND NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2013-08-27') | css |
CREATE TABLE table_25551 (
"Date" text,
"Location" text,
"Opponent" text,
"Sooners Points" real,
"Opp. Points" real,
"Record" text
) | How many points did the opponents score at the game in Knoxville? | SELECT MIN("Opp. Points") FROM table_25551 WHERE "Location" = 'Knoxville' | wikisql |
CREATE TABLE table_56189 (
"Player" text,
"Rec." real,
"Yards" real,
"Avg." real,
"TD's" real,
"Long" real
) | What is the total average for long 10? | SELECT COUNT("Avg.") FROM table_56189 WHERE "Long" = '10' | wikisql |
CREATE TABLE table_25132 (
"Year" real,
"Network" text,
"Race caller" text,
"s Host" text,
"s Analyst" text,
"Reporters" text,
"Trophy presentation" text
) | Who were the reporters for the 1977 Belmont Stakes? | SELECT "Reporters" FROM table_25132 WHERE "Year" = '1977' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.