context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_44237 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Attendance" real, "Record" text, "Points" real )
What was the record on march 26?
SELECT "Record" FROM table_44237 WHERE "Date" = 'march 26'
wikisql
CREATE TABLE table_name_79 ( december INTEGER, game VARCHAR )
What is average December when game is 30?
SELECT AVG(december) FROM table_name_79 WHERE game = 30
sql_create_context
CREATE TABLE table_name_32 ( ship_types_delivered VARCHAR, yard_name VARCHAR )
What types of ships were made at the Froemming Brothers ship yard?
SELECT ship_types_delivered FROM table_name_32 WHERE yard_name = "froemming brothers"
sql_create_context
CREATE TABLE table_75408 ( "Game" real, "March" real, "Opponent" text, "Score" text, "Record" text, "Points" real )
How many games have a March of 19, and Points smaller than 83?
SELECT COUNT("Game") FROM table_75408 WHERE "March" = '19' AND "Points" < '83'
wikisql
CREATE TABLE restaurant_type ( restypeid number, restypename text, restypedescription text ) CREATE TABLE type_of_restaurant ( resid number, restypeid number ) CREATE TABLE restaurant ( resid number, resname text, address text, rating number ) CREATE TABLE visits_restaurant ( ...
List all students' first names and last names who majored in 600.
SELECT fname, lname FROM student WHERE major = 600
spider
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 demographic ( subject_id text, hadm_id t...
count the number of patients whose days of hospital stay is greater than 30 and lab test name is heparin, lmw?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "30" AND lab.label = "Heparin, LMW"
mimicsql_data
CREATE TABLE table_train_32 ( "id" int, "pregnancy_or_lactation" bool, "renal_disease" bool, "hemachromatosis" bool, "glucose_6_phosphate_dehydrogenase_deficiency_g6pd" int, "prisoners" bool, "NOUSE" float )
known kidney stones
SELECT * FROM table_train_32 WHERE renal_disease = 1
criteria2sql
CREATE TABLE table_10645 ( "Tournament" text, "Winner" text, "Runner-up" text, "Score" text, "Third Place" text )
Name the third place for anders j rryd
SELECT "Third Place" FROM table_10645 WHERE "Runner-up" = 'anders järryd'
wikisql
CREATE TABLE subjects ( subject_id number, subject_name text ) CREATE TABLE course_authors_and_tutors ( author_id number, author_tutor_atb text, login_name text, password text, personal_name text, middle_name text, family_name text, gender_mf text, address_line_1 text ) CRE...
Find the dates of the tests taken with result 'Pass'.
SELECT date_test_taken FROM student_tests_taken WHERE test_result = "Pass"
spider
CREATE TABLE table_34543 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text )
Who is runner-up where the winning score is 6 (65-70-70-69=274) and the margin of victory is 3 strokes?
SELECT "Runner(s)-up" FROM table_34543 WHERE "Margin of victory" = '3 strokes' AND "Winning score" = '–6 (65-70-70-69=274)'
wikisql
CREATE TABLE table_name_32 ( country VARCHAR, density__per_km²_ VARCHAR )
Which country has a density (per km ) of 6,814?
SELECT country FROM table_name_32 WHERE density__per_km²_ = "6,814"
sql_create_context
CREATE TABLE table_name_78 ( title VARCHAR, director VARCHAR, production_number VARCHAR )
What is the title with chuck jones as the director and the production number 9537?
SELECT title FROM table_name_78 WHERE director = "chuck jones" AND production_number = "9537"
sql_create_context
CREATE TABLE table_16083989_1 ( species VARCHAR, voges_proskauer VARCHAR, indole VARCHAR )
Which species show a negative result with both voges-proskauer and indole?
SELECT species FROM table_16083989_1 WHERE voges_proskauer = "Negative" AND indole = "Negative"
sql_create_context
CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE city ( city_code varchar, ...
is there a UA flight from MIAMI to WASHINGTON arriving around noon
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 (((flight.arrival_time <= 1230 AND flight.arrival_time >= 1130) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHINGTON' AND CITY_1...
atis
CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restr...
what flights are there from BALTIMORE to NEWARK
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 = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'NEWA...
atis
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 ...
看看病人水慧颖在医院1586101的门诊就诊中科室名有急诊二字的就诊记录的流水号
SELECT mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.person_info_XM = '水慧颖' AND hz_info.YLJGDM = '1586101' AND mzjzjlb.JZKSMC LIKE '%急诊%'
css
CREATE TABLE table_name_87 ( opponent VARCHAR, week VARCHAR )
Who was the opponent the falcons played against on week 3?
SELECT opponent FROM table_name_87 WHERE week = 3
sql_create_context
CREATE TABLE table_29186 ( "Rank" real, "Rider" text, "Sat 21 Aug" text, "Mon 23 Aug" text, "Tues 24 Aug" text, "Wed 25 Aug" text, "Thurs 26 Aug" text, "Fri 27 Aug" text, "Sat 29 Aug" text )
What is thurs 26 aug when wed 25 aug is 19' 59.98 113.192mph?
SELECT "Thurs 26 Aug" FROM table_29186 WHERE "Wed 25 Aug" = '19'' 59.98 113.192mph'
wikisql
CREATE TABLE table_10587 ( "Year" real, "Award" text, "Category" text, "Nominee" text, "Result" text )
Which category was Michael Stewart a nominee in?
SELECT "Category" FROM table_10587 WHERE "Nominee" = 'michael stewart'
wikisql
CREATE TABLE table_34750 ( "Round" real, "Player" text, "Position" text, "Nationality" text, "College/junior/club team (League)" text )
What college did the player selected in rounds over 3 play for?
SELECT "College/junior/club team (League)" FROM table_34750 WHERE "Round" > '3'
wikisql
CREATE TABLE table_name_97 ( new_entries_this_round VARCHAR, number_of_fixtures VARCHAR, round VARCHAR )
What were the new entries for the Semi-Finals round with fewer than 8 fixtures?
SELECT new_entries_this_round FROM table_name_97 WHERE number_of_fixtures < 8 AND round = "semi-finals"
sql_create_context
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 average age of male for different job title Visualize by bar chart, list by the mean age in asc.
SELECT job, AVG(age) FROM Person WHERE gender = 'male' GROUP BY job ORDER BY AVG(age)
nvbench
CREATE TABLE table_name_86 ( miss_universe_philippines VARCHAR, second_runner_up VARCHAR )
Who won Miss Universe Philippines when Regina Hahn was second runner-up?
SELECT miss_universe_philippines FROM table_name_86 WHERE second_runner_up = "regina hahn"
sql_create_context
CREATE TABLE table_41961 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text )
For the tournament played on Jul 4, 1982, what was the winning score?
SELECT "Winning score" FROM table_41961 WHERE "Date" = 'jul 4, 1982'
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, show me about the distribution of phone_number and salary in a bar chart, I want to list by the Y-axis in descending please.
SELECT PHONE_NUMBER, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SALARY DESC
nvbench
CREATE TABLE table_name_28 ( tie_no VARCHAR, away_team VARCHAR )
What is the tie no that has southport as the away team?
SELECT tie_no FROM table_name_28 WHERE away_team = "southport"
sql_create_context
CREATE TABLE table_53578 ( "Race" text, "Circuit" text, "Date" text, "Pole position" text, "Fastest lap" text, "Winning driver" text, "Constructor" text, "Tyre" text, "Report" text )
What was the fastest lap in the Belgian Grand Prix?
SELECT "Fastest lap" FROM table_53578 WHERE "Race" = 'belgian grand prix'
wikisql
CREATE TABLE table_68024 ( "Team" text, "Truck(s)" text, "Driver(s)" text, "Primary Sponsor(s)" text, "Owner(s)" text, "Crew Chief" text )
Who is the driver that has a crew chief Gary Ritter?
SELECT "Driver(s)" FROM table_68024 WHERE "Crew Chief" = 'gary ritter'
wikisql
CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE airport_service ( city_code varchar, airport_code varch...
ground transportation in BALTIMORE
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'BALTIMORE' AND ground_service.city_code = city.city_code
atis
CREATE TABLE table_6513 ( "Year" real, "Class" text, "Team" text, "Points" real, "Rank" text, "Wins" real )
What is the year that has points larger than 20?
SELECT COUNT("Year") FROM table_6513 WHERE "Points" > '20'
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, give me the comparison about the amount of hire_date over the hire_date bin hire_date by weekday by a bar chart, I want to display Y-axis in descending order please.
SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY COUNT(HIRE_DATE) DESC
nvbench
CREATE TABLE table_50305 ( "Release" real, "Start" text, "Pieces" real, "Board (inches)" text, "Board (cm)" text, "Type" text )
What is the dimensions in centimeters of a theater board who started in 1940, who was released after 2010?
SELECT "Board (cm)" FROM table_50305 WHERE "Start" = '1940' AND "Type" = 'theater' AND "Release" > '2010'
wikisql
CREATE TABLE table_name_35 ( home_team VARCHAR )
Name the home team score for south melbourne home team
SELECT home_team AS score FROM table_name_35 WHERE home_team = "south melbourne"
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...
give me the number of patients whose days of hospital stay is greater than 7 and procedure icd9 code is 4576?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "7" AND procedures.icd9_code = "4576"
mimicsql_data
CREATE TABLE table_77083 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
Name the Player who has a To par of 2 and a Score of 69-73=142?
SELECT "Player" FROM table_77083 WHERE "To par" = '–2' AND "Score" = '69-73=142'
wikisql
CREATE TABLE table_35630 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
Which Total is the highest one that has a Rank of 1, and a Gold larger than 11?
SELECT MAX("Total") FROM table_35630 WHERE "Rank" = '1' AND "Gold" > '11'
wikisql
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE labevents ( row_id numbe...
how many patients died during the same hospital encounter after having been diagnosed with hx of tongue malignancy?
SELECT COUNT(DISTINCT t2.subject_id) FROM (SELECT t1.subject_id, t1.charttime, t1.hadm_id FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FRO...
mimic_iii
CREATE TABLE table_14871601_1 ( losses INTEGER, team VARCHAR )
What is the largest loss for the Tacuary team?
SELECT MAX(losses) FROM table_14871601_1 WHERE team = "Tacuary"
sql_create_context
CREATE TABLE table_name_96 ( director VARCHAR, producer VARCHAR )
Who was the director for the film produced by River Films?
SELECT director FROM table_name_96 WHERE producer = "river films"
sql_create_context
CREATE TABLE table_4165 ( "No. in series" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (million)" text )
How many millions of U.S viewers watched the episode titled 'Miss Mystic Falls'?
SELECT "U.S. viewers (million)" FROM table_4165 WHERE "Title" = 'Miss Mystic Falls'
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...
how many patients are admitted under emergency and are diagnosed with urinary incontinence, unspecified?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.long_title = "Urinary incontinence, unspecified"
mimicsql_data
CREATE TABLE table_name_73 ( actor VARCHAR, character VARCHAR )
What actor plays Marie-Rose De Putter?
SELECT actor FROM table_name_73 WHERE character = "marie-rose de putter"
sql_create_context
CREATE TABLE table_2509350_3 ( language VARCHAR, el_villar_municipality VARCHAR )
Name the language for el villar 1264
SELECT language FROM table_2509350_3 WHERE el_villar_municipality = 1264
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...
How many patients transfered from the hospital stayed for more than 10 days in hospital?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND demographic.days_stay > "10"
mimicsql_data
CREATE TABLE table_204_480 ( id number, "title" text, "alternate title(s)" text, "year" number, "manufacturer" text, "genre(s)" text, "max. players" number )
which manufacturer has the most games on the list ?
SELECT "manufacturer" FROM table_204_480 GROUP BY "manufacturer" ORDER BY COUNT(*) DESC LIMIT 1
squall
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 ...
列出患者70892680所有检验结果指标记录中的检测方法在2012年3月29日到2020年7月23日之间都是什么?
SELECT jyjgzbb.JCFF FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_in...
css
CREATE TABLE table_27382 ( "Language" text, "Punata Municipality" real, "Villa Rivero Municipality" real, "San Benito Municipality" real, "Tacachi Municipality" real, "Cuchumuela Municipality" real )
If Villa Rivero Municipality if 7, what is the language?
SELECT "Language" FROM table_27382 WHERE "Villa Rivero Municipality" = '7'
wikisql
CREATE TABLE table_name_61 ( venue VARCHAR, player VARCHAR, season VARCHAR )
Which Venue has michael di venuto on Season of 2000/01?
SELECT venue FROM table_name_61 WHERE player = "michael di venuto" AND season = "2000/01"
sql_create_context
CREATE TABLE Students ( student_id VARCHAR, first_name VARCHAR ) CREATE TABLE Assessment_Notes ( date_of_notes VARCHAR, student_id VARCHAR )
Find the dates of assessment notes for students with first name 'Fanny'.
SELECT T1.date_of_notes FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.first_name = "Fanny"
sql_create_context
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 has it passed since the first time that patient 40059 stayed in ward 15 on the current hospital encounter?
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 40059 AND admissions.dischtime IS NULL)) AND transfers....
mimic_iii
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, h...
has patient 032-9230 had a lab test of troponin - i?
SELECT COUNT(*) > 0 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '032-9230')) AND lab.labname = 'troponin - i'
eicu
CREATE TABLE t_kc21_t_kc24 ( MED_CLINIC_ID text, MED_SAFE_PAY_ID number ) CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, ...
这位82741978号患者在医院3317278出院的时候被诊断的疾病名称中包含支气管炎的医疗就诊记录编号都是多少号呢?
SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '82741978' AND t_kc21.MED_SER_ORG_NO = '3317278' AND t_kc21.OUT_DIAG_DIS_NM LIKE '%支气管炎%'
css
CREATE TABLE student ( id text, name text, dept_name text, tot_cred number ) CREATE TABLE takes ( id text, course_id text, sec_id text, semester text, year number, grade text ) CREATE TABLE course ( course_id text, title text, dept_name text, credits number ) C...
What is the name of the department with the most credits?
SELECT dept_name FROM course GROUP BY dept_name ORDER BY SUM(credits) DESC LIMIT 1
spider
CREATE TABLE Projects ( Project_ID INTEGER, Project_Details VARCHAR(255) ) CREATE TABLE Statements ( Statement_ID INTEGER, Statement_Details VARCHAR(255) ) CREATE TABLE Documents_with_Expenses ( Document_ID INTEGER, Budget_Type_Code CHAR(15), Document_Details VARCHAR(255) ) CREATE TABLE D...
Give the proportion of what is the project id and detail for the project with at least two documents?
SELECT T1.Project_Details, T1.Project_ID FROM Projects AS T1 JOIN Documents AS T2 ON T1.Project_ID = T2.Project_ID
nvbench
CREATE TABLE table_31384 ( "Value" text, "Dimensions" text, "Main Color" text, "Obverse" text, "Reverse" text, "Watermark" text, "Date of issue" text )
What is on the reverse side of the 100 coin?
SELECT "Reverse" FROM table_31384 WHERE "Value" = '₩100'
wikisql
CREATE TABLE table_39282 ( "Game" real, "October" real, "Opponent" text, "Score" text, "Record" text, "Points" real )
Which Points have an Opponent of vancouver canucks?
SELECT AVG("Points") FROM table_39282 WHERE "Opponent" = 'vancouver canucks'
wikisql
CREATE TABLE table_55282 ( "Film title" text, "Director" text, "Writer" text, "Voiced character(s)" text, "Producer/Executive Producer" text, "Sound" text )
Which writer had voice characters of JDR, BB, TN, LR, PS?
SELECT "Writer" FROM table_55282 WHERE "Voiced character(s)" = 'jdr, bb, tn, lr, ps'
wikisql
CREATE TABLE table_name_1 ( valency_change VARCHAR, type VARCHAR )
WHat is the Valency change of associative type?
SELECT valency_change FROM table_name_1 WHERE type = "associative"
sql_create_context
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 ...
provide the number of patients diagnosed with other chronic pulmonary heart diseases who had main type of drug prescription.
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 chronic pulmonary heart diseases" AND prescriptions.drug_type = "MAIN"
mimicsql_data
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolea...
count no. of answers by ID.
SELECT COUNT(*) FROM Posts WHERE OwnerUserId = 5140781 AND PostTypeId = 2 AND CreationDate BETWEEN '2017-07-01' AND '2017-07-31'
sede
CREATE TABLE table_name_57 ( series_5 VARCHAR, series_3 VARCHAR )
Who in series 5 corresponds to Deborah Meaden in series 3?
SELECT series_5 FROM table_name_57 WHERE series_3 = "deborah meaden"
sql_create_context
CREATE TABLE table_3937 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real, "U.S. viewers (millions)" text )
what is the name of the episode whose director is Michael Pressman and the number of that episode in that season is less than 10.0?
SELECT "Title" FROM table_3937 WHERE "Directed by" = 'Michael Pressman' AND "No. in season" < '10.0'
wikisql
CREATE TABLE table_39751 ( "Office" text, "Democratic ticket" text, "Republican ticket" text, "Socialist ticket" text, "Workers ticket" text )
What is the name on the Democratic ticket when the Workers ticket is franklin p. brill?
SELECT "Democratic ticket" FROM table_39751 WHERE "Workers ticket" = 'franklin p. brill'
wikisql
CREATE TABLE table_name_26 ( power VARCHAR, class VARCHAR, frequency VARCHAR )
What power has A as the class, and 93.7 as the frequency?
SELECT power FROM table_name_26 WHERE class = "a" AND frequency = "93.7"
sql_create_context
CREATE TABLE table_204_197 ( id number, "date" text, "time" text, "opponent#" text, "site" text, "tv" text, "result" text, "attendance" number )
how many games did the 1993 texas tech football team play in either september or october ?
SELECT COUNT(*) FROM table_204_197 WHERE "date" IN (9, 10)
squall
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE medication (...
among patients who were prescribed digoxin 125 mcg po tabs, what are the three most frequently prescribed drugs at the same time since 5 years ago?
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'digoxin 125 mcg po tabs' AND DATETIME(medication.dr...
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...
provide the number of patients admitted in hospital before 2138 who had s/p fall primary disease.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "S/P FALL" AND demographic.admityear < "2138"
mimicsql_data
CREATE TABLE table_2067 ( "Role" text, "Original Broadway Cast" text, "Current Broadway Cast" text, "Original Toronto Cast" text, "First National Tour Cast" text, "Original Australian Cast" text, "Original West End Cast" text, "Current West End Cast" text, "Second National Tour Cast"...
How many different actors from the Second national tour year 2 played the character played by Oliver Tompsett from the original West End cast?
SELECT COUNT("Second National Tour Year 2") FROM table_2067 WHERE "Original West End Cast" = 'Oliver Tompsett'
wikisql
CREATE TABLE table_25792 ( "Rank" real, "City/Town" text, "County" text, "Region/Province" text, "Population" real, "Country" text )
When 20 is the rank and north west is the region/province what is the county?
SELECT "County" FROM table_25792 WHERE "Region/Province" = 'North West' AND "Rank" = '20'
wikisql
CREATE TABLE table_11835 ( "Name" text, "Country" text, "Reign began" text, "Reign ended" text, "Length" text )
Whose reign ended in Egypt?
SELECT "Reign ended" FROM table_11835 WHERE "Country" = 'egypt'
wikisql
CREATE TABLE table_name_5 ( away_captain VARCHAR, venue VARCHAR )
What is the name of the away captain when the game was at Adelaide Oval?
SELECT away_captain FROM table_name_5 WHERE venue = "adelaide oval"
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...
look for the number of white patients who have procedure icd9 code 9907.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "WHITE" AND procedures.icd9_code = "9907"
mimicsql_data
CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ) CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufac...
please list all flights between INDIANAPOLIS and ORLANDO on the 27 of 12
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 = 'ORLANDO' AND date_day.day_number = 27 AND date_day.month_number = 12 AND ...
atis
CREATE TABLE table_name_77 ( score VARCHAR, losing_team VARCHAR, total VARCHAR )
Which Score has a Losing Team of sydney roosters, and a Total of 88?
SELECT score FROM table_name_77 WHERE losing_team = "sydney roosters" AND total = 88
sql_create_context
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varc...
Show each employee's salary using a bar chart, note that use the last name of each employee, list from high to low by the bars please.
SELECT LAST_NAME, SALARY FROM employees ORDER BY LAST_NAME DESC
nvbench
CREATE TABLE table_11802 ( "Week" text, "Date" text, "Opponent" text, "Result" text, "Kickoff [a ]" text, "Game site" text, "Attendance" text, "Record" text )
Which week has Game site of Candlestick Park?
SELECT "Week" FROM table_11802 WHERE "Game site" = 'candlestick park'
wikisql
CREATE TABLE table_name_56 ( location VARCHAR, opponent VARCHAR )
What location had the opponent Hiroyuki Abe?
SELECT location FROM table_name_56 WHERE opponent = "hiroyuki abe"
sql_create_context
CREATE TABLE table_name_59 ( money___£__ VARCHAR, country VARCHAR, player VARCHAR )
Can you tell me the Money ( ) that has the Country of england, and the Player of malcolm mackenzie?
SELECT money___£__ FROM table_name_59 WHERE country = "england" AND player = "malcolm mackenzie"
sql_create_context
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id ...
when was patient 18677 prescribed the drug pantoprazole and omeprazole at the same time for the last time since 10/2103?
SELECT t1.startdate FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'pantoprazole' AND admissions.subject_id = 18677 AND STRFTIME('%y-%m', prescriptions.startdate) >= '2103-10') AS t1 JOIN (SELECT adm...
mimic_iii
CREATE TABLE table_name_4 ( Field VARCHAR, player VARCHAR, goals VARCHAR, tries VARCHAR, points VARCHAR )
What is the total number of field goals of Denan Kemp, who has more than 4 tries, more than 32 points, and 0 goals?
SELECT COUNT(Field) AS goals FROM table_name_4 WHERE tries > 4 AND points > 32 AND goals = 0 AND player = "denan kemp"
sql_create_context
CREATE TABLE table_15218 ( "Field" text, "Geological Trend" text, "Reserves" text, "Discovery" text, "Operator(s)" text )
Which operator has a Reserve of 100 bbbl?
SELECT "Operator(s)" FROM table_15218 WHERE "Reserves" = '100 bbbl'
wikisql
CREATE TABLE table_train_129 ( "id" int, "cerebral_neoplasia" bool, "gender" string, "mini_mental_state_examination_mmse" int, "multiple_lacunar_infarcts" bool, "neurodegenerative_disease" bool, "mri_abnormality" bool, "nervous_system_functioning" bool, "head_injury" bool, "serio...
the patient is a male or female of at least 50 years of age and has a body mass index ( bmi ) >= 18.5 kg / m2.
SELECT * FROM table_train_129 WHERE (gender = 'male' OR gender = 'female') AND age >= 50 AND body_mass_index_bmi >= 18.5
criteria2sql
CREATE TABLE route ( train_id int, station_id int ) CREATE TABLE weekly_weather ( station_id int, day_of_week text, high_temperature int, low_temperature int, precipitation real, wind_speed_mph int ) CREATE TABLE station ( id int, network_name text, services text, local...
Visualize a bar graph about the times and numbers of all trains that go to Chennai, ordered by time.
SELECT time, train_number FROM train WHERE destination = 'Chennai' ORDER BY time
nvbench
CREATE TABLE table_name_52 ( round INTEGER, record VARCHAR )
What is the average number of rounds that Lance Gibson fought when his record was 1-1?
SELECT AVG(round) FROM table_name_52 WHERE record = "1-1"
sql_create_context
CREATE TABLE table_69008 ( "Name" text, "Street address" text, "Years as tallest" text, "Height ft (m)" text, "Floors" real )
The building with 48 floors has an address in Las Vegas of what?
SELECT "Street address" FROM table_69008 WHERE "Floors" = '48'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost numbe...
what is the name of the allergy patient 015-96048 has had on their last hospital visit?
SELECT allergy.allergyname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-96048' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient...
eicu
CREATE TABLE table_1566848_6 ( centerfold_model VARCHAR )
Name the 20 questions when centerfold model is cherie witter
SELECT 20 AS _questions FROM table_1566848_6 WHERE centerfold_model = "Cherie Witter"
sql_create_context
CREATE TABLE table_23292220_6 ( episode VARCHAR, jasons_team VARCHAR )
Name the episode(s) that featured Duncan James and Johnny Vegas as Jason's team.
SELECT episode FROM table_23292220_6 WHERE jasons_team = "Duncan James and Johnny Vegas"
sql_create_context
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId numb...
Most questions asked by a user.
SELECT COUNT(Posts.Id) AS NoOfQueAsked, Users.Id FROM Posts, Users WHERE Users.Id = OwnerUserId AND Posts.PostTypeId = 1 GROUP BY Users.Id ORDER BY COUNT(Posts.Id) DESC
sede
CREATE TABLE t_kc21_t_kc24 ( MED_CLINIC_ID text, MED_SAFE_PAY_ID number ) CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, ...
患者77127973在医院6027111入院诊断时的医疗就诊记录里疾病名称不包含瘙痒症的编号有什么?
SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '77127973' AND t_kc21.MED_SER_ORG_NO = '6027111' AND NOT t_kc21.IN_DIAG_DIS_NM LIKE '%瘙痒症%'
css
CREATE TABLE table_39209 ( "Call sign" text, "Frequency MHz" real, "City of license" text, "ERP W" real, "Height m ( ft )" text, "Class" text, "FCC info" text )
What is the Frequency MHz of Trinidad, Colorado?
SELECT "Frequency MHz" FROM table_39209 WHERE "City of license" = 'trinidad, colorado'
wikisql
CREATE TABLE table_54677 ( "Round" real, "Player" text, "Position" text, "Nationality" text, "College/junior/club team (league)" text )
Which player is a centre?
SELECT "Player" FROM table_54677 WHERE "Position" = 'centre'
wikisql
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...
这家6526650的医疗机构给患者做蒲地蓝消炎口服液检查记录共有多少
SELECT COUNT(*) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '6526650' AND t_kc22.SOC_SRT_DIRE_NM = '蒲地蓝消炎口服液' UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gyb.MED_SER_ORG_NO = '6526650' AND t_kc22.SOC_SRT_DIRE_NM = '蒲地蓝消炎口服液...
css
CREATE TABLE table_name_7 ( round INTEGER, time VARCHAR, event VARCHAR )
What is the average round of the match in the Hero's 9 event with a time of 5:00?
SELECT AVG(round) FROM table_name_7 WHERE time = "5:00" AND event = "hero's 9"
sql_create_context
CREATE TABLE table_name_21 ( attendance VARCHAR, opponent VARCHAR, date VARCHAR )
When the phillies 1:15 pm played on April 9, what was the attendance?
SELECT attendance FROM table_name_21 WHERE opponent = "phillies 1:15 pm" AND date = "april 9"
sql_create_context
CREATE TABLE table_name_69 ( population__2008_ INTEGER, created VARCHAR, county VARCHAR )
What is the highest population (2008) created earlier than 1857, and the county was Sinoe?
SELECT MAX(population__2008_) FROM table_name_69 WHERE created < 1857 AND county = "sinoe"
sql_create_context
CREATE TABLE table_name_72 ( overall VARCHAR, name VARCHAR, pick VARCHAR, college VARCHAR )
What is the overall pick number for a draft pick smaller than 9, named buck mystrom from Michigan State college?
SELECT overall FROM table_name_72 WHERE pick < 9 AND college = "michigan state" AND name = "buck mystrom"
sql_create_context
CREATE TABLE table_name_53 ( high_rebounds VARCHAR, date VARCHAR )
What was the highest number of rebounds on February 6?
SELECT high_rebounds FROM table_name_53 WHERE date = "february 6"
sql_create_context
CREATE TABLE table_32576 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What was the score when essendon was the home team?
SELECT "Home team score" FROM table_32576 WHERE "Home team" = 'essendon'
wikisql
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...
有什么医院排序属于团伙成员华云韶最常去的?
SELECT gwyjzb.MED_SER_ORG_NO FROM gwyjzb WHERE gwyjzb.PERSON_NM = '华云韶' GROUP BY gwyjzb.MED_SER_ORG_NO ORDER BY COUNT(*) DESC UNION SELECT fgwyjzb.MED_SER_ORG_NO FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '华云韶' GROUP BY fgwyjzb.MED_SER_ORG_NO ORDER BY COUNT(*) DESC
css