context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_41758 (
"Driver" text,
"Wins" real,
"Starts" real,
"Sprint" real,
"Feature" real
) | How many features did Adam Carroll win 6 times when the start was larger than 32? | SELECT COUNT("Feature") FROM table_41758 WHERE "Wins" = '6' AND "Driver" = 'adam carroll' AND "Starts" > '32' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
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,... | 18416093这个病人的检验报告结果指标均正常的有哪些?检验报告单号是什么 | (SELECT jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb 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 WHERE hz_info.RYBH = '18416093' AND NOT jybgb.BGDH IN (SELECT BGDH FROM jyjgzbb WHERE JCZ... | css |
CREATE TABLE table_13618584_1 (
district VARCHAR
) | What was the 2007 result in the 28th district? | SELECT 2007 AS _result FROM table_13618584_1 WHERE district = "28th" | sql_create_context |
CREATE TABLE prereq (
course_id varchar(8),
prereq_id varchar(8)
)
CREATE TABLE department (
dept_name varchar(20),
building varchar(15),
budget numeric(12,2)
)
CREATE TABLE advisor (
s_ID varchar(5),
i_ID varchar(5)
)
CREATE TABLE section (
course_id varchar(8),
sec_id varchar(8)... | Visualize a bar chart for how many students are in each department?, and show in ascending by the Y. | SELECT dept_name, COUNT(*) FROM student GROUP BY dept_name ORDER BY COUNT(*) | nvbench |
CREATE TABLE table_16175064_3 (
season__number VARCHAR,
director_s_ VARCHAR,
series__number VARCHAR
) | What is the season number of the episode directed by Donald Crombie and the series number is 40? | SELECT season__number FROM table_16175064_3 WHERE director_s_ = "Donald Crombie" AND series__number = 40 | sql_create_context |
CREATE TABLE table_76560 (
"Sambalpuri Cinema" text,
"Kosal" text,
"Western Odisha" text,
"Sitalsasthi Carnival" text,
"Sambalpuri Language" text,
"Sambalpuri Saree" text
) | What is the sitalsasthi carnival with hirakud as sambalpuri saree? | SELECT "Sitalsasthi Carnival" FROM table_76560 WHERE "Sambalpuri Saree" = 'hirakud' | wikisql |
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate tim... | Tag synonyms where both tags have some questions. As far as I can tell, this happens when the tags were synonymized without merging | SELECT ts.SourceTagName AS "tags", t1.Count, ts.TargetTagName AS "tags", t2.Count, ts.CreationDate, ts.OwnerUserId AS "user_link", ts.ApprovalDate, ts.ApprovedByUserId AS "user_link" FROM TagSynonyms AS ts INNER JOIN Tags AS t1 ON ts.SourceTagName = t1.TagName INNER JOIN Tags AS t2 ON ts.TargetTagName = t2.TagName WHER... | sede |
CREATE TABLE table_name_67 (
winner VARCHAR,
tournament VARCHAR
) | Who was the winner in the Indian Wells? | SELECT winner FROM table_name_67 WHERE tournament = "indian wells" | sql_create_context |
CREATE TABLE table_204_320 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | how many more total medals did china win over japan ? | SELECT (SELECT "total" FROM table_204_320 WHERE "nation" = 'china') - (SELECT "total" FROM table_204_320 WHERE "nation" = 'japan') | squall |
CREATE TABLE table_64997 (
"Rank:" real,
"Premier:" text,
"Party:" text,
"Assumed Office:" text,
"Left Office:" text,
"TOTAL Time in Office:" text
) | What rank was the premier Sir John See? | SELECT COUNT("Rank:") FROM table_64997 WHERE "Premier:" = 'sir john see' | wikisql |
CREATE TABLE table_name_57 (
crowd INTEGER,
venue VARCHAR
) | What is the smallest crowd at princes park? | SELECT MIN(crowd) FROM table_name_57 WHERE venue = "princes park" | sql_create_context |
CREATE TABLE table_8591 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | On December 25, what was the record? | SELECT "Record" FROM table_8591 WHERE "Date" = 'december 25' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | give me the number of patients whose drug name is vitamin b complex? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Vitamin B Complex" | mimicsql_data |
CREATE TABLE table_58364 (
"Mid Gippsland FL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | Name the lowest against for when wins are greater than 14, draws is 0 and losses are 4 | SELECT MIN("Against") FROM table_58364 WHERE "Losses" = '4' AND "Draws" = '0' AND "Wins" > '14' | wikisql |
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,
... | 在医疗就诊92694445974中,科室名中没有肾内科这几个字的科室开过哪些医疗费用明细项目 | SELECT * 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.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '92694445974' AND NOT t_kc22.MED_ORG_DEPT_NM LIKE '%肾内科%' | css |
CREATE TABLE table_name_20 (
nationality VARCHAR,
name VARCHAR
) | What is Anna Khlistunova's Nationality? | SELECT nationality FROM table_name_20 WHERE name = "anna khlistunova" | sql_create_context |
CREATE TABLE Asset_Parts (
asset_id INTEGER,
part_id INTEGER
)
CREATE TABLE Part_Faults (
part_fault_id INTEGER,
part_id INTEGER,
fault_short_name VARCHAR(20),
fault_description VARCHAR(255),
other_fault_details VARCHAR(255)
)
CREATE TABLE Engineer_Visits (
engineer_visit_id INTEGER,
... | A bar chart about the number of faults for different fault status of all the faults recoreded in the logs, and rank by the x axis from low to high. | SELECT fault_status, COUNT(fault_status) FROM Fault_Log AS T1 JOIN Fault_Log_Parts AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY fault_status ORDER BY fault_status | nvbench |
CREATE TABLE table_name_82 (
surface VARCHAR,
score VARCHAR
) | On what surface was the match played with a score of 4 6, 6 3, 6 1? | SELECT surface FROM table_name_82 WHERE score = "4–6, 6–3, 6–1" | sql_create_context |
CREATE TABLE table_23465864_5 (
rider VARCHAR,
mon_24_aug VARCHAR
) | What is every rider on Monday August 24 at 21' 12.02 106.781mph? | SELECT rider FROM table_23465864_5 WHERE mon_24_aug = "21' 12.02 106.781mph" | sql_create_context |
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, return a bar chart about the distribution of founder and the sum of revenue , and group by attribute founder. | SELECT Founder, SUM(Revenue) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder | nvbench |
CREATE TABLE table_name_21 (
secondary_military_speciality VARCHAR,
real_name VARCHAR
) | What is Gareth Morgan's Secondary Military Specialty? | SELECT secondary_military_speciality FROM table_name_21 WHERE real_name = "gareth morgan" | sql_create_context |
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE journal (
journalid int,
journalname... | What papers were published at CVPR in 2015 were about Semantic Segmentation ? | SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase, venue WHERE keyphrase.keyphrasename = 'Semantic Segmentation' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year = 2015 AND venue.venueid = paper.venueid AND venue.venuename = 'CVPR' | scholar |
CREATE TABLE photos (
id int,
camera_lens_id int,
mountain_id int,
color text,
name text
)
CREATE TABLE camera_lens (
id int,
brand text,
name text,
focal_length_mm real,
max_aperture real
)
CREATE TABLE mountain (
id int,
name text,
Height real,
Prominence real... | Draw a bar chart for what are the id and name of the mountains that have at least 2 photos?, sort by the bars in descending. | SELECT T1.name, T1.id FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id ORDER BY T1.name DESC | nvbench |
CREATE TABLE table_name_56 (
to_par VARCHAR,
score VARCHAR
) | What to par has 66 as the score? | SELECT to_par FROM table_name_56 WHERE score = 66 | sql_create_context |
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 microlab (
microlabid number,
... | patient 010-29520 was admitted since 2104 to the hospital? | SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '010-29520' AND STRFTIME('%y', patient.hospitaladmittime) >= '2104' | eicu |
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
round_trip_re... | what 's the first flight from BOSTON to SAN FRANCISCO | 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 = 'SAN FR... | atis |
CREATE TABLE table_100518_1 (
direction VARCHAR,
mantra VARCHAR
) | Where the mantra is 'o ya v yuve nama ', what is the direction of the guardian? | SELECT direction FROM table_100518_1 WHERE mantra = "Oṃ Yaṃ Vāyuve Namaḥ" | sql_create_context |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
sy... | what was the first generic output time for patient 007-9115 on the first icu visit? | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-9115') AND NOT patient.unitdischargetime IS NULL ... | eicu |
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 procedures (
... | count the number of patients whose admission location is emergency room admit and procedure short title is cardiac rhythm conv nec? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND procedures.short_title = "Cardiac rhythm conv NEC" | mimicsql_data |
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... | 患者陈梦凡在5107523这个医院被开过单价最高的药是什么?列出药品的编码、名称、单价 | SELECT SOC_SRT_DIRE_CD, SOC_SRT_DIRE_NM, UNIVALENT FROM t_kc22 WHERE MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_NM = '陈梦凡' AND MED_SER_ORG_NO = '5107523') ORDER BY UNIVALENT DESC LIMIT 1 | css |
CREATE TABLE table_79483 (
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What's the sum of Silver with total smaller than 560, a Bronze larger than 6, and a Gold of 3? | SELECT SUM("Silver") FROM table_79483 WHERE "Total" < '560' AND "Bronze" > '6' AND "Gold" = '3' | wikisql |
CREATE TABLE table_13836704_7 (
freight___metric_tonnes__ INTEGER,
airport VARCHAR
) | What is Edinburgh's airport's freight in metric tonnes? | SELECT MAX(freight___metric_tonnes__) FROM table_13836704_7 WHERE airport = "Edinburgh" | sql_create_context |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid num... | what is patient 012-66291's height for the first time in this month? | SELECT patient.admissionheight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-66291') AND NOT patient.admissionheight IS NULL AND DATETIME(patient.unitadmittime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', ... | eicu |
CREATE TABLE table_50704 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | What is the Country of the Player with a To par of 5? | SELECT "Country" FROM table_50704 WHERE "To par" = '–5' | wikisql |
CREATE TABLE table_60087 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) | Name the Round that has Res of win and an Opponent of demian maia? | SELECT SUM("Round") FROM table_60087 WHERE "Res." = 'win' AND "Opponent" = 'demian maia' | wikisql |
CREATE TABLE table_49078 (
"Outcome" text,
"Year" real,
"Pro Slam Championship" text,
"Surface" text,
"Opponent in the final" text,
"Score in the final" text
) | What is Opponent In The Final, when Year is '1942'? | SELECT "Opponent in the final" FROM table_49078 WHERE "Year" = '1942' | wikisql |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsysto... | what was the name of the drug prescribed during the last hospital encounter to patient 002-56853 two times? | SELECT t1.drugname FROM (SELECT medication.drugname, COUNT(medication.drugstarttime) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002... | eicu |
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... | 16715160的患者自05.6.17起,到12.4.15止,看过病的医院总共有多少家 | SELECT COUNT(DISTINCT MED_SER_ORG_NO) FROM t_kc21 WHERE PERSON_ID = '16715160' AND IN_HOSP_DATE BETWEEN '2005-06-17' AND '2012-04-15' | css |
CREATE TABLE table_8741 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Partner" text,
"Opponents in final" text,
"Score in final" text
) | What is the sum of Year(s), when Championship is 'Australian Open', when Outcome is 'Runner-Up', and when Score in Final is 3-6, 6-3, 6-2? | SELECT SUM("Year") FROM table_8741 WHERE "Championship" = 'australian open' AND "Outcome" = 'runner-up' AND "Score in final" = '3-6, 6-3, 6-2' | wikisql |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE lab (
labid numb... | has patient 022-47232 been prescribed ecotrin ec in 01/this year. | SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-47232')) AND medication.drugname = 'ecotrin ec' AND DATETIME(medicatio... | eicu |
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text... | select count(*), Date(CreationDate) from posts group by Date(CreationDate) order by CreationDate. | SELECT COUNT(*), DAY(CreationDate), MONTH(CreationDate), YEAR(CreationDate) FROM Posts GROUP BY DAY(CreationDate), MONTH(CreationDate), YEAR(CreationDate) ORDER BY YEAR(CreationDate) DESC, MONTH(CreationDate) DESC, DAY(CreationDate) DESC | sede |
CREATE TABLE table_name_35 (
overall INTEGER,
name VARCHAR,
pick VARCHAR
) | What is the highest overall pick number for george nicula who had a pick smaller than 9? | SELECT MAX(overall) FROM table_name_35 WHERE name = "george nicula" AND pick < 9 | sql_create_context |
CREATE TABLE table_name_50 (
year VARCHAR,
publisher VARCHAR
) | Name the year when the publisher was argonaut games sierra entertainment | SELECT year FROM table_name_50 WHERE publisher = "argonaut games sierra entertainment" | sql_create_context |
CREATE TABLE table_2889 (
"Rank" real,
"Rider" text,
"Mon 24 Aug" text,
"Tues 25 Aug" text,
"Wed 26 Aug" text,
"Thurs 27 Aug" text,
"Fri 28 Aug" text
) | What is the value for Monday August 24 if Friday August 28 is 26' 04.60 86.814mph? | SELECT "Mon 24 Aug" FROM table_2889 WHERE "Fri 28 Aug" = '26'' 04.60 86.814mph' | wikisql |
CREATE TABLE table_63788 (
"Rank" real,
"Athlete" text,
"Country" text,
"Time" text,
"Notes" text
) | What was Law Hiu Fung's time? | SELECT "Time" FROM table_63788 WHERE "Athlete" = 'law hiu fung' | wikisql |
CREATE TABLE table_name_79 (
season VARCHAR,
losses VARCHAR,
team VARCHAR
) | Which season had 16 losses for the Hampshire team? | SELECT season FROM table_name_79 WHERE losses = "16" AND team = "hampshire" | sql_create_context |
CREATE TABLE table_68470 (
"!Aces" real,
"Player" real,
"Opponent" text,
"Round" text,
"Year" text,
"Event" real,
"Surface" text,
"Sets" text
) | How many players were in the event after 2011 with less than 9 aces? | SELECT COUNT("Player") FROM table_68470 WHERE "Event" > '2011' AND "!Aces" < '9' | wikisql |
CREATE TABLE table_name_46 (
gershausen VARCHAR,
willingshain VARCHAR,
reckerode_ VARCHAR
) | What Gershausen has a Willingshain of 243 and Reckerode of 224? | SELECT gershausen FROM table_name_46 WHERE willingshain = "243" AND reckerode_ * * * * = "224" | sql_create_context |
CREATE TABLE table_name_82 (
top_10 INTEGER,
avg_start VARCHAR
) | How many times did the team with an average start of 18.9 make the top 10? | SELECT SUM(top_10) FROM table_name_82 WHERE avg_start = 18.9 | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
... | count the number of patients born before 1850 who have been diagnosed with unspecified intestinal obstruction. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.dob_year < "1850" AND diagnoses.short_title = "Intestinal obstruct NOS" | mimicsql_data |
CREATE TABLE conference (
cid int,
homepage varchar,
name varchar
)
CREATE TABLE domain_author (
aid int,
did int
)
CREATE TABLE writes (
aid int,
pid int
)
CREATE TABLE cite (
cited int,
citing int
)
CREATE TABLE publication_keyword (
kid int,
pid int
)
CREATE TABLE key... | return me the conferences, which have more than 60 papers containing keyword ' Relational Database ' . | SELECT conference.name FROM conference, keyword, publication, publication_keyword WHERE keyword.keyword = 'Relational Database' AND publication_keyword.kid = keyword.kid AND publication.cid = conference.cid AND publication.pid = publication_keyword.pid GROUP BY conference.name HAVING COUNT(DISTINCT (publication.title))... | academic |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insuranc... | when did patient 14467 enter the hospital for the last time since 2105? | SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 14467 AND STRFTIME('%y', admissions.admittime) >= '2105' ORDER BY admissions.admittime DESC LIMIT 1 | mimic_iii |
CREATE TABLE greatermanchestercrime (
crimeid text,
crimets time,
location text,
lsoa text,
type text,
outcome text
) | When was the last instance of a violent or sexual offense in Manchester? | SELECT crimeid FROM greatermanchestercrime WHERE type = "Violence and sexual offences" ORDER BY crimets DESC LIMIT 1 | greatermanchestercrime |
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
)
... | how many patients whose drug route is sc? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.route = "SC" | mimicsql_data |
CREATE TABLE table_32848 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the sum of bronze when silver is greater than 3? | SELECT SUM("Bronze") FROM table_32848 WHERE "Silver" > '3' | wikisql |
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE program (
program_id int,
name varchar... | What easy class can I take that will fulfill the ULCS requirement ? | SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_co... | advising |
CREATE TABLE table_64177 (
"Position" real,
"Gymnast" text,
"A Score" real,
"B Score" real,
"Total" real
) | What is the total for Danny Pinheiro Rodrigues ( fra ), in a Position smaller than 7? | SELECT AVG("Total") FROM table_64177 WHERE "Gymnast" = 'danny pinheiro rodrigues ( fra )' AND "Position" < '7' | wikisql |
CREATE TABLE table_name_57 (
writer_s_ VARCHAR,
recipient VARCHAR
) | Who was the writer when Parkville Pictures Ltd was the recipient? | SELECT writer_s_ FROM table_name_57 WHERE recipient = "parkville pictures ltd" | sql_create_context |
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 gsi (
course_offering_id int,
student_id int
)
CREATE TABLE instructor (
... | What classes are required to declare JUDAIC as a major ? | SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE course.department LIKE '%JUDAIC%' AND program_course.category LIKE 'PreMajor' AND program_course.course_id = course.course_id | advising |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugst... | has there been any organism found until 2103 during the first other microbiology test of patient 031-22988? | SELECT COUNT(*) > 0 FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-22988')) AND microlab.culturesite = 'other' AND STRFTIME('%y', microlab.cu... | eicu |
CREATE TABLE table_18431 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | Name the result for massachusetts 3 | SELECT "Result" FROM table_18431 WHERE "District" = 'Massachusetts 3' | wikisql |
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,
... | 从06年9月17日开始,截止到11年3月29日,病患在医疗机构6831757接受治疗需要平均住院多长时间 | SELECT AVG(gwyjzb.IN_HOSP_DAYS) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '6831757' AND gwyjzb.IN_HOSP_DATE BETWEEN '2006-09-17' AND '2011-03-29' UNION SELECT AVG(fgwyjzb.IN_HOSP_DAYS) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '6831757' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2006-09-17' AND '2011-03-29' | css |
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
... | Post Count Comparison Between Esri and Qgis tags.. | SELECT 'QGIS Tags' AS Software, Count AS PostCount FROM Tags WHERE TagName LIKE 'qgis%' | sede |
CREATE TABLE table_5520 (
"Position" real,
"Album title" text,
"Artist" text,
"Sales" real,
"Peak" text
) | How many copies of scouting for girls were sold? | SELECT COUNT("Sales") FROM table_5520 WHERE "Album title" = 'scouting for girls' | wikisql |
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,... | i'd like an early flight tomorrow from COLUMBUS to NASHVILLE | 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 (((flight.departure_time BETWEEN 1000 AND 0) AND date_day.day_number = 20 AND date_day.month_number = 1 AND date_day.year = 1991 AND days.day_nam... | atis |
CREATE TABLE table_name_5 (
dob VARCHAR,
surname VARCHAR
) | When is Biddle's DOB? | SELECT dob FROM table_name_5 WHERE surname = "biddle" | sql_create_context |
CREATE TABLE market (
Market_ID int,
District text,
Num_of_employees int,
Num_of_shops real,
Ranking int
)
CREATE TABLE phone (
Name text,
Phone_ID int,
Memory_in_G int,
Carrier text,
Price real
)
CREATE TABLE phone_market (
Market_ID int,
Phone_ID text,
Num_of_stoc... | Can you show a bar chart to visualize the number of carriers?, and I want to display in ascending by the x-axis. | SELECT Carrier, COUNT(Carrier) FROM phone GROUP BY Carrier ORDER BY Carrier | nvbench |
CREATE TABLE table_49573 (
"Date" text,
"Place" text,
"Race winners" text,
"GP winner" text,
"Source" text
) | What source has a race winner of ben adriaenssen / ben van den bogaart, and the gp winner of ben adriaenssen / ben van den bogaart, for the date of 1 april? | SELECT "Source" FROM table_49573 WHERE "Race winners" = 'ben adriaenssen / ben van den bogaart' AND "GP winner" = 'ben adriaenssen / ben van den bogaart' AND "Date" = '1 april' | wikisql |
CREATE TABLE table_64480 (
"Rank" real,
"Name" text,
"1st run" text,
"2nd run" text,
"3rd run" text,
"Total" real
) | Which Rank has a Total smaller than 10, and a 3rd run of 36.457 (2)? | SELECT MAX("Rank") FROM table_64480 WHERE "Total" < '10' AND "3rd run" = '36.457 (2)' | 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... | 患者的门诊诊断为躁狂型精神病的检测指标758740的参考值范围下限和上限是什么? | SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM txmzjzjlb JOIN jybgb JOIN jyjgzbb ON txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE txmzjzjlb.JZZDSM = '躁狂型精神病' AND jyjgzbb.JCZBDM = '758740' UNION SELECT jyjgzbb.CKZFWXX... | css |
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 procedure, that patient 009-5801 was last received during the last hospital encounter? | SELECT treatment.treatmentname FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-5801' AND NOT patient.hospitaldischargetime IS NULL ORDER BY ... | eicu |
CREATE TABLE table_39515 (
"Number" real,
"Builder" text,
"Type" text,
"Date" text,
"Works number" real
) | Name the builder for 4/1906 and works number more than 199 | SELECT "Builder" FROM table_39515 WHERE "Works number" > '199' AND "Date" = '4/1906' | wikisql |
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 Apartment_Buildin... | Return the apartment number and the number of rooms for each apartment by a bar chart, and show by the y-axis from high to low. | SELECT apt_number, room_count FROM Apartments ORDER BY room_count DESC | nvbench |
CREATE TABLE table_name_41 (
total_apps INTEGER,
fa_cup_apps VARCHAR,
total_goals VARCHAR
) | What is the highest apps total with FA cup apps of 26 with total number of goals larger than 9? | SELECT MAX(total_apps) FROM table_name_41 WHERE fa_cup_apps = 26 AND total_goals > 9 | sql_create_context |
CREATE TABLE table_9499 (
"Model number" text,
"sSpec number" text,
"Frequency" text,
"L2 cache" text,
"Mult." text,
"Voltage" text,
"Socket" text,
"Part number(s)" text
) | What is the L2 cache for the Mobile Pentium 333? | SELECT "L2 cache" FROM table_9499 WHERE "Model number" = 'mobile pentium 333' | wikisql |
CREATE TABLE medicine (
FDA_approved VARCHAR
) | How many medicines have the FDA approval status 'No' ? | SELECT COUNT(*) FROM medicine WHERE FDA_approved = 'No' | sql_create_context |
CREATE TABLE Financial_Transactions (
transaction_id INTEGER,
previous_transaction_id INTEGER,
account_id INTEGER,
card_id INTEGER,
transaction_type VARCHAR(15),
transaction_date DATETIME,
transaction_amount DOUBLE,
transaction_comment VARCHAR(255),
other_transaction_details VARCHAR(... | Show the number of cards in different card type code in a bar chart, show y axis in descending order. | SELECT card_type_code, COUNT(card_type_code) FROM Customers_Cards GROUP BY card_type_code ORDER BY COUNT(card_type_code) DESC | nvbench |
CREATE TABLE Album (
AlbumId integer,
Title varchar(160),
ArtistId integer
)
CREATE TABLE PlaylistTrack (
PlaylistId integer,
TrackId integer
)
CREATE TABLE Customer (
CustomerId integer,
FirstName varchar(40),
LastName varchar(20),
Company varchar(80),
Address varchar(70),
... | Show me a bar chart for what are the titles and ids for albums containing tracks with unit price greater than 1?, and rank in descending by the AlbumId. | SELECT T1.Title, T1.AlbumId FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 ORDER BY T1.AlbumId DESC | nvbench |
CREATE TABLE table_34671 (
"Rank" real,
"Building" text,
"City" text,
"Height (m/ft)" text,
"Floors" real,
"Status" text
) | what is a building that is proposed and will have 32 floors? | SELECT "Building" FROM table_34671 WHERE "Status" = 'proposed' AND "Floors" = '32' | wikisql |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
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),
... | 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, show me about the distribution of job_id and the average of salary , and group by attribute job_id in a bar chart, I want to display bar from high to low order please. | SELECT JOB_ID, AVG(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY JOB_ID DESC | nvbench |
CREATE TABLE table_53428 (
"Name" text,
"League" real,
"FA Cup" real,
"League Cup" real,
"Total" real
) | What is the sum of goals scored in regular league play by Mustoe where he scored 0 goals in the League Cup? | SELECT SUM("League") FROM table_53428 WHERE "Name" = 'mustoe' AND "League Cup" < '0' | wikisql |
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... | 把2012年9月21日到2015年10月15日期间患者蒋华荣的主要就医医院是哪家查看一下 | SELECT qtb.MED_SER_ORG_NO FROM qtb WHERE qtb.PERSON_NM = '蒋华荣' AND qtb.IN_HOSP_DATE BETWEEN '2012-09-21' AND '2015-10-15' GROUP BY qtb.MED_SER_ORG_NO ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT gyb.MED_SER_ORG_NO FROM gyb WHERE gyb.PERSON_NM = '蒋华荣' AND gyb.IN_HOSP_DATE BETWEEN '2012-09-21' AND '2015-10-15' GROUP BY gy... | css |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions... | Provide the number of patients on additive type drug prescription who have other pulmonary insufficiency not elsewhere classified diagnoses. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Other pulmonary insufficiency, not elsewhere classified" AND prescriptions.drug_type = "ADD... | mimicsql_data |
CREATE TABLE table_name_79 (
entrant VARCHAR,
driver VARCHAR
) | Which of the entrants had Luigi Fagioli as a driver? | SELECT entrant FROM table_name_79 WHERE driver = "luigi fagioli" | sql_create_context |
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... | 从一零年十一月十号开始到二零一七年九月二十六号这几年里医疗机构1301404总医疗费超过5083.93元的未从业人员就诊记录数量 | SELECT COUNT(*) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '1301404' AND t_kc21.IN_HOSP_DATE BETWEEN '2010-11-10' AND '2017-09-26' AND t_kc21.INSURED_STS = '未就业' AND t_kc21.MED_AMOUT >= 5083.93 | css |
CREATE TABLE table_63305 (
"Season" text,
"Div." text,
"Pos." text,
"Pld." text,
"Pts." text
) | What season had 1st position, 33 pld, and 58 points? | SELECT "Season" FROM table_63305 WHERE "Pos." = '1st' AND "Pld." = '33' AND "Pts." = '58' | wikisql |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE intakeoutput (
in... | when was the first time since 05/2102 patient 006-146580 was prescribed an aspirin and 2 ml vial : famotidine 10 mg/ml iv soln at the same time? | SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'aspirin' AND patient.uniquepid = '006-146580' AND STRFTIME('%y-%m', medication.drugstarttime) >= '2102-05') AS t1 JOIN (S... | eicu |
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... | how many patients born before the year 2089 were given the drug metaformin (glucophage)? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2089" AND prescriptions.drug = "MetFORMIN (Glucophage)" | mimicsql_data |
CREATE TABLE table_name_98 (
location VARCHAR,
school VARCHAR
) | Where is the lacrosse school located? | SELECT location FROM table_name_98 WHERE school = "lacrosse" | sql_create_context |
CREATE TABLE table_name_79 (
school VARCHAR,
team_name VARCHAR
) | What school has a team called the Pirates? | SELECT school FROM table_name_79 WHERE team_name = "pirates" | sql_create_context |
CREATE TABLE table_18607260_6 (
wins INTEGER,
losses VARCHAR
) | Name the least wins for 5 losses | SELECT MIN(wins) FROM table_18607260_6 WHERE losses = 5 | sql_create_context |
CREATE TABLE Invoice_Line_Items (
order_item_id INTEGER,
invoice_number INTEGER,
product_id INTEGER,
product_title VARCHAR(80),
product_quantity VARCHAR(50),
product_price DECIMAL(19,4),
derived_product_cost DECIMAL(19,4),
derived_vat_payable DECIMAL(19,4),
derived_total_cost DECIMAL... | How many accounts are opened in each day? Bin the account open day by weekday in a bar chart. | SELECT date_account_opened, COUNT(date_account_opened) FROM Accounts | nvbench |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | 列一下水凯复这名患者在0439258这家医院的门诊就诊记录里面被医生下的诊断不带酒精的记录 | SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjz... | css |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | give me the number of patients whose language is ptun and year of death is less than or equal to 2133? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "PTUN" AND demographic.dod_year <= "2133.0" | mimicsql_data |
CREATE TABLE table_29507 (
"Period" text,
"Live births per year" text,
"Deaths per year" text,
"Natural change per year" text,
"CBR*" text,
"CDR*" text,
"NC*" text,
"TFR*" text,
"IMR*" real,
"Life expectancy total" text,
"Life expectancy males" text,
"Life expectancy fema... | What period was there a 22.7 NC? | SELECT "Period" FROM table_29507 WHERE "NC*" = '22.7' | wikisql |
CREATE TABLE table_16018 (
"Round" real,
"Circuit" text,
"Date" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning Driver" text,
"Winning Team" text
) | What circuit was the race where Hideki Mutoh had the fastest lap? | SELECT "Circuit" FROM table_16018 WHERE "Fastest Lap" = 'Hideki Mutoh' | wikisql |
CREATE TABLE table_20769 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Ground" text,
"Crowd" real,
"Date" text
) | Who was the home team when the away team is Carlton? | SELECT "Home team" FROM table_20769 WHERE "Away team" = 'Carlton' | wikisql |
CREATE TABLE table_5474 (
"Corps Name" text,
"Number of Finals Appearances" real,
"Year of First Appearance" real,
"Year of Most Recent Appearance" real,
"All Years of Finals Appearances" text
) | What is the year of the first appearance of the Black Knights, who had less than 1 finals appearances? | SELECT COUNT("Year of First Appearance") FROM table_5474 WHERE "Corps Name" = 'black knights' AND "Number of Finals Appearances" < '1' | wikisql |
CREATE TABLE table_17085 (
"Player" text,
"Position" text,
"School" text,
"Hometown" text,
"College" text
) | How many players are from Indianapolis, Indiana? | SELECT COUNT("Player") FROM table_17085 WHERE "Hometown" = 'Indianapolis, Indiana' | wikisql |
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... | Draw a scatter chart about the correlation between School_ID and ACC_Percent , and group by attribute All_Neutral. | SELECT School_ID, ACC_Percent FROM basketball_match GROUP BY All_Neutral | nvbench |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.