context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
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 ) ...
what is the number of patients whose ethnicity is white and year of birth is less than 2060?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "WHITE" AND demographic.dob_year < "2060"
mimicsql_data
CREATE TABLE table_29286 ( "Team" text, "Outgoing manager" text, "Manner of departure" text, "Date of vacancy" text, "Replaced by" text, "Date of appointment" text )
What is the manner of departure when the replaced by is bahman hasanov?
SELECT "Manner of departure" FROM table_29286 WHERE "Replaced by" = 'Bahman Hasanov'
wikisql
CREATE TABLE table_name_34 ( skip VARCHAR, third VARCHAR )
Which Skip has a Third of carlo alessandro zisa?
SELECT skip FROM table_name_34 WHERE third = "carlo alessandro zisa"
sql_create_context
CREATE TABLE table_name_12 ( catalogue_no VARCHAR, format VARCHAR, country VARCHAR )
what is the catalogue no when the format is cd (limited edition steel-box) and the country is germany?
SELECT catalogue_no FROM table_name_12 WHERE format = "cd (limited edition steel-box)" AND country = "germany"
sql_create_context
CREATE TABLE Project_Staff ( staff_id DOUBLE, project_id INTEGER, role_code VARCHAR(10), date_from DATETIME, date_to DATETIME, other_details VARCHAR(255) ) CREATE TABLE Organisation_Types ( organisation_type VARCHAR(10), organisation_type_description VARCHAR(255) ) CREATE TABLE Organis...
When do all the researcher role staff start to work? Bin the time into YEAR interval and count them with a line chart, and order from low to high by the date_from please.
SELECT date_from, COUNT(date_from) FROM Project_Staff ORDER BY date_from
nvbench
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 ) ...
How many patients stayed in the hospital for more than 2 days and have diagnosis long title as tricuspid valve disorders specified as nonrheumatic?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "2" AND diagnoses.long_title = "Tricuspid valve disorders, specified as nonrheumatic"
mimicsql_data
CREATE TABLE table_204_143 ( id number, "national park" text, "region" text, "land area (km2)" number, "established" number, "visitation (2009)" number, "coordinates" text )
last finnish national park to be established
SELECT "national park" FROM table_204_143 ORDER BY "established" DESC LIMIT 1
squall
CREATE TABLE table_79743 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" text, "Finish" text )
In what place did Phil Mickelson finish with a total of 282?
SELECT "Finish" FROM table_79743 WHERE "Total" = '282' AND "Player" = 'phil mickelson'
wikisql
CREATE TABLE table_19443 ( "School Year" text, "Class A" text, "Class AA" text, "Class AAA" text, "Class AAAA" text, "Class AAAAA" text )
What are all the AAA classes in the school years of 2005-06?
SELECT "Class AAA" FROM table_19443 WHERE "School Year" = '2005-06'
wikisql
CREATE TABLE table_14940519_1 ( opponent VARCHAR, date VARCHAR )
Name the opponent for october 2, 1983
SELECT opponent FROM table_14940519_1 WHERE date = "October 2, 1983"
sql_create_context
CREATE TABLE table_name_44 ( location VARCHAR, res VARCHAR, opponent VARCHAR )
Where was the result a win against Mike Large?
SELECT location FROM table_name_44 WHERE res = "win" AND opponent = "mike large"
sql_create_context
CREATE TABLE table_name_8 ( overall INTEGER, round VARCHAR, pick VARCHAR )
What is the average value of Overall, when Round is greater than 11, and when Pick is greater than 10?
SELECT AVG(overall) FROM table_name_8 WHERE round > 11 AND pick > 10
sql_create_context
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ...
when was patient 433's first microbiology test done during the previous month?
SELECT microbiologyevents.charttime FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 433) AND DATETIME(microbiologyevents.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month') ORDER BY microbiologyevents....
mimic_iii
CREATE TABLE table_204_986 ( id number, "#" number, "event year" number, "season" text, "flag bearer" text )
who was the latest athlete to bear the samoan flag at the olympic games ?
SELECT "flag bearer" FROM table_204_986 ORDER BY "#" DESC LIMIT 1
squall
CREATE TABLE table_25619 ( "Player" text, "Class Year" real, "Position" text, "Teams" text, "Career" text, "Highlight(s)" text )
What class year was Vencie Glenn from?
SELECT MIN("Class Year") FROM table_25619 WHERE "Player" = 'Vencie Glenn'
wikisql
CREATE TABLE table_name_23 ( laps INTEGER, rider VARCHAR )
what is the smallest number of laps imre toth has?
SELECT MIN(laps) FROM table_name_23 WHERE rider = "imre toth"
sql_create_context
CREATE TABLE table_name_87 ( lib_dem INTEGER, conservative INTEGER )
Name the the average Lib Dem with Conservative smaller than 0?
SELECT AVG(lib_dem) FROM table_name_87 WHERE conservative < 0
sql_create_context
CREATE TABLE table_68484 ( "Episode" text, "First aired" text, "Entrepreneur(s)" text, "Company or product name" text, "Money requested (\u00a3)" text, "Investing Dragon(s)" text )
How much was requested from Investing Dragon Peter Jones request in episode 2?
SELECT "Money requested (\u00a3)" FROM table_68484 WHERE "Investing Dragon(s)" = 'peter jones' AND "Episode" = 'episode 2'
wikisql
CREATE TABLE table_76176 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
What was the tie number when peterborough united was the away team?
SELECT "Tie no" FROM table_76176 WHERE "Away team" = 'peterborough united'
wikisql
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, language text, marital_status text, ethnicity text, age number ) CREATE ...
how many days have elapsed since patient 99883 received the mch laboratory test for the first time on the current hospital visit?
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', labevents.charttime)) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'mch') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 99883 AND admissions.disc...
mimic_iii
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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
what is the minimum age of patients whose marital status is divorced and primary disease is overdose?
SELECT MIN(demographic.age) FROM demographic WHERE demographic.marital_status = "DIVORCED" AND demographic.diagnosis = "OVERDOSE"
mimicsql_data
CREATE TABLE table_name_36 ( date VARCHAR, tournament VARCHAR, surface VARCHAR, round VARCHAR )
Name the date for grass surface for quarterfinal at the nsw building society open tournament
SELECT date FROM table_name_36 WHERE surface = "grass" AND round = "quarterfinal" AND tournament = "nsw building society open"
sql_create_context
CREATE TABLE table_name_62 ( reported_age VARCHAR, reported_birth_date VARCHAR )
what is the reported age when the reported birth date is 22 december 1878?
SELECT reported_age FROM table_name_62 WHERE reported_birth_date = "22 december 1878"
sql_create_context
CREATE TABLE table_16455 ( "Team" text, "Location" text, "Joined" real, "Conference" text, "Division" text, "Previous Conference" text )
Which teams are located in highland township?
SELECT "Team" FROM table_16455 WHERE "Location" = 'Highland Township'
wikisql
CREATE TABLE table_name_1 ( location_attendance VARCHAR, game VARCHAR, team VARCHAR )
What was the location and attendance for the game after game 36 against Atlanta?
SELECT location_attendance FROM table_name_1 WHERE game > 36 AND team = "atlanta"
sql_create_context
CREATE TABLE table_2417330_4 ( successor VARCHAR, reason_for_change VARCHAR )
Name the successor for election was successfully contested july 30, 1861
SELECT successor FROM table_2417330_4 WHERE reason_for_change = "Election was successfully contested July 30, 1861"
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, ...
give me the number of patients whose primary disease is coronary artery disease\coronary artery bypass graft with mvr; ? maze 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.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT WITH MVR; ? MAZE" AND lab.fluid = "Urine"
mimicsql_data
CREATE TABLE table_27631002_1 ( points VARCHAR, position VARCHAR )
How many entries are there for points for the 6th position?
SELECT COUNT(points) FROM table_27631002_1 WHERE position = "6th"
sql_create_context
CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, cha...
what was patient 31854's first intake time a day before.
SELECT inputevents_cv.charttime FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31854)) AND DATETIME(inputevents_cv.charttime, 'start of day') = DATETIME(CURRENT_TIME(), 's...
mimic_iii
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 last specimen test patient 031-23724 got until 09/2104?
SELECT microlab.culturesite FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-23724')) AND STRFTIME('%y-%m', microlab.culturetakentime) <= '2104...
eicu
CREATE TABLE table_name_54 ( surface VARCHAR, score VARCHAR )
What was the surface type during the match with the score of 6 4, 7 6 (7-5)??
SELECT surface FROM table_name_54 WHERE score = "6–4, 7–6 (7-5)"
sql_create_context
CREATE TABLE table_7966 ( "Player" text, "League" real, "Scottish Cup" real, "League Cup" real, "Challenge Cup" real, "Total" real )
What is the lowest Scottish cup with a challenge cup less than 1, and 0 league cups, and player Kris Doolan?
SELECT MIN("Scottish Cup") FROM table_7966 WHERE "Challenge Cup" < '1' AND "League Cup" = '0' AND "Player" = 'kris doolan'
wikisql
CREATE TABLE table_name_35 ( sample_size INTEGER, date_s__administered VARCHAR )
What is the highest sample size administered on October 18?
SELECT MAX(sample_size) FROM table_name_35 WHERE date_s__administered = "october 18"
sql_create_context
CREATE TABLE table_18834 ( "Club" text, "Played" text, "Won" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text )
what amount of try bonus where the game was won by 11?
SELECT COUNT("Try bonus") FROM table_18834 WHERE "Won" = '11'
wikisql
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 jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decima...
For those employees who do not work in departments with managers that have ids between 100 and 200, visualize a bar chart about the distribution of last_name and manager_id , display by the names in ascending.
SELECT LAST_NAME, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY LAST_NAME
nvbench
CREATE TABLE table_78693 ( "Seat Order (Right to Left)" real, "Series 1" text, "Series 2" text, "Series 3" text, "Series 5" text, "Series 9" text, "Series 11" text )
Which Series 1 has a Series 11 of peter jones?
SELECT "Series 1" FROM table_78693 WHERE "Series 11" = 'peter jones'
wikisql
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, visualize a bar chart about the distribution of name and the sum of revenue , and group by attribute name, and I want to show by the Y-axis in asc.
SELECT T2.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Revenue
nvbench
CREATE TABLE table_name_14 ( third VARCHAR, nation VARCHAR )
Which Third has a Nation of scotland?
SELECT third FROM table_name_14 WHERE nation = "scotland"
sql_create_context
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req 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 ...
Last semester , the GSIs for MUSED 490 were who ?
SELECT DISTINCT student.firstname, student.lastname FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN gsi ON gsi.course_offering_id = course_offering.offering_id INNER JOIN student ON student.student_id = gsi.student_id INNER JOIN semester ON semester.semester_id = course...
advising
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 ) ...
provide the number of patients whose diagnoses icd9 code is 2538 and drug route is neb?
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.icd9_code = "2538" AND prescriptions.route = "NEB"
mimicsql_data
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtim...
what were the four drugs prescribed most frequently to the cardiac hardware malfunction - aicd female patients aged 60 or above within the same month after they had been diagnosed with cardiac hardware malfunction - aicd since 2101?
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'cardiac hardware malfunction - aicd' AND STRFTIME(...
eicu
CREATE TABLE table_6747 ( "Game" real, "November" real, "Opponent" text, "Score" text, "Record" text, "Points" real )
Which Record has a Game larger than 15, and Points smaller than 31, and a November of 7?
SELECT "Record" FROM table_6747 WHERE "Game" > '15' AND "Points" < '31' AND "November" = '7'
wikisql
CREATE TABLE table_204_413 ( id number, "medal" text, "name" text, "sport" text, "event" text, "date" text )
name an athlete from finland who received a gold medal and a silver medal in the 1924 summer olympics
SELECT "name" FROM table_204_413 WHERE "medal" = 'gold' INTERSECT SELECT "name" FROM table_204_413 WHERE "medal" = 'silver'
squall
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
有哪些医院给病人31149555开了阿立哌唑片
SELECT MED_SER_ORG_NO FROM t_kc21 WHERE PERSON_ID = '31149555' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE SOC_SRT_DIRE_NM = '阿立哌唑片')
css
CREATE TABLE table_10284385_1 ( date_of_birth VARCHAR, representative VARCHAR )
How many birthdays does Earl Hanley Beshlin have?
SELECT COUNT(date_of_birth) FROM table_10284385_1 WHERE representative = "Earl Hanley Beshlin"
sql_create_context
CREATE TABLE table_31282 ( "Episode Number" real, "Title & Link to Episode on YouTube" text, "Origin" text, "Object Date" text, "Description" text, "Te Papas Collections Online link" text, "Host & Additional contributors" text )
How many object dates does episode #16 have?
SELECT COUNT("Object Date") FROM table_31282 WHERE "Episode Number" = '16'
wikisql
CREATE TABLE table_name_30 ( engine VARCHAR, tyres VARCHAR, driver VARCHAR )
What engine has g tyres and is driven by elio de angelis?
SELECT engine FROM table_name_30 WHERE tyres = "g" AND driver = "elio de angelis"
sql_create_context
CREATE TABLE table_10546 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What did the away team score at Moorabbin oval?
SELECT "Away team score" FROM table_10546 WHERE "Venue" = 'moorabbin oval'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
at what time was the patient with patient id 16438 discharged from hospital?
SELECT demographic.dischtime FROM demographic WHERE demographic.subject_id = "16438"
mimicsql_data
CREATE TABLE Events ( Event_ID INTEGER, Service_ID INTEGER, Event_Details VARCHAR(255) ) CREATE TABLE Participants ( Participant_ID INTEGER, Participant_Type_Code CHAR(15), Participant_Details VARCHAR(255) ) CREATE TABLE Participants_in_Events ( Event_ID INTEGER, Participant_ID INTEGER...
Compare how many events by different event details using a bar chart, rank in ascending by the Y.
SELECT Event_Details, COUNT(Event_Details) FROM Events GROUP BY Event_Details ORDER BY COUNT(Event_Details)
nvbench
CREATE TABLE table_name_17 ( date VARCHAR, record VARCHAR )
On what date was their record 46-39?
SELECT date FROM table_name_17 WHERE record = "46-39"
sql_create_context
CREATE TABLE budget ( School_id int, Year int, Budgeted int, total_budget_percent_budgeted real, Invested int, total_budget_percent_invested real, Budget_invested_percent text ) CREATE TABLE School ( School_id text, School_name text, Location text, Mascot text, Enrollmen...
Please give me a bar chart for the total enrollment in each county, display by the x-axis from low to high.
SELECT County, SUM(Enrollment) FROM School GROUP BY County ORDER BY County
nvbench
CREATE TABLE table_49533 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Partner" text, "Opponents" text, "Score" text )
who is the opponents when the surface is clay and the date is 12 july 1992?
SELECT "Opponents" FROM table_49533 WHERE "Surface" = 'clay' AND "Date" = '12 july 1992'
wikisql
CREATE TABLE table_name_97 ( player VARCHAR, rank VARCHAR )
What player has the rank 2011?
SELECT player FROM table_name_97 WHERE rank = 2011
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 demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
Calculate the minimum age of divorced patients who have st-segment elevation myocardial infarction/cardiac catheterization as their primary disease.
SELECT MIN(demographic.age) FROM demographic WHERE demographic.marital_status = "DIVORCED" AND demographic.diagnosis = "ST-SEGMENT ELEVATION MYOCARDIAL INFARCTION\CARDIAC CATH"
mimicsql_data
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, find name and the sum of code , and group by attribute name, and visualize them by a bar chart, could you rank in ascending by the x axis?
SELECT T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name
nvbench
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
名称不包含神经科的科室开出的所有医疗费用在医疗就诊33693601206中明细项目是哪些呢?
SELECT * FROM t_kc22 WHERE MED_CLINIC_ID = '33693601206' AND NOT MED_ORG_DEPT_NM LIKE '%神经科%'
css
CREATE TABLE table_61701 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" real, "Money ( $ )" real )
How much To par has a Country of united states, and a Money ($) of 90?
SELECT COUNT("To par") FROM table_61701 WHERE "Country" = 'united states' AND "Money ( $ )" = '90'
wikisql
CREATE TABLE table_name_31 ( average INTEGER, interview VARCHAR, evening_gown VARCHAR )
What is the lowest average of the contestant with an interview of 8.275 and an evening gown bigger than 8.7?
SELECT MIN(average) FROM table_name_31 WHERE interview = 8.275 AND evening_gown > 8.7
sql_create_context
CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, countr...
Next semester , how many classes are being offered ?
SELECT COUNT(DISTINCT course_offering.course_id) FROM course_offering, semester WHERE semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016
advising
CREATE TABLE table_8669 ( "Province" text, "Capital" text, "Population at 2010 Census" real, "Area (km\u00b2)" real, "Density (2010)" real, "Geographical unit" text, "Number of Cities (kota)" real, "Number of Regencies (kabupaten)" real, "Number of Districts (kecamatan)" real, "V...
What is the sum of the number of cities (kota) with an area less than 47,799 km , the capital yogyakarta, and a 2010 density greater than 1,138?
SELECT SUM("Number of Cities (kota)") FROM table_8669 WHERE "Area (km\u00b2)" < '47,799' AND "Capital" = 'yogyakarta' AND "Density (2010)" > '1,138'
wikisql
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,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, JO...
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, return a bar chart about the distribution of job_id and the sum of department_id , and group by attribute job_id, could you rank bars in descending order?
SELECT JOB_ID, SUM(DEPARTMENT_ID) 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 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, ...
请提供编号67339780这位参保人住院金额里是整数金额的次数
SELECT COUNT(*) FROM t_kc21 WHERE t_kc21.PERSON_ID = '67339780' AND t_kc21.CLINIC_TYPE = '住院' AND MOD(t_kc21.MED_AMOUT, 1) = 0
css
CREATE TABLE table_name_17 ( stage__winner_ VARCHAR, points_classification VARCHAR, general_classification VARCHAR, team_classification VARCHAR )
Which Stage (Winner) has a Vladimir Karpets General classification and a Team classification of relax-gam, and a Points classification of Denis Menchov?
SELECT stage__winner_ FROM table_name_17 WHERE general_classification = "vladimir karpets" AND team_classification = "relax-gam" AND points_classification = "denis menchov"
sql_create_context
CREATE TABLE table_204_312 ( id number, "stage" text, "date" text, "route" text, "terrain" text, "length" text, "winner" text )
paul wellens won stage 13 . who won the next stage ?
SELECT "winner" FROM table_204_312 WHERE "stage" = 13 + 1
squall
CREATE TABLE table_7720 ( "Basin" text, "Outlet" text, "Total Area" text, "In-State Area" text, "% In-State" text )
What is the total area of the Arkansas River outlet with a % in-state of a021 100%?
SELECT "Total Area" FROM table_7720 WHERE "Outlet" = 'arkansas river' AND "% In-State" = 'a021 100%'
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 patient ( uniquep...
in 2102, patient 012-22602 has made an admission?
SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '012-22602' AND STRFTIME('%y', patient.hospitaladmittime) = '2102'
eicu
CREATE TABLE table_name_50 ( region VARCHAR, reported_age VARCHAR )
what is the region when the reported age is 111 years, 107 days?
SELECT region FROM table_name_50 WHERE reported_age = "111 years, 107 days"
sql_create_context
CREATE TABLE table_6705 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Partner" text, "Opponent" text, "Score" text )
Which Date had an Outcome of runner-up, and a Surface of carpet?
SELECT "Date" FROM table_6705 WHERE "Outcome" = 'runner-up' AND "Surface" = 'carpet'
wikisql
CREATE TABLE table_name_86 ( surface VARCHAR )
What is the 2-person dive that has 2 as the surface?
SELECT "2" AS _person_dive FROM table_name_86 WHERE surface = "2"
sql_create_context
CREATE TABLE table_20754016_2 ( country VARCHAR, hometown VARCHAR )
What country is the contestant from Chihuahua from?
SELECT country FROM table_20754016_2 WHERE hometown = "Chihuahua"
sql_create_context
CREATE TABLE table_69035 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
What was the two-round score for Bob Tway?
SELECT "Score" FROM table_69035 WHERE "Player" = 'bob tway'
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...
那个叫俞慧艳的人其检验报告单上面的检验结果指标全部不正常的单号都有什么?
SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb 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.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB ...
css
CREATE TABLE table_30760 ( "No in. series" real, "No in. season" real, "Title" text, "Original air date" text, "Production Code" real, "U.S. viewers (millions)" text )
How many millions of US viewers watched the episode titled 'Happy Howl-o-ween'?
SELECT "U.S. viewers (millions)" FROM table_30760 WHERE "Title" = 'Happy Howl-O-Ween'
wikisql
CREATE TABLE table_66005 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is the sum of the gold medals of the nation with 4 silvers and more than 6 total medals?
SELECT SUM("Gold") FROM table_66005 WHERE "Silver" = '4' AND "Total" > '6'
wikisql
CREATE TABLE table_dev_61 ( "id" int, "pregnancy_or_lactation" bool, "allergy_to_gadolinium" bool, "renal_disease" bool, "creatinine_clearance_cl" float, "cardiogenic_shock" bool, "hypertension" bool, "NOUSE" float )
pregnant, or parturient or breast _ feeding female;
SELECT * FROM table_dev_61 WHERE pregnancy_or_lactation = 1
criteria2sql
CREATE TABLE table_name_18 ( score VARCHAR, opponent VARCHAR, loss VARCHAR )
What was the score when the opponent was the Orioles and the loss shows morehead (5 4)?
SELECT score FROM table_name_18 WHERE opponent = "orioles" AND loss = "morehead (5–4)"
sql_create_context
CREATE TABLE table_40460 ( "Season" real, "Team" text, "Conference" text, "Head Coach" text, "Record" text )
What was USC's record before the 1967 season?
SELECT "Record" FROM table_40460 WHERE "Team" = 'usc' AND "Season" < '1967'
wikisql
CREATE TABLE table_191 ( "Team" text, "Head Coach" text, "President" text, "Home Ground" text, "Location" text, "Founded" real, "Website" text )
The head coach, steve radoslavic, is related to which websites?
SELECT "Website" FROM table_191 WHERE "Head Coach" = 'Steve Radoslavic'
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 ( ...
let me know the birth date and primary disease of patient brian brock.
SELECT demographic.dob, demographic.diagnosis FROM demographic WHERE demographic.name = "Brian Brock"
mimicsql_data
CREATE TABLE table_74816 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text, "Points" real )
Which Score has a Date of february 9?
SELECT "Score" FROM table_74816 WHERE "Date" = 'february 9'
wikisql
CREATE TABLE table_64329 ( "Year" real, "1st Place Team" text, "2nd Place Team" text, "3rd Place Team" text, "4th Place Team" text, "Host Location" text )
What team was in 1st plate in a year later than 1956?
SELECT "1st Place Team" FROM table_64329 WHERE "Year" > '1956'
wikisql
CREATE TABLE table_name_81 ( away_team VARCHAR, venue VARCHAR )
When vfl park is the venue what's the Away team playing?
SELECT away_team FROM table_name_81 WHERE venue = "vfl park"
sql_create_context
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 hz_info.person_info_JGDM, hz_info.person_info_JGMC, COUNT(hz_info.RYBH) FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE mzjzjlb.JZZDSM = '过敏性皮炎' GROUP BY hz_info.person_info_JGDM
css
CREATE TABLE table_2102782_1 ( broadcast_date VARCHAR, viewers__in_millions_ VARCHAR )
Name the broadcast date for 6.0 viewers
SELECT broadcast_date FROM table_2102782_1 WHERE viewers__in_millions_ = "6.0"
sql_create_context
CREATE TABLE table_name_27 ( nation VARCHAR, date VARCHAR, athlete VARCHAR )
Name the nation for 8 june 1983 for marlies gohr
SELECT nation FROM table_name_27 WHERE date = "8 june 1983" AND athlete = "marlies gohr"
sql_create_context
CREATE TABLE table_name_41 ( ends INTEGER, name VARCHAR )
Which Ends have a Name of zambrano?
SELECT MAX(ends) FROM table_name_41 WHERE name = "zambrano"
sql_create_context
CREATE TABLE table_6397 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Series" text )
On what date was game 3 played?
SELECT "Date" FROM table_6397 WHERE "Game" = '3'
wikisql
CREATE TABLE fgwyjzb ( 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, ...
参保人水高翰门诊花了多少手术费,在2000-01-07到2004-02-14这四年里?
SELECT SUM(t_kc22.AMOUNT) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '水高翰' AND gwyjzb.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2000-01-07' AND '2004-02-14' AND t_kc22.MED_INV_ITEM_TYPE = '手术费' UNION SELECT SUM(t_kc22.AMOUNT) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb...
css
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_...
what is the earliest flight leaving BOSTON on 7 1 to DALLAS on 7 1
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND date_day.day_number = 1 AND date_day.month_number = 7 AND da...
atis
CREATE TABLE table_59800 ( "Season" text, "League" text, "Teams" text, "Home" text, "Away" text )
What team has a home of 2-3?
SELECT "Teams" FROM table_59800 WHERE "Home" = '2-3'
wikisql
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 amount of founder over the founder , and group by attribute founder by a bar chart, sort from low to high by the bars.
SELECT Founder, COUNT(Founder) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder
nvbench
CREATE TABLE table_49009 ( "Rank" text, "Team" text, "Run 1" text, "Run 2" text, "Run 3" text, "Run 4" text, "Final" text )
What is Run 3, when Team is United States (USA) USA I?
SELECT "Run 3" FROM table_49009 WHERE "Team" = 'united states (usa) usa i'
wikisql
CREATE TABLE table_name_43 ( visitor VARCHAR, decision VARCHAR, date VARCHAR )
Who was the visiting team where the decision was Biron on October 4?
SELECT visitor FROM table_name_43 WHERE decision = "biron" AND date = "october 4"
sql_create_context
CREATE TABLE zyjybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH number, 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, ...
门诊诊断病人方鹏云为精神分裂症的检测指标162731的结果定量及其单位各是什么呀?
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb 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 = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZ...
css
CREATE TABLE table_name_31 ( against VARCHAR, venue VARCHAR )
Name the Against of Venue of brewery field , bridgend?
SELECT against FROM table_name_31 WHERE venue = "brewery field , bridgend"
sql_create_context
CREATE TABLE table_34725 ( "Country" text, "Skip" text, "Third" text, "Second" text, "Lead" text )
Which second's third is Jean-Michel Arsenault?
SELECT "Second" FROM table_34725 WHERE "Third" = 'jean-michel arsenault'
wikisql
CREATE TABLE table_204_536 ( id number, "event" text, "bowling center" text, "city" text, "dates" text, "winner" text )
what is the last event on the chart
SELECT "event" FROM table_204_536 ORDER BY id DESC LIMIT 1
squall
CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arriv...
what does fare code H mean
SELECT DISTINCT booking_class FROM class_of_service WHERE booking_class = 'H'
atis
CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adults INTEGER, Kids INTEGER ) CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, baseP...
What is the average base price of different bed type? List bed type and average base price Plot them as bar chart, I want to display by the bar from high to low.
SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType ORDER BY bedType DESC
nvbench