context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_name_26 ( ukraine_career VARCHAR, lost VARCHAR, drawn VARCHAR )
What years had a manager who lost more than 1 and drawn more than 11?
SELECT ukraine_career FROM table_name_26 WHERE lost > 1 AND drawn > 11
sql_create_context
CREATE TABLE table_name_97 ( floors INTEGER, metres INTEGER )
What is the highest floor for the building measuring 220 meters?
SELECT MAX(floors) FROM table_name_97 WHERE metres > 220
sql_create_context
CREATE TABLE table_name_28 ( class VARCHAR, identifier VARCHAR )
What class has cbon-fm-23 as the identifier?
SELECT class FROM table_name_28 WHERE identifier = "cbon-fm-23"
sql_create_context
CREATE TABLE table_204_723 ( id number, "year" number, "film" text, "role" text, "notes" text )
tell me the only year with a critically acclaimed role .
SELECT "year" FROM table_204_723 WHERE "notes" = 'critically acclaimed role'
squall
CREATE TABLE table_27599 ( "#" real, "Name" text, "Position" text, "Height" text, "Weight" real, "Year" text, "Home Town" text, "Last School" text )
Name the most height
SELECT MAX("Weight") FROM table_27599
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 demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
what is gender and language of subject name gwendolyn hager?
SELECT demographic.gender, demographic.language FROM demographic WHERE demographic.name = "Gwendolyn Hager"
mimicsql_data
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 microlab ( microl...
what is the name of the procedure that patient 027-61708 has undergone two or more times during this month?
SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, COUNT(treatment.treatmenttime) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid ...
eicu
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, ...
哪些人在05077547937的医疗就诊中申请检验报告单是超过2份的?列出这些申请人的工号,还有姓名也列出来
SELECT zyjybgb.SQRGH, zyjybgb.SQRXM FROM zyjybgb WHERE zyjybgb.JZLSH = '05077547937' GROUP BY zyjybgb.SQRGH HAVING COUNT(*) > 2 UNION SELECT mzjybgb.SQRGH, mzjybgb.SQRXM FROM mzjybgb WHERE mzjybgb.JZLSH = '05077547937' GROUP BY mzjybgb.SQRGH HAVING COUNT(*) > 2
css
CREATE TABLE d_labitems ( row_id number, itemid number, label 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, insurance text, lan...
calculate the number of patients staying in careunit csru until 3 years ago.
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT transfers.hadm_id FROM transfers WHERE transfers.careunit = 'csru' AND DATETIME(transfers.intime) <= DATETIME(CURRENT_TIME(), '-3 year'))
mimic_iii
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate t...
Gobal Up- to Down-vote ratio.
SELECT SUM(UpVotes) AS uv, SUM(DownVotes) AS dv, ROUND((CAST(SUM(UpVotes) AS FLOAT)) / (CAST(SUM(DownVotes) AS FLOAT)), 3) AS Ratio FROM Users WHERE (UpVotes + DownVotes) > '##minVotes##' AND DownVotes > '##minDV##'
sede
CREATE TABLE table_64125 ( "Game" text, "Date" text, "Opponent" text, "Result" text, "Lions points" text, "Opponents" text, "Record" text, "Streak" text, "Attendance" text )
What was the streak after the game on Dec. 12?
SELECT "Streak" FROM table_64125 WHERE "Date" = 'dec. 12'
wikisql
CREATE TABLE Elimination ( Elimination_ID text, Wrestler_ID text, Team text, Eliminated_By text, Elimination_Move text, Time text ) CREATE TABLE wrestler ( Wrestler_ID int, Name text, Reign text, Days_held text, Location text, Event text )
Show the number of teams in elimination in a bar chart, could you sort by the x-axis from high to low?
SELECT Team, COUNT(Team) FROM Elimination GROUP BY Team ORDER BY Team DESC
nvbench
CREATE TABLE table_21590 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Series" text )
List of high assists with high rebounds for k. mchale (10)
SELECT "High assists" FROM table_21590 WHERE "High rebounds" = 'K. McHale (10)'
wikisql
CREATE TABLE table_11803648_22 ( round INTEGER, club_team VARCHAR )
What is the last round with club team Guelph Storm (ohl)?
SELECT MAX(round) FROM table_11803648_22 WHERE club_team = "Guelph Storm (OHL)"
sql_create_context
CREATE TABLE table_name_90 ( laps INTEGER, time VARCHAR )
What is the average laps completed by riders with times of +2:11.524?
SELECT AVG(laps) FROM table_name_90 WHERE time = "+2:11.524"
sql_create_context
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...
64287856这个患者以前就诊的地方是哪里?
SELECT mzjzjlb.YLJGDM 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 = '64287856' UNION SELECT zyjzjlb.YLJGDM FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX ...
css
CREATE TABLE table_28841 ( "Place" real, "Nation" text, "played" real, "won" real, "drawn" real, "lost" real, "for" real, "against" real, "difference" real, "Table points" real )
How many times is the nation [[|]] (19)?
SELECT COUNT("against") FROM table_28841 WHERE "Nation" = '[[|]] (19)'
wikisql
CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER ) CREATE TABLE Person ( name varchar(20), age INTEGER, city TEXT, gender TEXT, job TEXT )
what is minimum age for different job title?, and list y axis in asc order.
SELECT job, MIN(age) FROM Person GROUP BY job ORDER BY MIN(age)
nvbench
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, value...
what was the name of the organism found in the first urine microbiology test of patient 97834 until 04/2103.
SELECT microbiologyevents.org_name FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 97834) AND microbiologyevents.spec_type_desc = 'urine' AND NOT microbiologyevents.org_name IS NULL AND STRFTIME('%y-%m', microbiologyevents.charttime) <...
mimic_iii
CREATE TABLE table_name_40 ( mascot VARCHAR, year_left VARCHAR, location VARCHAR )
What's the mascot in Huntington after the year 2000?
SELECT mascot FROM table_name_40 WHERE year_left > 2000 AND location = "huntington"
sql_create_context
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid numb...
how many times does patient 017-7283 have a volume (ml) octreotide intake until 11/07/2103?
SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '017-7283')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput.cel...
eicu
CREATE TABLE table_17360 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Series" text )
Name the minimum game
SELECT MIN("Game") FROM table_17360
wikisql
CREATE TABLE table_name_34 ( city VARCHAR, province VARCHAR )
Which city is in Cantabria?
SELECT city FROM table_name_34 WHERE province = "cantabria"
sql_create_context
CREATE TABLE table_29172 ( "Team" text, "Outgoing manager" text, "Manner of departure" text, "Date of vacancy" text, "Incoming manager" text, "Date of appointment" text )
Who was the outgoing manager when the incoming manager was lauren iu reghecampf?
SELECT "Outgoing manager" FROM table_29172 WHERE "Incoming manager" = 'Laurenţiu Reghecampf'
wikisql
CREATE TABLE table_24725951_1 ( directed_and_produced_by VARCHAR, celebrities VARCHAR )
List directors and producers when the celebrities involved were Bill Turnbull and Louise Minchin.
SELECT directed_and_produced_by FROM table_24725951_1 WHERE celebrities = "Bill Turnbull and Louise Minchin"
sql_create_context
CREATE TABLE table_283203_1 ( location VARCHAR, capacity VARCHAR )
Where is the team that has a stadium capable of a capacity of 10,517 5,006 located?
SELECT location FROM table_283203_1 WHERE capacity = "10,517 5,006"
sql_create_context
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 lab ( subject_id text, hadm_id text, ...
provide the number of patients whose death status is 0 and lab test name is ck-mb index.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.expire_flag = "0" AND lab.label = "CK-MB Index"
mimicsql_data
CREATE TABLE table_12113888_1 ( built VARCHAR, scrapped_sold VARCHAR )
What is the built data on the scrapped information that is cannot handle non-empty timestamp argument! 1947?
SELECT built FROM table_12113888_1 WHERE scrapped_sold = "Cannot handle non-empty timestamp argument! 1947"
sql_create_context
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 diagnoses long title is acute parametritis and pelvic cellulitis and lab test abnormal status is delta?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Acute parametritis and pelvic cellulitis" AND lab.flag = "delta"
mimicsql_data
CREATE TABLE table_name_55 ( result VARCHAR, opponent VARCHAR )
What was the result when the opponent was Celtic?
SELECT result FROM table_name_55 WHERE opponent = "celtic"
sql_create_context
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
provide the number of patients whose lab test name is alanine aminotransferase (alt)?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.label = "Alanine Aminotransferase (ALT)"
mimicsql_data
CREATE TABLE table_name_54 ( player VARCHAR, to_par VARCHAR, score VARCHAR )
Who is the player with a +3 to par and a 72-68-71-72=283 score?
SELECT player FROM table_name_54 WHERE to_par = "+3" AND score = 72 - 68 - 71 - 72 = 283
sql_create_context
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 whose diagnoses is abn react- procedure nos and lab test fluid is cerebrospinal fluid (csf).
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Abn react-procedure NOS" AND lab.fluid = "Cerebrospinal Fluid (CSF)"
mimicsql_data
CREATE TABLE table_30120619_1 ( barony VARCHAR, area__acres__ VARCHAR )
What is the barony of the townland whose area is 150 acres?
SELECT barony FROM table_30120619_1 WHERE area__acres__ = 150
sql_create_context
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE p...
what was the first time that patient 028-66126 had the maximum amount of ast (sgot) until 06/2104?
SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '028-66126')) AND lab.labname = 'ast (sgot)' AND STRFTIME('%y-%m', lab.labresulttime...
eicu
CREATE TABLE table_74980 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text )
What is Aundray Bruce's Pick #?
SELECT "Pick #" FROM table_74980 WHERE "Name" = 'aundray bruce'
wikisql
CREATE TABLE table_25754 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (millions)" text )
What number episode in the series was written by David Zuckerman?
SELECT "No. in series" FROM table_25754 WHERE "Written by" = 'David Zuckerman'
wikisql
CREATE TABLE INVOICE ( BillingCountry VARCHAR )
What are the distinct billing countries of the invoices?
SELECT DISTINCT (BillingCountry) FROM INVOICE
sql_create_context
CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE paperkeyphrase ( paperid int, ...
Semantic Parsing paper by li dong
SELECT DISTINCT author.authorid, paper.paperid FROM author, keyphrase, paper, paperkeyphrase, writes WHERE author.authorname = 'li dong' AND keyphrase.keyphrasename = 'Semantic Parsing' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.authorid = author.authori...
scholar
CREATE TABLE Premises ( premise_id INTEGER, premises_type VARCHAR(15), premise_details VARCHAR(255) ) CREATE TABLE Mailshot_Customers ( mailshot_id INTEGER, customer_id INTEGER, outcome_code VARCHAR(15), mailshot_customer_date DATETIME ) CREATE TABLE Order_Items ( item_id INTEGER, ...
Show all distinct product categories along with the number of mailshots in each category in a bar chart, list in desc by the x axis.
SELECT product_category, COUNT(*) FROM Mailshot_Campaigns GROUP BY product_category ORDER BY product_category DESC
nvbench
CREATE TABLE table_10026563_1 ( entered_office_as_head_of_state_or_government VARCHAR, office VARCHAR )
When did the Prime Minister of Italy take office?
SELECT entered_office_as_head_of_state_or_government FROM table_10026563_1 WHERE office = "Prime Minister of Italy"
sql_create_context
CREATE TABLE table_30396 ( "Institution" text, "Location" text, "Founded" real, "Affiliation" text, "Enrollment" real, "Team Nickname" text, "Primary conference" text )
4512 is the enrollment what is the team nickname?
SELECT "Team Nickname" FROM table_30396 WHERE "Enrollment" = '4512'
wikisql
CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDa...
Highest comment scores Including Post Link.
SELECT c.Id AS "comment_link", c.Score, c.UserId AS "user_link", c.CreationDate FROM Comments AS c WHERE Score > 100 ORDER BY Score DESC LIMIT 100
sede
CREATE TABLE table_10103 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Which team scored 10.11 (71) at home?
SELECT "Home team" FROM table_10103 WHERE "Home team score" = '10.11 (71)'
wikisql
CREATE TABLE table_78863 ( "Week" real, "Event" text, "Air Date" text, "Winning team" text, "Winners club" text )
Which Winners club has an Event of hang tight?
SELECT "Winners club" FROM table_78863 WHERE "Event" = 'hang tight'
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...
calculate the maximum age of patients who were hospitalized for 20 days and died before 2131.
SELECT MAX(demographic.age) FROM demographic WHERE demographic.days_stay = "20" AND demographic.dod_year < "2131.0"
mimicsql_data
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 treatment ( trea...
how many patients in 2105 underwent a oxygen therapy (40% to 60%) after the previous head ct scan - with contrast procedure in the same hospital visit?
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'head ct scan - with contrast' AND STRFTIME('%y', treatment.treatmenttime)...
eicu
CREATE TABLE table_33915 ( "Year" real, "Championship" text, "Winning score" text, "Margin" text, "Runner(s)-up" text )
In 1946, what is the Runner(s)-up of the Women's Western Open Championship?
SELECT "Runner(s)-up" FROM table_33915 WHERE "Championship" = 'women''s western open' AND "Year" = '1946'
wikisql
CREATE TABLE section ( course_id text, sec_id text, semester text, year number, building text, room_number text, time_slot_id text ) CREATE TABLE student ( id text, name text, dept_name text, tot_cred number ) CREATE TABLE prereq ( course_id text, prereq_id text ) ...
How many rooms in each building have a capacity of over 50?
SELECT COUNT(*), building FROM classroom WHERE capacity > 50 GROUP BY building
spider
CREATE TABLE table_name_66 ( kind_of_the_song VARCHAR, singer VARCHAR )
Which type of song did miriam yeung sing?
SELECT kind_of_the_song FROM table_name_66 WHERE singer = "miriam yeung"
sql_create_context
CREATE TABLE table_name_6 ( date VARCHAR, catalog VARCHAR )
Which Date has a Catalog of vcrt 106?
SELECT date FROM table_name_6 WHERE catalog = "vcrt 106"
sql_create_context
CREATE TABLE table_54079 ( "D 39 \u221a" text, "D 40 \u221a" text, "D 41 \u221a" text, "D 42 \u221a" text, "D 43 \u221a" text, "D 44 \u221a" text, "D 45 \u221a" text, "D 46 \u221a" text, "D 47 \u221a" text, "D 48 \u221a" text )
What's the D 48 when the D 40 is D 37?
SELECT "D 48 \u221a" FROM table_54079 WHERE "D 40 \u221a" = 'd 37'
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
count the number of patients whose ethnicity is hispanic/latino - puerto rican and days of hospital stay is greater than 15?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND demographic.days_stay > "15"
mimicsql_data
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ...
what is days of hospital stay and admission time of subject name michael witt?
SELECT demographic.days_stay, demographic.admittime FROM demographic WHERE demographic.name = "Michael Witt"
mimicsql_data
CREATE TABLE table_9954 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ($)" text )
What Country is Player Leland Gibson with Money of 400 from?
SELECT "Country" FROM table_9954 WHERE "Money ($)" = '400' AND "Player" = 'leland gibson'
wikisql
CREATE TABLE table_19277 ( "Player" text, "Position" text, "Starter" text, "Touchdowns" real, "Extra points" real, "Field goals" real, "Points" real )
How many points does Clark have?
SELECT "Points" FROM table_19277 WHERE "Player" = 'Clark'
wikisql
CREATE TABLE table_66679 ( "Date(s) Released" text, "Polling institute" text, "Nationalist" text, "Labour" text, "Democratic Alternative" text, "Undecided/ No answer" text, "Lead" text )
What is the Nationalist share of the poll for the response in which Undecided/No Answer received 29.2%?
SELECT "Nationalist" FROM table_66679 WHERE "Undecided/ No answer" = '29.2%'
wikisql
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...
Show me about the distribution of ACC_Road and School_ID , and group by attribute All_Home in a bar chart, and sort from high to low by the ACC_Road.
SELECT ACC_Road, School_ID FROM basketball_match GROUP BY All_Home, ACC_Road ORDER BY ACC_Road DESC
nvbench
CREATE TABLE table_name_48 ( top_10 INTEGER, cuts_made VARCHAR, events VARCHAR )
what is the average top-10 when the cuts made is less than 9 and the events is more than 14?
SELECT AVG(top_10) FROM table_name_48 WHERE cuts_made < 9 AND events > 14
sql_create_context
CREATE TABLE table_19143 ( "EDO Flight" real, "Shuttle" text, "Mission" text, "Launch Date" text, "Duration" text, "Primary Payload(s)" text )
how many primary payload(s) with shuttle being columbia and duration being 13 days, 19 hours, 30 minutes, 4 seconds
SELECT COUNT("Primary Payload(s)") FROM table_19143 WHERE "Shuttle" = 'Columbia' AND "Duration" = '13 days, 19 hours, 30 minutes, 4 seconds'
wikisql
CREATE TABLE table_24565004_3 ( period VARCHAR, name VARCHAR )
during which period did albert baning play?
SELECT period FROM table_24565004_3 WHERE name = "Albert Baning"
sql_create_context
CREATE TABLE table_46607 ( "Heat" real, "Lane" real, "Name" text, "Country" text, "Mark" text, "React" real )
What is the heat number at 7.63, and a reaction less than 0.229?
SELECT COUNT("Heat") FROM table_46607 WHERE "Mark" = '7.63' AND "React" < '0.229'
wikisql
CREATE TABLE table_57634 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What was the biggest crowd at punt road oval?
SELECT MAX("Crowd") FROM table_57634 WHERE "Venue" = 'punt road oval'
wikisql
CREATE TABLE table_19346 ( "Week" real, "Date" text, "Kickoff ( ET )" text, "TV" text, "Opponent" text, "Result" text, "Record" text, "Game Site" text )
What date did they play in Cleveland Municipal Stadium?
SELECT "Date" FROM table_19346 WHERE "Game Site" = 'Cleveland Municipal Stadium'
wikisql
CREATE TABLE table_name_26 ( opponent VARCHAR, record VARCHAR )
Who is the Opponent in the game with a Record of 1 3 0?
SELECT opponent FROM table_name_26 WHERE record = "1–3–0"
sql_create_context
CREATE TABLE College ( cName varchar(20), state varchar(2), enr numeric(5,0) ) CREATE TABLE Player ( pID numeric(5,0), pName varchar(20), yCard varchar(3), HS numeric(5,0) ) CREATE TABLE Tryout ( pID numeric(5,0), cName varchar(20), pPos varchar(8), decision varchar(3) )
What are the names and number of hours spent training for each player who trains for less than 1500 hours Visualize by bar chart, show names in desc order.
SELECT pName, HS FROM Player WHERE HS < 1500 ORDER BY pName DESC
nvbench
CREATE TABLE table_17129 ( "Calculator" text, "CPU" text, "RAM" text, "Display Size" text, "Programming Languages" text, "Link Abilities" text, "Year Released" text, "Predecessors" text, "Successors" text )
what is the display size for the calculator ti-82?
SELECT "Display Size" FROM table_17129 WHERE "Calculator" = 'TI-82'
wikisql
CREATE TABLE table_train_86 ( "id" int, "mini_mental_state_examination_mmse" int, "heart_disease" bool, "stroke" bool, "liver_disease" bool, "hepatitis" bool, "NOUSE" float )
mini _ mental status exam score > 16 and < 25 .
SELECT * FROM table_train_86 WHERE mini_mental_state_examination_mmse > 16 AND mini_mental_state_examination_mmse < 25
criteria2sql
CREATE TABLE table_name_13 ( bike VARCHAR, grid VARCHAR, time VARCHAR )
Which bike had a grid less than 35 and time at 37:58.607?
SELECT bike FROM table_name_13 WHERE grid < 35 AND time = "37:58.607"
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 demographic (...
how many patients whose ethnicity is american indian/alaska native and year of birth is less than 2197?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND demographic.dob_year < "2197"
mimicsql_data
CREATE TABLE table_14354 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
Where was there a result of 4-5 and a score of 1-1?
SELECT "Venue" FROM table_14354 WHERE "Result" = '4-5' AND "Score" = '1-1'
wikisql
CREATE TABLE table_name_29 ( event VARCHAR, circuit VARCHAR, winning_driver VARCHAR, round VARCHAR )
What is Event, when Winning Driver is 'Laurent Aiello Laurent Aiello', when Round is greater than 1, and when Circuit is 'Wunstorf'?
SELECT event FROM table_name_29 WHERE winning_driver = "laurent aiello laurent aiello" AND round > 1 AND circuit = "wunstorf"
sql_create_context
CREATE TABLE table_28022 ( "Episode #" text, "Original Air Date (UK)" text, "Episode Title" text, "Director" text, "Writer" text, "Cast" text )
What is the original air date of the episode 'Another Happy Day'?
SELECT "Original Air Date (UK)" FROM table_28022 WHERE "Episode Title" = 'Another Happy Day'
wikisql
CREATE TABLE table_67468 ( "Stage" text, "Winner" text, "General classification" text, "Points Classification" text, "Team Classification" text )
Name the team classification for stage of 6
SELECT "Team Classification" FROM table_67468 WHERE "Stage" = '6'
wikisql
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...
Top 75 users from [Country].
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Users.Id AS "user_link", Reputation, (SELECT TagName FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.ParentId = PostTags.PostId INNER JOIN Votes ON Votes.PostId = Posts.Id AND VoteTypeId = 2 WHERE Posts.OwnerUserId = Users.I...
sede
CREATE TABLE table_26982 ( "Season" text, "Premier Division" text, "Division One" text, "Division Two" text, "Division Three" text, "Division Four" text, "Division Five" text )
When real holmesdale reserves is division four who is in division one?
SELECT "Division One" FROM table_26982 WHERE "Division Four" = 'Real Holmesdale Reserves'
wikisql
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 to spend much of a day on the ground in ATLANTA find me an early flight from BOSTON and the lastest possible flight back from ATLANTA
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_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND flight.departure_time < 1000 AND flight.to_airport = AIRPORT_SERVICE_1.airp...
atis
CREATE TABLE mzb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
自二零一三年十二月二十五日开始,截止到二零二一年十二月十四日,患者严美丽通过医保看病总共花了多少医疗费
SELECT SUM(t_kc24.MED_AMOUT) FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE qtb.PERSON_NM = '严美丽' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2013-12-25' AND '2021-12-14' UNION SELECT SUM(t_kc24.MED_AMOUT) FROM gyb JOIN t_kc24 ON gyb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gyb.PERSON_NM = '严美丽' AND t...
css
CREATE TABLE table_56928 ( "Player" text, "Position" text, "First-Team Debut" text, "First-Team Appearances" real, "First-Team Goals" real, "Current Club" text )
What player has over 1 first apperance and over 32 first team goals?
SELECT "Player" FROM table_56928 WHERE "First-Team Appearances" > '1' AND "First-Team Goals" = '32'
wikisql
CREATE TABLE table_21696800_1 ( _number VARCHAR, directed_by VARCHAR )
How many different episode numbers are there for episodes directed by Wayne Rose?
SELECT COUNT(_number) FROM table_21696800_1 WHERE directed_by = "Wayne Rose"
sql_create_context
CREATE TABLE table_name_34 ( college VARCHAR, pick VARCHAR, player VARCHAR )
What is College, when Pick is less than 145, and when Player is Jeff Wilkins?
SELECT college FROM table_name_34 WHERE pick < 145 AND player = "jeff wilkins"
sql_create_context
CREATE TABLE table_name_2 ( attendance VARCHAR, opponent VARCHAR )
What is Attendance, when Opponent is Pittsburgh Steelers?
SELECT attendance FROM table_name_2 WHERE opponent = "pittsburgh steelers"
sql_create_context
CREATE TABLE table_12036 ( "Player" text, "Height" text, "School" text, "Hometown" text, "College" text )
What college picked someone from The Episcopal Academy?
SELECT "College" FROM table_12036 WHERE "School" = 'episcopal academy'
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 is minimum age of patients whose primary disease is liver transplant and year of birth is greater than 2053?
SELECT MIN(demographic.age) FROM demographic WHERE demographic.diagnosis = "LIVER TRANSPLANT" AND demographic.dob_year > "2053"
mimicsql_data
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE student_record ( student_id int, course_id int, ...
Which courses have been or will be taught by Kathy Velikov ?
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Kathy Velikov%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id =...
advising
CREATE TABLE table_77907 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What is the listed crowd when hawthorn is away?
SELECT COUNT("Crowd") FROM table_77907 WHERE "Away team" = 'hawthorn'
wikisql
CREATE TABLE table_name_59 ( power__kw_ VARCHAR, frequency VARCHAR, location VARCHAR )
What is the power at Baguio where the frequency is 102.3mhz?
SELECT power__kw_ FROM table_name_59 WHERE frequency = "102.3mhz" AND location = "baguio"
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
how many patients whose insurance is government and diagnoses short title is malig neo brain nec?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Government" AND diagnoses.short_title = "Malig neo brain NEC"
mimicsql_data
CREATE TABLE table_21009 ( "Position" real, "Driver / Passenger" text, "Equipment" text, "Bike No" real, "Points" real )
Name the driver/passenger for position 8
SELECT "Driver / Passenger" FROM table_21009 WHERE "Position" = '8'
wikisql
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE d_icd_diagnoses ( ...
what is the difference of arterial bp [diastolic] patient 22648 has last measured on the first icu visit compared to the value second to last measured on the first icu visit?
SELECT (SELECT 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 = 22648) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND chartevents.item...
mimic_iii
CREATE TABLE table_name_91 ( nation VARCHAR, rank VARCHAR, gold VARCHAR, bronze VARCHAR )
Which Nation has a Gold of 0, and a Bronze smaller than 6, and a Rank of 6?
SELECT nation FROM table_name_91 WHERE gold = 0 AND bronze < "6" AND rank = "6"
sql_create_context
CREATE TABLE table_name_78 ( week INTEGER, date VARCHAR )
What week has a Date of October 4, 1992?
SELECT SUM(week) FROM table_name_78 WHERE date = "october 4, 1992"
sql_create_context
CREATE TABLE table_932 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Stadium" text, "Record" text, "Attendance" real )
what's the result with opponent being at oakland raiders
SELECT "Result" FROM table_932 WHERE "Opponent" = 'at Oakland Raiders'
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, ...
在02年7月13日到2009年11月4日内名叫戚雅娴的病人所有检验结果指标记录中的仪器编号以及名称分别都是啥?
SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybg...
css
CREATE TABLE table_name_46 ( date_of_birth__age_ VARCHAR, player VARCHAR )
What is Paino Hehea's date of birth?
SELECT date_of_birth__age_ FROM table_name_46 WHERE player = "paino hehea"
sql_create_context
CREATE TABLE table_name_41 ( record VARCHAR, stadium VARCHAR )
What was the Browns record after they played the game at the Paul Brown stadium?
SELECT record FROM table_name_41 WHERE stadium = "paul brown stadium"
sql_create_context
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 SUM(MED_AMOUT) FROM t_kc21 WHERE PERSON_NM = '许斌斌' AND CLINIC_TYPE = '门诊'
css
CREATE TABLE table_name_43 ( place VARCHAR, player VARCHAR )
Nam ethe place for pat perez
SELECT place FROM table_name_43 WHERE player = "pat perez"
sql_create_context
CREATE TABLE table_name_46 ( population__2004_est_ VARCHAR, hanzi VARCHAR )
What is the 2004 population for ?
SELECT population__2004_est_ FROM table_name_46 WHERE hanzi = "山海关区"
sql_create_context
CREATE TABLE table_train_96 ( "id" int, "gender" string, "elevated_creatinine" float, "diabetic" string, "cerebrovascular_disease" bool, "moca_score" int, "parkinsonism" bool, "NOUSE" float )
subject has a total moca score of < 26 at screening.
SELECT * FROM table_train_96 WHERE moca_score < 26
criteria2sql