context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE Po...
Top C Devs in Greece.
SELECT u.Id AS id, COUNT(a.Id) AS answerCount FROM Posts AS a JOIN Users AS u ON u.Id = a.OwnerUserId JOIN Posts AS q ON a.ParentId = q.Id WHERE q.Tags LIKE '%C++%' AND u.Location LIKE '%Greece%' GROUP BY u.Id
sede
CREATE TABLE table_name_47 ( loss VARCHAR, opponent VARCHAR, date VARCHAR )
Which loss has an Opponent of @ angels, and a Date of august 1?
SELECT loss FROM table_name_47 WHERE opponent = "@ angels" AND date = "august 1"
sql_create_context
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time,...
count the number of times in which patient 18866 had had a pe 24 fs po intake today.
SELECT COUNT(*) 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 = 18866)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'pe 24 fs po'...
mimic_iii
CREATE TABLE Services ( Service_ID INTEGER, Service_Type_Code CHAR(15), Workshop_Group_ID INTEGER, Product_Description VARCHAR(255), Product_Name VARCHAR(255), Product_Price DECIMAL(20,4), Other_Product_Service_Details VARCHAR(255) ) CREATE TABLE Drama_Workshop_Groups ( Workshop_Group_I...
Give me the number of the descriptions of the service types that cost more than 100.
SELECT Service_Type_Description, COUNT(Service_Type_Description) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100 GROUP BY Service_Type_Description
nvbench
CREATE TABLE table_name_18 ( opponent VARCHAR, loss VARCHAR )
Which Opponent has a Loss of weaver (9-9)?
SELECT opponent FROM table_name_18 WHERE loss = "weaver (9-9)"
sql_create_context
CREATE TABLE table_name_86 ( track_s_ VARCHAR, date VARCHAR )
Which Track(s) is on 18 november 1985?
SELECT track_s_ FROM table_name_86 WHERE date = "18 november 1985"
sql_create_context
CREATE TABLE table_name_48 ( boarded VARCHAR, class VARCHAR )
Who boarded first class?
SELECT boarded FROM table_name_48 WHERE class = "first"
sql_create_context
CREATE TABLE table_62265 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
What is Score, when Home is 'Montreal Canadiens', and when Date is 'May 16'?
SELECT "Score" FROM table_62265 WHERE "Home" = 'montreal canadiens' AND "Date" = 'may 16'
wikisql
CREATE TABLE products ( code number, name text, price number, manufacturer number ) CREATE TABLE manufacturers ( code number, name text, headquarter text, founder text, revenue number )
How many companies were created by Andy?
SELECT COUNT(*) FROM manufacturers WHERE founder = 'Andy'
spider
CREATE TABLE table_name_4 ( date VARCHAR, round VARCHAR, home_team VARCHAR )
On what date was the 4th round, with home team Itabuna, played?
SELECT date FROM table_name_4 WHERE round = "4th" AND home_team = "itabuna"
sql_create_context
CREATE TABLE table_name_73 ( prefix VARCHAR, chemical_class VARCHAR )
What prefix has chemical class Iodoalkane?
SELECT prefix FROM table_name_73 WHERE chemical_class = "iodoalkane"
sql_create_context
CREATE TABLE table_2980024_1 ( total_apps VARCHAR, league_goals VARCHAR )
What were the total apps for Dunne in season where he had 0 league goals?
SELECT total_apps FROM table_2980024_1 WHERE league_goals = 0
sql_create_context
CREATE TABLE table_80218 ( "Rank" real, "Heat" real, "Lane" real, "Name" text, "Nationality" text, "Time" text )
Name the average rank with larger than 3 and heat more than 5
SELECT AVG("Rank") FROM table_80218 WHERE "Lane" > '3' AND "Heat" > '5'
wikisql
CREATE TABLE table_name_60 ( winner VARCHAR, race_name VARCHAR )
Who was the winner of the tre valli varesine race?
SELECT winner FROM table_name_60 WHERE race_name = "tre valli varesine"
sql_create_context
CREATE TABLE table_49437 ( "Borough" text, "1970" real, "1980" real, "1990" real, "2000" real, "2006" real )
What was the percentage in 2006 that had less than 9% in 1970?
SELECT AVG("2006") FROM table_49437 WHERE "1970" < '9'
wikisql
CREATE TABLE table_name_59 ( date VARCHAR, opponent VARCHAR )
When did alfonse d'amore compete?
SELECT date FROM table_name_59 WHERE opponent = "alfonse d'amore"
sql_create_context
CREATE TABLE table_51250 ( "Year" real, "Date" text, "Winner" text, "Result" text, "Loser" text, "Attendance" real, "Location" text )
what date saw the chicago bears lose in green bay earlier than 1931?
SELECT "Date" FROM table_51250 WHERE "Loser" = 'chicago bears' AND "Location" = 'green bay' AND "Year" < '1931'
wikisql
CREATE TABLE table_53807 ( "Track" real, "Title" text, "Translation" text, "Composer" text, "Recorded" text )
Which track 7 title was recorded in 1959-09-15?
SELECT "Title" FROM table_53807 WHERE "Recorded" = '1959-09-15' AND "Track" = '7'
wikisql
CREATE TABLE table_48680 ( "Date" text, "Time" text, "Opponent" text, "Score" text, "Site" text, "City" text )
What is the time in Baltimore?
SELECT "Time" FROM table_48680 WHERE "City" = 'baltimore'
wikisql
CREATE TABLE table_65865 ( "Rank" real, "Player" text, "County" text, "Tally" text, "Total" real, "Opposition" text )
What is the average rank of the match where offaly was the opposition and the total was greater than 9?
SELECT AVG("Rank") FROM table_65865 WHERE "Opposition" = 'offaly' AND "Total" > '9'
wikisql
CREATE TABLE table_name_8 ( school_club_team VARCHAR, acquisition_via VARCHAR, name VARCHAR )
Which School/ Club Team acquired Jondan Salvador via trade?
SELECT school_club_team FROM table_name_8 WHERE acquisition_via = "trade" AND name = "jondan salvador"
sql_create_context
CREATE TABLE table_29458735_5 ( colonel VARCHAR, county VARCHAR )
in how many of the arkansas colomel the county was pope
SELECT COUNT(colonel) FROM table_29458735_5 WHERE county = "Pope"
sql_create_context
CREATE TABLE table_33827 ( "Series Ep." text, "Episode" real, "Segment A" text, "Segment B" text, "Segment C" text, "Segment D" text )
Which items in segment C is episode 160?
SELECT "Segment C" FROM table_33827 WHERE "Episode" = '160'
wikisql
CREATE TABLE table_46847 ( "Year" real, "Album" text, "Vocals" text, "Bass" text, "Drums" text, "Label" text )
Who played the bass for the Against the Grain album after 1982?
SELECT "Bass" FROM table_46847 WHERE "Year" > '1982' AND "Album" = 'against the grain'
wikisql
CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, departure_time int, departure_airline text, departure_flight_number int, stop_time int ) CREATE TABLE class_of_ser...
in PITTSBURGH i'd like to RENTAL CAR
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'PITTSBURGH' AND ground_service.city_code = city.city_code AND ground_service.transport_type = 'RENTAL CAR'
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, and I want to display in desc by the Y-axis please.
SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType ORDER BY AVG(basePrice) DESC
nvbench
CREATE TABLE table_name_81 ( location VARCHAR, year VARCHAR, killed VARCHAR )
What location has a killed of 100.9, and a year later than 1993?
SELECT location FROM table_name_81 WHERE year > 1993 AND killed = "100.9"
sql_create_context
CREATE TABLE qtb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
列出在医院2959284中根据入院诊断疾病名称不同疾病的平均患者年龄都是多少呢?
SELECT qtb.IN_DIAG_DIS_NM, AVG(qtb.PERSON_AGE) FROM qtb WHERE qtb.MED_SER_ORG_NO = '2959284' GROUP BY qtb.IN_DIAG_DIS_NM UNION SELECT gyb.IN_DIAG_DIS_NM, AVG(gyb.PERSON_AGE) FROM gyb WHERE gyb.MED_SER_ORG_NO = '2959284' GROUP BY gyb.IN_DIAG_DIS_NM UNION SELECT zyb.IN_DIAG_DIS_NM, AVG(zyb.PERSON_AGE) FROM zyb WHERE zyb....
css
CREATE TABLE table_name_62 ( draw INTEGER, place VARCHAR )
What is the greatest draw that has 4th for place?
SELECT MAX(draw) FROM table_name_62 WHERE place = "4th"
sql_create_context
CREATE TABLE table_train_97 ( "id" int, "pulmonary_disease" bool, "systolic_blood_pressure_sbp" int, "diabetic" string, "psychiatric_disease" bool, "hematologic_disease" bool, "diastolic_blood_pressure_dbp" int, "lung_disease" bool, "NOUSE" float )
pulmonary or lung disorders
SELECT * FROM table_train_97 WHERE pulmonary_disease = 1 OR lung_disease = 1
criteria2sql
CREATE TABLE gwyjzb ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
从12年9月8日到13年11月18日,医院9519842的门诊医疗记录的数目是多少?
SELECT COUNT(*) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '9519842' AND gwyjzb.IN_HOSP_DATE BETWEEN '2012-09-08' AND '2013-11-18' AND gwyjzb.CLINIC_TYPE = '门诊' UNION SELECT COUNT(*) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '9519842' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2012-09-08' AND '2013-11-18' AND fgwyjzb.CLINIC_TY...
css
CREATE TABLE table_76675 ( "Number" text, "D\u00e9partment (or collectivity)" text, "Pr\u00e9sident" text, "Party" text, "Since" real )
Which department has Guy-Dominique Kennel as president since 2008?
SELECT "D\u00e9partment (or collectivity)" FROM table_76675 WHERE "Since" = '2008' AND "Pr\u00e9sident" = 'guy-dominique kennel'
wikisql
CREATE TABLE table_name_8 ( game VARCHAR, date VARCHAR )
Which game took place on April 22?
SELECT game FROM table_name_8 WHERE date = "april 22"
sql_create_context
CREATE TABLE table_67542 ( "Member countries" text, "Population" text, "Area (km\u00b2)" text, "GDP (billion US$)" text, "GDP per capita (US$)" text )
What is the per-capita GDP for the country with an overall GDP of 156.640?
SELECT "GDP per capita (US$)" FROM table_67542 WHERE "GDP (billion US$)" = '156.640'
wikisql
CREATE TABLE table_43377 ( "Date" text, "Score" text, "Set 1" text, "Set 2" text, "Set 3" text, "Set 4" text, "Set 5" text, "Total" text )
What is the Total when the Set 3 was 25-15?
SELECT "Total" FROM table_43377 WHERE "Set 3" = '25-15'
wikisql
CREATE TABLE DEPARTMENT ( DEPT_CODE varchar(10), DEPT_NAME varchar(30), SCHOOL_CODE varchar(8), EMP_NUM int, DEPT_ADDRESS varchar(20), DEPT_EXTENSION varchar(4) ) CREATE TABLE COURSE ( CRS_CODE varchar(10), DEPT_CODE varchar(10), CRS_DESCRIPTION varchar(35), CRS_CREDIT float(8) ...
Bar chart of sum crs credit from each dept code
SELECT DEPT_CODE, SUM(CRS_CREDIT) FROM COURSE GROUP BY DEPT_CODE
nvbench
CREATE TABLE table_66237 ( "State (class)" text, "Vacator" text, "Reason for change" text, "Successor" text, "Date of successor's formal installation" text )
When is it that successor's formal installation has a Vacator of ross bass (d)?
SELECT "Date of successor's formal installation" FROM table_66237 WHERE "Vacator" = 'ross bass (d)'
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( ...
How many patients admitted before the year 2131 had procedure icd9 code 3895?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2131" AND procedures.icd9_code = "3895"
mimicsql_data
CREATE TABLE tryout ( pid number, cname text, ppos text, decision text ) CREATE TABLE player ( pid number, pname text, ycard text, hs number ) CREATE TABLE college ( cname text, state text, enr number )
What are the names of the states that have some college students playing in the positions of goalie and mid-field?
SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cname = T2.cname WHERE T2.ppos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cname = T2.cname WHERE T2.ppos = 'mid'
spider
CREATE TABLE customers ( customer_id number, payment_method text, customer_name text, date_became_customer time, other_customer_details text ) CREATE TABLE products ( product_id number, product_details text ) CREATE TABLE customer_orders ( order_id number, customer_id number, o...
What is the name of customers who do not use Cash as payment method.
SELECT customer_name FROM customers WHERE payment_method <> 'Cash'
spider
CREATE TABLE table_31463 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
how many high assits have a date of february 5?
SELECT "High assists" FROM table_31463 WHERE "Date" = 'February 5'
wikisql
CREATE TABLE table_54955 ( "Rank" real, "Player" text, "Country" text, "Earnings( $ )" real, "Wins" real )
Which player has the lowest earnings and has at least 4 wins and is ranked higher than 4?
SELECT MIN("Earnings( $ )") FROM table_54955 WHERE "Wins" = '4' AND "Rank" > '4'
wikisql
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
列出名称不包含科的科室开出的所有检验报告单在医疗就诊67577996810中的编号都是啥?
SELECT jybgb.BGDH FROM jybgb WHERE jybgb.JZLSH = '67577996810' AND NOT jybgb.KSMC LIKE '%科%'
css
CREATE TABLE Guests ( guest_id INTEGER, gender_code CHAR(1), guest_first_name VARCHAR(80), guest_last_name VARCHAR(80), date_of_birth DATETIME ) CREATE TABLE View_Unit_Status ( apt_id INTEGER, apt_booking_id INTEGER, status_date DATETIME, available_yn BIT ) CREATE TABLE Apartments ...
Show the booking status code and the corresponding number of bookings in a bar chart.
SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code
nvbench
CREATE TABLE table_16313 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text )
What is the pick # for the position de?
SELECT "Pick #" FROM table_16313 WHERE "Position" = 'DE'
wikisql
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wa...
what number of patients have been diagnosed with seizures - from ischemia/infarction during the same hospital visit after having received a anticonvulsant - valproate procedure the last year?
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'anticonvulsant - valproate' AND DATETIME(treatment.treatmenttime, 'start ...
eicu
CREATE TABLE table_name_90 ( yards VARCHAR, in_20 VARCHAR )
What number of Yards has 32 as an In 20?
SELECT COUNT(yards) FROM table_name_90 WHERE in_20 = 32
sql_create_context
CREATE TABLE table_64476 ( "Date" real, "Doubles, I Class" real, "Doubles, II Class" real, "Greater Doubles" real, "Doubles" real, "Semidoubles" real, "Total" real )
How much Total has Semidoubles smaller than 78, and Doubles, II Class smaller than 17?
SELECT COUNT("Total") FROM table_64476 WHERE "Semidoubles" < '78' AND "Doubles, II Class" < '17'
wikisql
CREATE TABLE table_48796 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text )
What was the result of the game that had 20,627 fans in attendance?
SELECT "Result" FROM table_48796 WHERE "Attendance" = '20,627'
wikisql
CREATE TABLE table_25938117_1 ( tournament VARCHAR, location VARCHAR )
Name the tournament for dominican republic
SELECT tournament FROM table_25938117_1 WHERE location = "Dominican Republic"
sql_create_context
CREATE TABLE files ( formats VARCHAR )
What is the most popular file format?
SELECT formats FROM files GROUP BY formats ORDER BY COUNT(*) DESC LIMIT 1
sql_create_context
CREATE TABLE table_8088 ( "Season" text, "President" text, "General Sec" text, "Treasurer" text, "Fixtures Sec" text, "Social Sec Bradford" text, "Social Sec Leeds" text, "Media Officer" text )
Name the Social Sec Leeds has Fixtures Sec of n/a, and a General Sec of n/a, and the Season of 2005 2006?
SELECT "Social Sec Leeds" FROM table_8088 WHERE "Fixtures Sec" = 'n/a' AND "General Sec" = 'n/a' AND "Season" = '2005–2006'
wikisql
CREATE TABLE table_45769 ( "Rank" real, "Name" text, "Country" text, "Wins" real, "Years" text )
Which Years have a Rank larger than 2, and Wins of 2, and a Country of france?
SELECT "Years" FROM table_45769 WHERE "Rank" > '2' AND "Wins" = '2' AND "Country" = 'france'
wikisql
CREATE TABLE table_60427 ( "map#" real, "County" text, "Capital" text, "Population (2008)" real, "Area" text, "Created" real )
What is the earliest created year when the map# was 10?
SELECT MIN("Created") FROM table_60427 WHERE "map#" = '10'
wikisql
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE Users ( Id number, Reputation number, CreationD...
Number of questions closed by close vote count.. Sceptics questions closed, by number of close votes. Useful to identify moderator-closed questions.
SELECT 'close_votes', COUNT(*) FROM (SELECT COUNT(*) AS "close_votes" FROM Posts INNER JOIN Votes ON Posts.Id = Votes.PostId WHERE Votes.VoteTypeId = 6 AND NOT Posts.ClosedDate IS NULL GROUP BY Posts.Id) AS X GROUP BY 'close_votes'
sede
CREATE TABLE table_20465 ( "Rank by average" real, "Place" text, "Couple" text, "Perfect 40s" real, "Total" real, "Number of dances" real, "Season" real, "Average" text )
What is the minimum number of perfect 40s?
SELECT MIN("Perfect 40s") FROM table_20465
wikisql
CREATE TABLE vocals ( songid number, bandmate number, type text ) CREATE TABLE instruments ( songid number, bandmateid number, instrument text ) CREATE TABLE band ( id number, firstname text, lastname text ) CREATE TABLE performance ( songid number, bandmate number, st...
What are the different stage positions for all musicians whose first name is 'Solveig'?
SELECT DISTINCT T1.stageposition FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = "Solveig"
spider
CREATE TABLE table_37130 ( "Driver" text, "Season" text, "Wins" real, "Entries" text, "Percentage" text )
What is the fewest number of wins in the chart for Ayrton Senna?
SELECT MIN("Wins") FROM table_37130 WHERE "Driver" = 'ayrton senna'
wikisql
CREATE TABLE table_72795 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text )
What position is Justin Shaw in?
SELECT "Position" FROM table_72795 WHERE "Player" = 'Justin Shaw'
wikisql
CREATE TABLE table_10845 ( "Tournament" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text )
What is the 2010 for the grand slam tournaments of 2007?
SELECT "2010" FROM table_10845 WHERE "2007" = 'grand slam tournaments'
wikisql
CREATE TABLE Events ( Event_ID INTEGER, Service_ID INTEGER, Event_Details VARCHAR(255) ) CREATE TABLE Services ( Service_ID INTEGER, Service_Type_Code CHAR(15) ) CREATE TABLE Participants ( Participant_ID INTEGER, Participant_Type_Code CHAR(15), Participant_Details VARCHAR(255) ) CREA...
Give me a bar chart to show the number of event details of events that have more than one participant, and list from high to low by the total number.
SELECT Event_Details, COUNT(Event_Details) FROM Events AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID = T2.Event_ID GROUP BY Event_Details ORDER BY COUNT(Event_Details) DESC
nvbench
CREATE TABLE table_203_2 ( id number, "name" text, "mineral" text, "opened" text, "closed" text, "years connected" text, "notes" text )
how many quarries was slate mined at ?
SELECT COUNT(*) FROM table_203_2 WHERE "mineral" = 'slate'
squall
CREATE TABLE table_63111 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Record" text )
What was the final score of Game #4?
SELECT "Score" FROM table_63111 WHERE "Game" = '4'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE cost ( costid number, ...
in the first hospital visit, patient 006-193056 has been allergic to any substance?
SELECT COUNT(*) > 0 FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-193056' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospi...
eicu
CREATE TABLE table_name_6 ( year INTEGER, position VARCHAR )
What was the earliest year that T rlea took 7th place?
SELECT MIN(year) FROM table_name_6 WHERE position = "7th"
sql_create_context
CREATE TABLE table_name_96 ( laps INTEGER, grid VARCHAR, time_retired VARCHAR, driver VARCHAR )
When the driver mike hailwood has a grid greater than 12 and a Time/Retired of + 2 laps, what is the average number of laps?
SELECT AVG(laps) FROM table_name_96 WHERE time_retired = "+ 2 laps" AND driver = "mike hailwood" AND grid > 12
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, ...
秦霞雰这个患者在02年6月24日到15年12月19期间买了多少次西药
SELECT COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '秦霞雰' AND t_kc22.STA_DATE BETWEEN '2002-06-24' AND '2015-12-19' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE fgwyjz...
css
CREATE TABLE table_dev_37 ( "id" int, "gender" string, "hemoglobin_a1c_hba1c" float, "diabetes_mellitus" bool, "dysglycemia" bool, "creatinine_clearance_cl" float, "estimated_glomerular_filtration_rate_egfr" int, "fasting_plasma_glucose" int, "serum_creatinine" float, "fasting_gl...
egfr < 60 ml / min / 1.73 m2, or serum creatinine >= 1.4 mg / dl for male and >= 1.3 mg / dl for female
SELECT * FROM table_dev_37 WHERE estimated_glomerular_filtration_rate_egfr < 60 OR (serum_creatinine >= 1.4 AND gender = 'male') OR (serum_creatinine >= 1.3 AND gender = 'female')
criteria2sql
CREATE TABLE table_38216 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
Which competition was in Dubai?
SELECT "Competition" FROM table_38216 WHERE "Venue" = 'dubai'
wikisql
CREATE TABLE table_43732 ( "Internet Plan" text, "Downstream" text, "Upstream" text, "Bandwidth Included" text, "Price" text )
What is the name of the plan that has a downstream rate of 4,096 kbit?
SELECT "Internet Plan" FROM table_43732 WHERE "Downstream" = '4,096 kbit'
wikisql
CREATE TABLE table_16928 ( "Governorate" text, "Name in Russian" text, "Name in Polish" text, "Seat" text, "Area, in thousands of km 2" real, "Population, in thousands,( 1905 )" real )
governs an area with what area (in thousand km 2)?
SELECT "Area, in thousands of km 2" FROM table_16928 WHERE "Name in Russian" = 'Плоцкая губерния'
wikisql
CREATE TABLE city ( City_ID int, Official_Name text, Status text, Area_km_2 real, Population real, Census_Ranking text ) CREATE TABLE farm ( Farm_ID int, Year int, Total_Horses real, Working_Horses real, Total_Cattle real, Oxen real, Bulls real, Cows real, Pi...
Show the number of competitions held in each city with a bar chart.
SELECT Official_Name, COUNT(Official_Name) FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY Official_Name
nvbench
CREATE TABLE table_206217_2 ( periselene__km_ VARCHAR, period__h_ VARCHAR )
What is every value for periselene if period is 4.947432?
SELECT periselene__km_ FROM table_206217_2 WHERE period__h_ = "4.947432"
sql_create_context
CREATE TABLE table_43914 ( "Round" real, "Pick" real, "Overall" real, "Name" text, "Position" text, "College" text )
Which college had a pick in a round under 7, with a pick number 13 and overall was under 186?
SELECT "College" FROM table_43914 WHERE "Round" < '7' AND "Overall" < '186' AND "Pick" = '13'
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 who was hired before 2002-06-21, give me the comparison about the amount of job_id over the job_id , and group by attribute job_id by a bar chart, sort by the X in desc.
SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY JOB_ID DESC
nvbench
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...
how much is the changing of bedside glucose of patient 010-29520 last measured on the last hospital visit compared to the first value measured on the last hospital visit?
SELECT (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-29520' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospi...
eicu
CREATE TABLE table_59792 ( "Year" real, "Country/Territory" text, "Miss International" text, "National title" text, "Location" text )
What's the earliest year the philippines won?
SELECT MIN("Year") FROM table_59792 WHERE "Country/Territory" = 'philippines'
wikisql
CREATE TABLE table_name_68 ( recnet VARCHAR, city_of_license VARCHAR )
what is the recnet when the city of license is peterborough?
SELECT recnet FROM table_name_68 WHERE city_of_license = "peterborough"
sql_create_context
CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journalid int ) CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE field ( fieldid int...
What papers has srinivasan iyer written ?
SELECT DISTINCT writes.paperid FROM author, writes WHERE author.authorname = 'srinivasan iyer' AND writes.authorid = author.authorid
scholar
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE compartment_cla...
wednesday morning flights between BALTIMORE and NEWARK NEW JERSEY
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, state WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'NEWARK' AND date_day.day_number = 23 AND date_day.month_number = ...
atis
CREATE TABLE table_name_68 ( pick VARCHAR, school VARCHAR )
What is the total pick number of Virginia Tech?
SELECT COUNT(pick) FROM table_name_68 WHERE school = "virginia tech"
sql_create_context
CREATE TABLE table_24616 ( "Original number" text, "UIC number" text, "Name" text, "Constructer" text, "constructor number" real, "Year" real, "Withdrawn" text, "Kilometers worked" real )
When 9/07/1999 is the date of withdrawn what is the original number?
SELECT "Original number" FROM table_24616 WHERE "Withdrawn" = '9/07/1999'
wikisql
CREATE TABLE table_123462_2 ( _number_of_seats_won VARCHAR, _number_of_total_votes VARCHAR )
How many times was the # of total votes 2582322?
SELECT COUNT(_number_of_seats_won) FROM table_123462_2 WHERE _number_of_total_votes = 2582322
sql_create_context
CREATE TABLE table_name_62 ( time VARCHAR, group VARCHAR, race VARCHAR )
What was the time for the G2 group at the Hobartville Stakes?
SELECT time FROM table_name_62 WHERE group = "g2" AND race = "hobartville stakes"
sql_create_context
CREATE TABLE table_58298 ( "Team" text, "Make" text, "Driver" text, "Sponsor" text, "Car Owner" text )
Who drives for the sponsor w.h. bolin?
SELECT "Driver" FROM table_58298 WHERE "Sponsor" = 'w.h. bolin'
wikisql
CREATE TABLE table_name_66 ( date VARCHAR, winner VARCHAR )
What is Date, when Winner is 'Murilo Figueiredo'?
SELECT date FROM table_name_66 WHERE winner = "murilo figueiredo"
sql_create_context
CREATE TABLE table_25207 ( "Year" text, "Date" text, "Driver" text, "Team" text, "Manufacturer" text, "Laps" text, "Miles (km)" text, "Race time" text, "Average speed (mph)" text, "Report" text )
Name the manufacturer for cale yarborough for 1984
SELECT "Manufacturer" FROM table_25207 WHERE "Driver" = 'Cale Yarborough' AND "Year" = '1984'
wikisql
CREATE TABLE table_13982 ( "Draw" real, "Language" text, "Artist" text, "Song" text, "English translation" text, "Place" real, "Points" real )
Which Place has an English translation of lullaby for my beloved?
SELECT MAX("Place") FROM table_13982 WHERE "English translation" = 'lullaby for my beloved'
wikisql
CREATE TABLE table_name_4 ( venue VARCHAR, home_team VARCHAR )
What venue features collingwood as the home side?
SELECT venue FROM table_name_4 WHERE home_team = "collingwood"
sql_create_context
CREATE TABLE table_31090 ( "No." real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (million)" text )
Name the least number for production code 3x6266
SELECT MIN("No.") FROM table_31090 WHERE "Production code" = '3X6266'
wikisql
CREATE TABLE table_204_538 ( id number, "pos." number, "driver" text, "co-driver" text, "car" text, "time" text )
who was the co driver of the first place driver ?
SELECT "co-driver" FROM table_204_538 WHERE "pos." = 1
squall
CREATE TABLE table_24575253_4 ( division_five VARCHAR, division_one VARCHAR )
When westcott is in division one how many leagues are in division 5?
SELECT COUNT(division_five) FROM table_24575253_4 WHERE division_one = "Westcott"
sql_create_context
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, ...
until 5 months ago, how much terazosin has been prescribed to patient 64538 in total?
SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 64538) AND prescriptions.drug = 'terazosin' AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-5 month')
mimic_iii
CREATE TABLE table_name_76 ( d3_compatible VARCHAR, availability VARCHAR, name VARCHAR )
Tell me the D3 compatible for availability of yes for wode jukebox
SELECT d3_compatible FROM table_name_76 WHERE availability = "yes" AND name = "wode jukebox"
sql_create_context
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time )...
how many days has passed since the last time patient 032-9230 got a procedure on this hospital encounter?
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', treatment.treatmenttime)) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '032-9230' ...
eicu
CREATE TABLE table_75524 ( "Round" real, "Pick" real, "Player" text, "Position" text, "School/Club Team" text )
What is the highest round number for the player who came from team Missouri?
SELECT MAX("Round") FROM table_75524 WHERE "School/Club Team" = 'missouri'
wikisql
CREATE TABLE table_name_72 ( last VARCHAR, total VARCHAR, first VARCHAR )
What is the last when the first was January 2001 and more than 26 total?
SELECT last FROM table_name_72 WHERE total > 26 AND first = "january 2001"
sql_create_context
CREATE TABLE table_29547777_1 ( original_performer VARCHAR, episode VARCHAR )
Who is the original performer when the episode is casting?
SELECT original_performer FROM table_29547777_1 WHERE episode = "Casting"
sql_create_context
CREATE TABLE table_33313 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Who was the home team that scored 10.12 (72)?
SELECT "Home team" FROM table_33313 WHERE "Home team score" = '10.12 (72)'
wikisql
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime ...
what were the total amount of d20w intake that patient 30171 had received on 05/30/2101?
SELECT SUM(inputevents_cv.amount) 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 = 30171)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab...
mimic_iii