context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_name_22 ( average_cards_a_game INTEGER, season VARCHAR, red_cards VARCHAR )
Which Average Cards a game has a Season of 2004/2005, and a Red Cards larger than 3?
SELECT MIN(average_cards_a_game) FROM table_name_22 WHERE season = "2004/2005" AND red_cards > 3
sql_create_context
CREATE TABLE table_40013 ( "Date" text, "Score" text, "Set 1" text, "Set 2" text, "Set 3" text, "Set 4" text, "Set 5" text, "Total" text )
When was set 3 of 18-25?
SELECT "Date" FROM table_40013 WHERE "Set 3" = '18-25'
wikisql
CREATE TABLE table_204_549 ( id number, "series\nnumber" text, "key" text, "composed" text, "published" text, "opus no." text, "brown" text, "kobylanska" text, "chominski" text, "dedication" text, "notes" text )
what was the top publishing year ?
SELECT "published" FROM table_204_549 GROUP BY "published" ORDER BY COUNT(*) DESC LIMIT 1
squall
CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABL...
Is 463 for undergraduates ?
SELECT DISTINCT advisory_requirement, enforced_requirement, name FROM course WHERE department = 'EECS' AND number = 463
advising
CREATE TABLE schedule ( Cinema_ID int, Film_ID int, Date text, Show_times_per_day int, Price float ) CREATE TABLE film ( Film_ID int, Rank_in_series int, Number_in_season int, Title text, Directed_by text, Original_air_date text, Production_code text ) CREATE TABLE cine...
A bar chart showing the sum of capacity of cinemas open for each year, could you sort in desc by the x-axis?
SELECT Openning_year, SUM(Capacity) FROM cinema GROUP BY Openning_year ORDER BY Openning_year DESC
nvbench
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 diagnoses ( ...
How many widow patients have had an albumin urine lab test done?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "WIDOWED" AND lab.label = "Albumin, Urine"
mimicsql_data
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,...
give me the number of patients whose ethnicity is american indian/alaska native and admission year is less than 2148?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND demographic.admityear < "2148"
mimicsql_data
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden ...
Possibly, an answer in comments.
SELECT p.Id AS "post_link", c.Text FROM Posts AS p INNER JOIN Comments AS c ON c.PostId = p.Id WHERE c.Text LIKE '%answer%' AND p.AnswerCount = 0 AND p.ClosedDate IS NULL ORDER BY p.CreationDate
sede
CREATE TABLE table_55379 ( "Sport" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is the highest Shooting Total with a Bronze less than 0?
SELECT MAX("Total") FROM table_55379 WHERE "Sport" = 'shooting' AND "Bronze" < '0'
wikisql
CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_...
what is the first flight that travels from ATLANTA to BALTIMORE that serves LUNCH
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, food_service WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code AND food...
atis
CREATE TABLE table_32690 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What was the lowest crowd size when the away team scored 11.17 (83)?
SELECT MIN("Crowd") FROM table_32690 WHERE "Away team score" = '11.17 (83)'
wikisql
CREATE TABLE table_8268 ( "Name" text, "Date" text, "Defending forces" text, "Brigade" text, "Population" text )
Which brigade has a population of 190?
SELECT "Brigade" FROM table_8268 WHERE "Population" = '190'
wikisql
CREATE TABLE table_name_94 ( traffic_direction VARCHAR, street VARCHAR )
What is the traffic direction of 97th street?
SELECT traffic_direction FROM table_name_94 WHERE street = "97th street"
sql_create_context
CREATE TABLE table_203_563 ( id number, "#" number, "judge" text, "state" text, "born/died" text, "active" text, "chief" text, "senior" text, "appointed by" text, "reason for\ntermination" text )
which state has the largest amount of judges to serve ?
SELECT "state" FROM table_203_563 GROUP BY "state" ORDER BY COUNT("judge") DESC LIMIT 1
squall
CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int,...
This semester who is teaching Upper-Level Writing ?
SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN course ON course.course_id = course_offering.course_id INNER JOIN semester...
advising
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, val...
tell me the name of the medication that patient 14397 was last prescribed via the oral route during their last hospital visit?
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14397 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND prescriptions.route = 'oral' ORDER BY prescriptions.startdate DESC LIMIT 1
mimic_iii
CREATE TABLE table_59569 ( "Club" text, "Wins" real, "Byes" real, "Losses" real, "Against" real )
Which wins have less than 1 bye?
SELECT MAX("Wins") FROM table_59569 WHERE "Byes" < '1'
wikisql
CREATE TABLE table_70343 ( "Year" text, "Total (000s)" real, "Israel" real, "Germany" real, "Jews (Halakha) in Israel" text )
What was the amount of 000s when Germany had 16.6?
SELECT "Total (000s)" FROM table_70343 WHERE "Germany" = '16.6'
wikisql
CREATE TABLE table_54289 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text )
Who did they lose to 3-17?
SELECT "Opponent" FROM table_54289 WHERE "Score" = '3-17'
wikisql
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, ...
give me the duration of the last stay of patient 28484 in the icu.
SELECT STRFTIME('%j', icustays.outtime) - STRFTIME('%j', icustays.intime) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 28484) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1
mimic_iii
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE vitalperiodic ( vitalperio...
how many patients have been discharged from hospital since 2 years ago.
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE NOT patient.hospitaldischargetime IS NULL AND DATETIME(patient.hospitaldischargetime) >= DATETIME(CURRENT_TIME(), '-2 year')
eicu
CREATE TABLE table_23725 ( "Date" text, "Presenter" text, "Guest 1" text, "Guest 2" text, "Guest 3" text, "Guest 4" text )
Who is the guest 2 in the episode where guest 4 is Iyare Igiehon and guest 3 is John Oliver?
SELECT "Guest 2" FROM table_23725 WHERE "Guest 4" = 'Iyare Igiehon' AND "Guest 3" = 'John Oliver'
wikisql
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date...
when is the hire date for those employees whose first name does not containing the letter M, and count them by a bar chart
SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE NOT FIRST_NAME LIKE '%M%'
nvbench
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE jyjgzbb ( BGDH text, BGRQ tim...
09年10月8日到13年11月23日期间,患者84974890的369859指标是怎样的
SELECT * FROM hz_info JOIN mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON 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_MZJZJLB AND zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb.BGDH = jyjgzbb.BGDH WHERE hz_inf...
css
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime t...
what were the five most frequently prescribed medications for the peptic ulcer disease female patients of the 30s during the same hospital encounter after they had been diagnosed with peptic ulcer disease?
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'peptic ulcer di...
eicu
CREATE TABLE table_name_64 ( team_1 VARCHAR, round VARCHAR )
Name the team 1 for round 3
SELECT team_1 FROM table_name_64 WHERE round = "3"
sql_create_context
CREATE TABLE table_25711913_14 ( field_goals__4_points_ VARCHAR, touchdowns__5_points_ VARCHAR )
How many field goals were scored by the player that got 7 touchdowns?
SELECT field_goals__4_points_ FROM table_25711913_14 WHERE touchdowns__5_points_ = 7
sql_create_context
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, ...
在2005年8月29日到2007年4月15日之间名叫施博雅参保人员门诊手术费要多少钱?
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 '2005-08-29' AND '2007-04-15' AND t_kc22.MED_INV_ITEM_TYPE = '手术费' UNION SELECT SUM(t_kc22.AMOUNT) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb...
css
CREATE TABLE table_52272 ( "Name" text, "Years" text, "Area" text, "Authority" text, "Decile" text, "Roll" real )
What is the name of the school with a decile of 1, a state authority, and located in Otahuhu?
SELECT "Name" FROM table_52272 WHERE "Decile" = '1' AND "Authority" = 'state' AND "Area" = 'otahuhu'
wikisql
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) 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 T...
For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of job_id and employee_id in a bar chart, and rank Y-axis from low to high order.
SELECT JOB_ID, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMPLOYEE_ID
nvbench
CREATE TABLE table_31596 ( "Year" real, "Date" text, "Event" text, "Days" text, "Stages" text, "Acts" text )
Tell me the stages for 1981
SELECT "Stages" FROM table_31596 WHERE "Year" = '1981'
wikisql
CREATE TABLE table_name_27 ( language VARCHAR, film_name VARCHAR )
what language is seethaiah in
SELECT language FROM table_name_27 WHERE film_name = "seethaiah"
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 diagnoses ( ...
give me the number of patients whose gender is m and year of birth is less than 2103?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.dob_year < "2103"
mimicsql_data
CREATE TABLE table_name_89 ( date VARCHAR, venue VARCHAR )
Tell me the date of stade des martyrs, dr congo
SELECT date FROM table_name_89 WHERE venue = "stade des martyrs, dr congo"
sql_create_context
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, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
患者85618311被开出的药品均不超过2746.51元在哪几次医疗记录中?医疗就诊编号是多少?
SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_ID = '85618311' AND NOT gwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 2746.51) UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '85618311' AND NOT fgwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLI...
css
CREATE TABLE table_45257 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text )
What is the sum for the week with the date october 30, 1994?
SELECT SUM("Week") FROM table_45257 WHERE "Date" = 'october 30, 1994'
wikisql
CREATE TABLE table_23662356_3 ( average VARCHAR, number_of_dances VARCHAR )
How many averages were listed for the couple who had 12 dances?
SELECT COUNT(average) FROM table_23662356_3 WHERE number_of_dances = 12
sql_create_context
CREATE TABLE table_name_51 ( type VARCHAR, location VARCHAR )
What was the school type for Los Angeles, California?
SELECT type FROM table_name_51 WHERE location = "los angeles, california"
sql_create_context
CREATE TABLE table_203_267 ( id number, "no." number, "song" text, "singers" text, "length (m:ss)" text )
what is the number of songs sung by two singers ?
SELECT COUNT("song") FROM table_203_267 WHERE "singers" >= 2
squall
CREATE TABLE table_70625 ( "Position" text, "Name" text, "Height" text, "Weight (lbs.)" real, "Hometown" text, "Draft Year" real, "Pick" text, "All-Stars" text, "NBA Championships" text, "NBA Team" text )
Who is the pick with the height of 6'9' and weighs (lbs) 215?
SELECT "Pick" FROM table_70625 WHERE "Height" = '6''9' AND "Weight (lbs.)" = '215'
wikisql
CREATE TABLE table_14903081_1 ( current_venue VARCHAR, tournament VARCHAR )
What is the current venue for the Miami Masters tournament?
SELECT current_venue FROM table_14903081_1 WHERE tournament = "Miami Masters"
sql_create_context
CREATE TABLE table_75294 ( "Game" real, "December" real, "Opponent" text, "Score" text, "Record" text, "Points" real )
after december 29 what is the score?
SELECT "Score" FROM table_75294 WHERE "December" > '29'
wikisql
CREATE TABLE table_68431 ( "Episode" text, "First aired" text, "Entrepreneur(s)" text, "Company or product name" text, "Money requested (\u00a3)" real, "Investing Dragon(s)" text )
How much money did gaming alerts ask for?
SELECT COUNT("Money requested (\u00a3)") FROM table_68431 WHERE "Company or product name" = 'gaming alerts'
wikisql
CREATE TABLE table_2639433_4 ( timeslot VARCHAR, episodes VARCHAR )
If the episode was number 234, what was it's timeslot?
SELECT timeslot FROM table_2639433_4 WHERE episodes = 234
sql_create_context
CREATE TABLE table_name_56 ( car INTEGER, yards INTEGER )
What is the highest Car with more than 155 yards?
SELECT MAX(car) FROM table_name_56 WHERE yards > 155
sql_create_context
CREATE TABLE table_46120 ( "School" text, "Location" text, "Founded" real, "Affiliation" text, "Nickname" text )
What school has a public nickname, founded after 1838 in Harrisonburg, Va?
SELECT "Nickname" FROM table_46120 WHERE "Affiliation" = 'public' AND "Founded" > '1838' AND "Location" = 'harrisonburg, va'
wikisql
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, Deletio...
Top 10 answerers by score for a tag.
SELECT Users.Id AS "user_link", SUM(Posts.Score) AS Score FROM Users JOIN Posts ON Users.Id = Posts.OwnerUserId JOIN PostTags ON PostTags.PostId = Posts.Id GROUP BY Users.Id, DisplayName ORDER BY SUM(Posts.Score) LIMIT 10
sede
CREATE TABLE files ( f_id number, artist_name text, file_size text, duration text, formats text ) CREATE TABLE artist ( artist_name text, country text, gender text, preferred_genre text ) CREATE TABLE song ( song_name text, artist_name text, country text, f_id numbe...
What is the average rating of songs for each language?
SELECT AVG(rating), languages FROM song GROUP BY languages
spider
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
住院天数超过11天的,在医疗机构1966400里总共有多少
SELECT COUNT(hz_info.RYBH) FROM hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_in...
css
CREATE TABLE table_name_31 ( recorded VARCHAR, track VARCHAR, translation VARCHAR )
Which recording has a Track larger than 2, and a Translation of the last meal?
SELECT recorded FROM table_name_31 WHERE track > 2 AND translation = "the last meal"
sql_create_context
CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDa...
Answers in a given period.
SELECT COUNT(*) FROM Posts, Users WHERE Posts.OwnerUserId = Users.Id AND Users.Id = '##UserID##' AND Posts.CreationDate BETWEEN '##StartDate##' AND '##EndDate##'
sede
CREATE TABLE person_info ( RYBH text, XBDM number, XBMC text, XM text, CSRQ time, CSD text, MZDM text, MZMC text, GJDM text, GJMC text, JGDM text, JGMC text, XLDM text, XLMC text, ZYLBDM text, ZYMC text ) CREATE TABLE jyjgzbb ( JYZBLSH text, YLJGD...
患者的门诊诊断为急性支气管炎的触珠蛋白的参考值范围有哪些下限和上限?
SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDSM = '急性支气管炎' AND jyjgzbb.JCZBMC = '触珠蛋白'
css
CREATE TABLE table_22907 ( "Draw" real, "Country" text, "Language" text, "Artist" text, "Song" text, "English translation" text, "Result" text )
If the English translation is hello girl, what was the language?
SELECT "Language" FROM table_22907 WHERE "English translation" = 'Hello girl'
wikisql
CREATE TABLE table_name_71 ( opponent VARCHAR, time VARCHAR )
Which opponent had a time of 0:29?
SELECT opponent FROM table_name_71 WHERE time = "0:29"
sql_create_context
CREATE TABLE aircraft ( Aircraft_ID int(11), Aircraft varchar(50), Description varchar(50), Max_Gross_Weight varchar(50), Total_disk_area varchar(50), Max_disk_Loading varchar(50) ) CREATE TABLE match ( Round real, Location text, Country text, Date text, Fastest_Qualifying t...
Show the names of aircrafts and the number of times it won matches. Visualize by pie chart.
SELECT Aircraft, COUNT(*) FROM aircraft AS T1 JOIN match AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft
nvbench
CREATE TABLE payments ( payment_id number, settlement_id number, payment_method_code text, date_payment_made time, amount_payment number ) CREATE TABLE settlements ( settlement_id number, claim_id number, date_claim_made time, date_claim_settled time, amount_claimed number, ...
Which customer had at least 2 policies but did not file any claims? List the customer details and id.
SELECT T1.customer_details, T1.customer_id FROM customers AS T1 JOIN customer_policies AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 2 EXCEPT SELECT T1.customer_details, T1.customer_id FROM customers AS T1 JOIN customer_policies AS T2 ON T1.customer_id = T2.customer_id JOIN claims ...
spider
CREATE TABLE table_204_506 ( id number, "seasons" number, "team" text, "ch.wins" number, "promotions" number, "relegations" number )
how many teams are listed ?
SELECT COUNT("team") FROM table_204_506
squall
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 ) ...
what is drug route of drug name nitroglycerin sl?
SELECT prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Nitroglycerin SL"
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 patient ( uniquep...
what procedure did patient 008-39015 receive the first time during the last year.
SELECT treatment.treatmentname FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '008-39015')) AND DATETIME(treatment.treatmenttime, 'start of year...
eicu
CREATE TABLE table_name_13 ( label VARCHAR, catalog VARCHAR )
What Label has a Catalog of 486 136-2?
SELECT label FROM table_name_13 WHERE catalog = "486 136-2"
sql_create_context
CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE offering_instructor ( ...
Is there an ORALHEAL 400 -level class that is 9 -credit ?
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE program_course.catego...
advising
CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDispl...
Questions by users with rep>1000.
SELECT Users.Id AS "user_link", Posts.Title, 'http://english.stackexchange.com/questions/' + CAST(Posts.Id AS TEXT) AS Hyperlink, Posts.LastEditDate, Posts.CreationDate, Posts.ClosedDate, Posts.AcceptedAnswerId FROM Users INNER JOIN Posts ON Users.Id = OwnerUserId WHERE Reputation >= 1000 AND Title != '' AND Posts.Crea...
sede
CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE ta ( campus_job_id int,...
For my MDE , which classes count toward it ?
SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE program_course.category LIKE '%MDE%' AND program_course.course_id = course.course_id
advising
CREATE TABLE table_11268 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Date" text )
What field did the Home Team score 5.10 (40)?
SELECT "Venue" FROM table_11268 WHERE "Home team score" = '5.10 (40)'
wikisql
CREATE TABLE table_name_40 ( goals_for VARCHAR, played VARCHAR, draws VARCHAR, losses VARCHAR )
What is the total number of goals when there are 3 draws, more than 18 losses, and played is smaller than 38?
SELECT COUNT(goals_for) FROM table_name_40 WHERE draws = 3 AND losses > 18 AND played < 38
sql_create_context
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...
能告诉我病人55103393所有医疗记录中医疗费总额在6694.41元以上的入院诊断疾病编码和名称吗
SELECT qtb.IN_DIAG_DIS_CD, qtb.IN_DIAG_DIS_NM FROM qtb WHERE qtb.PERSON_ID = '55103393' AND qtb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 6694.41) UNION SELECT gyb.IN_DIAG_DIS_CD, gyb.IN_DIAG_DIS_NM FROM gyb WHERE gyb.PERSON_ID = '55103393' AND gyb.MED_CLINIC_ID IN (SELECT t_kc...
css
CREATE TABLE table_name_94 ( bronze INTEGER, total VARCHAR )
what is the most bronze when the total is 9?
SELECT MAX(bronze) FROM table_name_94 WHERE total = 9
sql_create_context
CREATE TABLE table_name_24 ( date VARCHAR, location_attendance VARCHAR, game VARCHAR )
What date was the location attendance at&t center 18,797, and a game earlier than 57?
SELECT date FROM table_name_24 WHERE location_attendance = "at&t center 18,797" AND game < 57
sql_create_context
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALA...
For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of first_name and employee_id in a bar chart, and I want to list X-axis in ascending order.
SELECT FIRST_NAME, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY FIRST_NAME
nvbench
CREATE TABLE table_name_92 ( drawn INTEGER, against VARCHAR, played VARCHAR )
What is the highest draws when more than 6 are played and the points against are 54?
SELECT MAX(drawn) FROM table_name_92 WHERE against = 54 AND played > 6
sql_create_context
CREATE TABLE table_name_11 ( alliance__association VARCHAR, airline_holding VARCHAR )
For airlines named Aeroflot Group, what is the alliance?
SELECT alliance__association FROM table_name_11 WHERE airline_holding = "aeroflot group"
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
provide me the number of black/haitian patients diagnosed with lower extremity embolism.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "BLACK/HAITIAN" AND diagnoses.short_title = "Lower extremity embolism"
mimicsql_data
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 outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, ...
what are the three most frequently prescribed drugs for patients who have been prescribed phentolamine mesylate also at the same time since 2105?
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'phentolamine mesylate' AND STRFTIME('%y', prescriptions.startdate...
mimic_iii
CREATE TABLE table_name_18 ( evening VARCHAR, sunday VARCHAR, name VARCHAR )
Name the Evening that has a Sunday of no, and a Name of s. vidal/plant express?
SELECT evening FROM table_name_18 WHERE sunday = "no" AND name = "s. vidal/plant express"
sql_create_context
CREATE TABLE table_62457 ( "Name" text, "Pos." text, "Height" text, "Weight" text, "Date of Birth" text, "Club" text )
What is Spandau 04 Player Jens Pohlmann's Pos.?
SELECT "Pos." FROM table_62457 WHERE "Club" = 'spandau 04' AND "Name" = 'jens pohlmann'
wikisql
CREATE TABLE table_name_79 ( europe VARCHAR, title VARCHAR )
Tell me the Europe for z.h.p. unlosing ranger vs darkdeath evilman
SELECT europe FROM table_name_79 WHERE title = "z.h.p. unlosing ranger vs darkdeath evilman"
sql_create_context
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 ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
How many female patients are aged below 43 years?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.age < "43"
mimicsql_data
CREATE TABLE table_name_85 ( position VARCHAR, competition VARCHAR )
What Position has a Super League 1 Competition?
SELECT position FROM table_name_85 WHERE competition = "super league 1"
sql_create_context
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( ...
what is primary disease and admission time of subject name michael tyndall?
SELECT demographic.diagnosis, demographic.admittime FROM demographic WHERE demographic.name = "Michael Tyndall"
mimicsql_data
CREATE TABLE table_name_64 ( high_assists VARCHAR, high_points VARCHAR )
What is High Assists, when High Points is 'Tayshaun Prince (23)'?
SELECT high_assists FROM table_name_64 WHERE high_points = "tayshaun prince (23)"
sql_create_context
CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text...
Scores of posts by a specific user.
SELECT Id AS "post_link", Score FROM Posts WHERE OwnerUserId = '##id?210401##' ORDER BY Id
sede
CREATE TABLE table_36673 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
Which Rank has a Bronze larger than 1, and a Silver larger than 0, and a Nation of norway (host nation), and a Total larger than 16?
SELECT COUNT("Rank") FROM table_36673 WHERE "Bronze" > '1' AND "Silver" > '0' AND "Nation" = 'norway (host nation)' AND "Total" > '16'
wikisql
CREATE TABLE table_name_16 ( surface VARCHAR, score VARCHAR )
What is the Surface of the court in the match with a Score of 4 6, 6 4, 3 6?
SELECT surface FROM table_name_16 WHERE score = "4–6, 6–4, 3–6"
sql_create_context
CREATE TABLE table_51607 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
If the home team was footscray which venue did they play it?
SELECT "Venue" FROM table_51607 WHERE "Home team" = 'footscray'
wikisql
CREATE TABLE staff ( staff_id number, gender text, first_name text, last_name text, email_address text, phone_number text ) CREATE TABLE customers ( customer_id number, customer_type_code text, address_line_1 text, address_line_2 text, town_city text, state text, ema...
Count the number of different complaint type codes.
SELECT COUNT(DISTINCT complaint_type_code) FROM complaints
spider
CREATE TABLE table_name_44 ( lane INTEGER, mark VARCHAR, react VARCHAR )
What is the highest Lane, when Mark is 46.65, and when React is greater than 0.251?
SELECT MAX(lane) FROM table_name_44 WHERE mark = "46.65" AND react > 0.251
sql_create_context
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...
A scatter chart shows the correlation between Team_ID and ACC_Percent .
SELECT Team_ID, ACC_Percent FROM basketball_match
nvbench
CREATE TABLE mzjzjlb_jybgb ( YLJGDM_MZJZJLB text, BGDH number, YLJGDM number ) 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 n...
在11年3月24日到16年7月23日这段时间,患者陶展鹏一共有多少检验报告单,把这些检验报告单的审核日期列出来
SELECT jybgb.SHSJ FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN mzjzjlb_jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND mzjzjl...
css
CREATE TABLE table_42912 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text )
In which week was attendance at 50,814?
SELECT COUNT("Week") FROM table_42912 WHERE "Attendance" = '50,814'
wikisql
CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, round_trip_required varchar ) CREATE TABLE food_service ( meal_code text, meal_number int, ...
please list all the flights from BOSTON to DENVER which serve meals
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, food_service WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code AND food_ser...
atis
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAno...
Top 100 most economical posts (site-wide).
SELECT Id AS "post_link", LENGTH(Body) AS Length, Score, (Score / CAST(NULLIF(LENGTH(Body), 0) AS FLOAT(9, 2))) AS Economy FROM Posts AS p ORDER BY Economy DESC LIMIT 100
sede
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text te...
Top Answerers for Tag: score = sum of answer scores/viewCount.
SELECT P.OwnerUserId AS "user_link", SUM(1000 * P.Score / Q.ViewCount) AS TotalScore, SUM(P.Score) AS TotalVotes, SUM(Q.ViewCount) AS TotalViews, COUNT(*) AS "#Answers" FROM Posts AS P INNER JOIN Posts AS Q ON Q.Id = P.ParentId INNER JOIN PostTags AS PT ON PT.PostId = P.ParentId INNER JOIN Tags AS T ON T.Id = PT.TagId ...
sede
CREATE TABLE gyb ( 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...
看一下病患鲁同济的医疗记录中哪几次开的药品金额大于8376.61元?列出医疗就诊编码
SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_NM = '鲁同济' AND qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 8376.61) UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_NM = '鲁同济' AND gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 8376....
css
CREATE TABLE table_203_663 ( id number, "country" text, "zone" text, "national federation" text, "#gm" number, "#fide" number, "national championship" text )
which country has the most fide rated players after germany ?
SELECT "country" FROM table_203_663 WHERE "country" <> 'germany' ORDER BY "#fide" DESC LIMIT 1
squall
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
what is the number of patients whose ethnicity is black/cape verdean and diagnoses long title is unspecified problem with head, neck, or trunk?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND diagnoses.long_title = "Unspecified problem with head, neck, or trunk"
mimicsql_data
CREATE TABLE table_20213 ( "#" real, "Season" real, "Bowl game" text, "Result" text, "Opponent" text, "Stadium" text, "Location" text, "Attendance" text )
How many values for attendance correspond to the 1986 Peach Bowl?
SELECT COUNT("Attendance") FROM table_20213 WHERE "Bowl game" = '1986 Peach Bowl'
wikisql
CREATE TABLE characteristics ( characteristic_id number, characteristic_type_code text, characteristic_data_type text, characteristic_name text, other_characteristic_details text ) CREATE TABLE product_characteristics ( product_id number, characteristic_id number, product_characteristic...
Return the names and typical buying prices for all products.
SELECT product_name, typical_buying_price FROM products
spider
CREATE TABLE table_79797 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real )
Name the tournament for top-5 more thn 1 and top-25 of 13 with wins of 3
SELECT "Tournament" FROM table_79797 WHERE "Top-5" > '1' AND "Top-25" = '13' AND "Wins" = '3'
wikisql
CREATE TABLE table_287 ( "Delegate" text, "Interview" text, "Swimsuit" text, "Evening Gown" text, "Average" text )
Name the interview for peru delegate
SELECT "Interview" FROM table_287 WHERE "Delegate" = 'Peru'
wikisql
CREATE TABLE customer_addresses ( address_id VARCHAR ) CREATE TABLE addresses ( state_province_county VARCHAR, address_id VARCHAR )
List the state names and the number of customers living in each state.
SELECT t2.state_province_county, COUNT(*) FROM customer_addresses AS t1 JOIN addresses AS t2 ON t1.address_id = t2.address_id GROUP BY t2.state_province_county
sql_create_context