instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT jyjgzbb.JCFF FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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_MZJ...
css
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code tex...
SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-10559')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutpu...
eicu
CREATE TABLE table_23630 ( "Candidate" text, "Office" text, "Home state" text, "Popular vote" real, "States \u2013 first place" real, "States \u2013 second place" real, "States \u2013 third place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT COUNT("Popular vote") FROM table_23630 WHERE "Candidate" = 'Rick Perry'
wikisql
CREATE TABLE table_name_67 ( laps INTEGER, time_retired VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- with a Time/Retired of +47.376 what is the lap sum?
SELECT SUM(laps) FROM table_name_67 WHERE time_retired = "+47.376"
sql_create_context
CREATE TABLE player ( Player_ID int, name text, Position text, Club_ID int, Apps real, Tries real, Goals text, Points real ) CREATE TABLE club_rank ( Rank real, Club_ID int, Gold real, Silver real, Bronze real, Total real ) CREATE TABLE competition_result ( ...
SELECT Country, COUNT(Country) FROM competition GROUP BY Country ORDER BY COUNT(Country)
nvbench
CREATE TABLE table_20221 ( "Date" text, "Cover model" text, "Centerfold model" text, "Interview subject" text, "20 Questions" text, "Pictorials" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHO WAS THE CENTERFOLD MODEL IN THE ISSUE WHERE OSCAR...
SELECT "Centerfold model" FROM table_20221 WHERE "20 Questions" = 'Oscar de la Hoya'
wikisql
CREATE TABLE table_6432 ( "Year" real, "Pick" real, "Player" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which position has a pick greater than 28?
SELECT "Position" FROM table_6432 WHERE "Pick" > '28'
wikisql
CREATE TABLE table_27704187_10 ( high_assists VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who had the high assists on March 26?
SELECT high_assists FROM table_27704187_10 WHERE date = "March 26"
sql_create_context
CREATE TABLE table_train_1 ( "id" int, "sinusal_rhythm" bool, "severe_sepsis" bool, "hemodynamic_instability" bool, "social_security" bool, "septic_shock" bool, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided above. -- hemodyn...
SELECT * FROM table_train_1 WHERE hemodynamic_instability = 0
criteria2sql
CREATE TABLE table_1158 ( "Draw" real, "Artist" text, "Song" text, "Televote" real, "Points" real, "Professional Jury" real, "TRM Committee" real, "Total" real, "Place" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the jury of ...
SELECT "Professional Jury" FROM table_1158 WHERE "Points" = '10'
wikisql
CREATE TABLE table_29267 ( "No. in series" text, "No. in season" text, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the director for t...
SELECT "Directed by" FROM table_29267 WHERE "No. in season" = '10a'
wikisql
CREATE TABLE table_1205598_1 ( nhl_team_s_ VARCHAR, metropolitan_area VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many NHL teams are there in the Phoenix, Arizona area?
SELECT COUNT(nhl_team_s_) FROM table_1205598_1 WHERE metropolitan_area = "Phoenix, Arizona"
sql_create_context
CREATE TABLE VISITS ( Tourist_Attraction_ID VARCHAR, Tourist_ID VARCHAR ) CREATE TABLE VISITORS ( Tourist_Details VARCHAR, Tourist_ID VARCHAR ) CREATE TABLE Tourist_Attractions ( Name VARCHAR, Tourist_Attraction_ID VARCHAR ) -- Using valid SQLite, answer the following questions for the table...
SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Vincent" INTERSECT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_At...
sql_create_context
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE l...
SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-849' AND patient.hospitaldischargetime IS NULL)) AND medic...
eicu
CREATE TABLE table_name_95 ( decision VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Decision has a Date of april 30?
SELECT decision FROM table_name_95 WHERE date = "april 30"
sql_create_context
CREATE TABLE table_2196127_1 ( laps VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many laps were there in 2002?
SELECT laps FROM table_2196127_1 WHERE year = "2002"
sql_create_context
CREATE TABLE table_16833 ( "Player" text, "No." text, "Nationality" text, "Position" text, "Years for Jazz" text, "School/Club Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many positions are for creighton?
SELECT COUNT("Position") FROM table_16833 WHERE "School/Club Team" = 'Creighton'
wikisql
CREATE TABLE business ( bid int, business_id varchar, name varchar, full_address varchar, city varchar, latitude varchar, longitude varchar, review_count bigint, is_open tinyint, rating float, state varchar ) CREATE TABLE review ( rid int, business_id varchar, us...
SELECT user.name FROM business, category, tip, user WHERE category.business_id = business.business_id AND category.category_name = 'Pet Groomers' AND tip.business_id = business.business_id AND user.user_id = tip.user_id
yelp
CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) 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, r...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND CIT...
atis
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) -- Using valid SQLite, answer the following questions for the...
SELECT Name, AVG(Price) FROM Products GROUP BY Name ORDER BY AVG(Price)
nvbench
CREATE TABLE table_name_1 ( iata VARCHAR, state_territory VARCHAR, begin VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the IATA that has new south wales as the state/territory beginning on july 2009?
SELECT iata FROM table_name_1 WHERE state_territory = "new south wales" AND begin = "july 2009"
sql_create_context
CREATE TABLE table_name_12 ( loss VARCHAR, name VARCHAR, long VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many losses did leon patton have with the longest gain higher than 45?
SELECT COUNT(loss) FROM table_name_12 WHERE name = "leon patton" AND long > 45
sql_create_context
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...
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 ((date_day.day_number = 23 AND date_day.month_number = 4 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_time...
atis
CREATE TABLE table_17977 ( "Member countries" text, "Population" real, "Area (km\u00b2)" real, "GDP (billion US$)" text, "GDP per capita (US$)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of population for lithuania?
SELECT COUNT("Population") FROM table_17977 WHERE "Member countries" = 'Lithuania'
wikisql
CREATE TABLE zyjzjlb ( YLJGDM text, JZLSH text, MZJZLSH text, KH text, KLX number, HZXM text, WDBZ number, RYDJSJ time, RYTJDM number, RYTJMC text, JZKSDM text, JZKSMC text, RZBQDM text, RZBQMC text, RYCWH text, CYKSDM text, CYKSMC text, CYBQDM tex...
SELECT SHRGH, SHRXM FROM jybgb WHERE JZLSH = '22035367321'
css
CREATE TABLE table_16684 ( "English Name" text, "Japanese orthography" text, "Pronouciation" text, "abbreviation" text, "Provider(IAI)" text, "Foundation" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Japanese orthography for Nation...
SELECT "Japanese orthography" FROM table_16684 WHERE "English Name" = 'National Fisheries University'
wikisql
CREATE TABLE Settlements ( Settlement_ID INTEGER, Claim_ID INTEGER, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed INTEGER, Amount_Settled INTEGER, Customer_Policy_ID INTEGER ) CREATE TABLE Customers ( Customer_ID INTEGER, Customer_Details VARCHAR(255) ) CREATE TABLE...
SELECT Date_Claim_Made, COUNT(Date_Claim_Made) FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims) ORDER BY COUNT(Date_Claim_Made) DESC
nvbench
CREATE TABLE documents_to_be_destroyed ( document_id number, destruction_authorised_by_employee_id number, destroyed_by_employee_id number, planned_destruction_date time, actual_destruction_date time, other_details text ) CREATE TABLE roles ( role_code text, role_name text, role_des...
SELECT role_code FROM employees GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE table_58376 ( "Year" real, "Theme" text, "Artist" text, "Mintage" real, "Issue Price" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What theme had an issue price of $489.95 after 2005?
SELECT "Theme" FROM table_58376 WHERE "Issue Price" = '$489.95' AND "Year" > '2005'
wikisql
CREATE TABLE ref_document_types ( document_type_code text, document_type_description text ) CREATE TABLE documents_mailed ( document_id number, mailed_to_address_id number, mailing_date time ) CREATE TABLE ref_shipping_agents ( shipping_agent_code text, shipping_agent_name text, shippi...
SELECT role_code FROM roles
spider
CREATE TABLE table_name_96 ( date VARCHAR, game VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date of game 59?
SELECT date FROM table_name_96 WHERE game = 59
sql_create_context
CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE days ( days_code varchar, da...
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis AS FARE_BASIS_0, fare_basis AS FARE_BASIS_1, flight, flight_fare WHERE (((CITY_1....
atis
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code tex...
SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'volume depletion, unspecified' AND STRFT...
eicu
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number,...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT procedures_icd.icd9_code FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 54825 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admit...
mimic_iii
CREATE TABLE table_74313 ( "Track no." real, "Track" text, "Original Artist" text, "Soloist(s)" text, "Vocal Percussionist" text, "Arranger(s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the artist where the vocal percussionist is Ben...
SELECT "Original Artist" FROM table_74313 WHERE "Vocal Percussionist" = 'Benjamin Holder'
wikisql
CREATE TABLE table_58207 ( "Club" text, "Position in 2012\u201313" text, "First season in top division" text, "Number of seasons in Ligue 1" real, "First season of current spell in top division" text, "Ligue 1 titles" real, "Last Ligue 1 title" text ) -- Using valid SQLite, answer the foll...
SELECT "Position in 2012\u201313" FROM table_58207 WHERE "Number of seasons in Ligue 1" = '30' AND "Ligue 1 titles" = '1'
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 t_kc21.OUT_DIAG_DIS_CD, t_kc21.OUT_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '83701090' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT > 3099.06)
css
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, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
SELECT SALARY, COMMISSION_PCT FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history)
nvbench
CREATE TABLE table_64481 ( "Rank" real, "Name" text, "1st run" text, "2nd run" text, "3rd run" text, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Name has a 3rd run of 36.200 (1)?
SELECT "Name" FROM table_64481 WHERE "3rd run" = '36.200 (1)'
wikisql
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 jybgb ( YLJGDM text, YLJGDM_M...
SELECT COUNT(*) FROM mzjzjlb WHERE JZKSBM = '96274' AND JZKSRQ BETWEEN '2005-02-09' AND '2015-05-08'
css
CREATE TABLE table_name_73 ( country VARCHAR, champion VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country does jocelyne bourassa play for?
SELECT country FROM table_name_73 WHERE champion = "jocelyne bourassa"
sql_create_context
CREATE TABLE table_name_33 ( result VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result of Bridgeview, Illinois?
SELECT result FROM table_name_33 WHERE venue = "bridgeview, illinois"
sql_create_context
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) -- Using valid SQLite, answer the following questions for the...
SELECT T1.Code, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder
nvbench
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...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "HYPERGLYCEMIA" AND demographic.dob_year < "2168"
mimicsql_data
CREATE TABLE table_51088 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Home Team, when Date is '1 February 1984', and when Tie No is '5'?
SELECT "Home team" FROM table_51088 WHERE "Date" = '1 february 1984' AND "Tie no" = '5'
wikisql
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 zyjzjlb ( YLJGDM text, JZLSH ...
(SELECT JCZBMC FROM jyjgzbb WHERE BGDH = '42057619834') INTERSECT (SELECT JCZBMC FROM jyjgzbb WHERE BGDH = '82251918159')
css
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
SELECT SUM(t_kc22.AMOUNT) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '尤幼仪' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2020-09-13' AND '2021-01-21' AND t_kc22.MED_INV_ITEM_TYPE = '检查费'
css
CREATE TABLE table_25055040_22 ( sprint_classification VARCHAR, mountains_classification VARCHAR, general_classification VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When Ryan Anderson won the mountains classification, and Michael Rogers won the genera...
SELECT sprint_classification FROM table_25055040_22 WHERE mountains_classification = "Ryan Anderson" AND general_classification = "Michael Rogers"
sql_create_context
CREATE TABLE table_name_37 ( imperative VARCHAR, subjunctive VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- With a subjunctive of du m chast what is the imperative?
SELECT imperative FROM table_name_37 WHERE subjunctive = "du måchast"
sql_create_context
CREATE TABLE table_17957 ( "County" text, "Kerry%" text, "Kerry#" real, "Bush%" text, "Bush#" real, "Others%" text, "Others#" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the name of the county where 54.6% voted for Bush?
SELECT "County" FROM table_17957 WHERE "Bush%" = '54.6%'
wikisql
CREATE TABLE table_36641 ( "Year" real, "Date" text, "Winner" text, "Result" text, "Loser" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the location of the game with a Result of 21 16?
SELECT "Location" FROM table_36641 WHERE "Result" = '21–16'
wikisql
CREATE TABLE table_48664 ( "Name" text, "Latitude" text, "Longitude" text, "Diameter (km)" real, "Year named" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Diameter (km) of the Valle with a Longitude of 152.5e named before 1997?
SELECT MAX("Diameter (km)") FROM table_48664 WHERE "Longitude" = '152.5e' AND "Year named" < '1997'
wikisql
CREATE TABLE table_24414 ( "Satellite" text, "Launch date (UTC)" text, "Decay" text, "Mass(kg)" text, "Diameter(m)" text, "NSSDC ID" text, "Nation" text, "Usage" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the launch date for ...
SELECT "Launch date (UTC)" FROM table_24414 WHERE "NSSDC ID" = '1960-009A'
wikisql
CREATE TABLE table_79614 ( "Round" text, "Date" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real, "Goalscorers" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which venue has attendance larger than 26,526, and sf first l...
SELECT "Venue" FROM table_79614 WHERE "Attendance" > '26,526' AND "Round" = 'sf first leg'
wikisql
CREATE TABLE table_name_82 ( winner VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the winner for schimatari 1
SELECT winner FROM table_name_82 WHERE name = "schimatari 1"
sql_create_context
CREATE TABLE table_15233 ( "Name" text, "Years" text, "A-League" text, "Finals" text, "Total" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many total appearances did Grant Brebner have?
SELECT "Total" FROM table_15233 WHERE "Name" = 'grant brebner'
wikisql
CREATE TABLE table_64650 ( "Year" real, "Title" text, "From album" text, "Label" text, "Label-Nr" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Title has an album of tough talk, and a Label-Nr of x-371?
SELECT "Title" FROM table_64650 WHERE "From album" = 'tough talk' AND "Label-Nr" = 'x-371'
wikisql
CREATE TABLE table_test_13 ( "id" int, "systolic_blood_pressure_sbp" int, "tachycardia" int, "diastolic_blood_pressure_dbp" int, "total_cholesterol" int, "high_density_lipoprotein_cholesterol_hdl_c" int, "serum_creatinine" float, "alcohol_abuse" bool, "drug_abuse" bool, "body_mas...
SELECT * FROM table_test_13 WHERE body_mass_index_bmi < 24
criteria2sql
CREATE TABLE table_28802165_1 ( poor_law_union VARCHAR, townland VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the poor law union on Marshalstown?
SELECT poor_law_union FROM table_28802165_1 WHERE townland = "Marshalstown"
sql_create_context
CREATE TABLE Museums ( Museum_ID INTEGER, Museum_Details VARCHAR(255) ) CREATE TABLE Tourist_Attractions ( Tourist_Attraction_ID INTEGER, Attraction_Type_Code CHAR(15), Location_ID INTEGER, How_to_Get_There VARCHAR(255), Name VARCHAR(255), Description VARCHAR(255), Opening_Hours VAR...
SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE table_name_40 ( frequency_mhz VARCHAR, erp_w VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Total frequency with ERP W of 62?
SELECT COUNT(frequency_mhz) FROM table_name_40 WHERE erp_w = "62"
sql_create_context
CREATE TABLE table_203_119 ( id number, "jamo" text, "hangul compatibility" text, "hangul jamo area" text, "hanyang private use" text, "halfwidth" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the number of halfwidth are there ?
SELECT COUNT(*) FROM table_203_119 WHERE NOT "halfwidth" IS NULL
squall
CREATE TABLE table_39848 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" text, "Finish" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the years won when the to par is +5?
SELECT "Year(s) won" FROM table_39848 WHERE "To par" = '+5'
wikisql
CREATE TABLE table_19094 ( "Season" real, "Race Name" text, "Winning Driver" text, "Chassis" text, "Engine" text, "Tires" text, "Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What team raced with a Foyt engine in the Texas Grand Prix?...
SELECT "Team" FROM table_19094 WHERE "Race Name" = 'Texas Grand Prix' AND "Engine" = 'Foyt'
wikisql
CREATE TABLE table_52817 ( "Player" text, "Position" text, "School" text, "Hometown" text, "MLB Draft" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where is the Hometown of the person that attended Kennedy-Kenrick Catholic High School?
SELECT "Hometown" FROM table_52817 WHERE "School" = 'kennedy-kenrick catholic high school'
wikisql
CREATE TABLE airport ( Airport_ID int, Airport_Name text, Total_Passengers real, %_Change_2007 text, International_Passengers real, Domestic_Passengers real, Transit_Passengers real, Aircraft_Movements real, Freight_Metric_Tonnes real ) CREATE TABLE pilot ( Pilot_Id int(11), ...
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 table_79311 ( "Name" text, "Height" text, "Weight" text, "Spike" text, "2008 club" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the name when the 2008 club is zarechie odintsovo?
SELECT "Name" FROM table_79311 WHERE "2008 club" = 'zarechie odintsovo'
wikisql
CREATE TABLE table_name_44 ( losing_team VARCHAR, total VARCHAR, winning_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the losing team with a total of 24 when the winning team was Sydney Roosters?
SELECT losing_team FROM table_name_44 WHERE total = 24 AND winning_team = "sydney roosters"
sql_create_context
CREATE TABLE table_69359 ( "Engine" text, "Displacement" text, "Power" text, "Torque" text, "Redline" real, "Year" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Displacement of 4.4l (4423cc/269in ) and a Power of 220kw (299hp) @ 4000 belongs to...
SELECT "Engine" FROM table_69359 WHERE "Displacement" = '4.4l (4423cc/269in³)' AND "Power" = '220kw (299hp) @ 4000'
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_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE d_icd_procedures ( row_id number, icd9...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, COUNT(procedures_icd.charttime) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 259...
mimic_iii
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 ( ...
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.short_title = "Polyp of nasal cavity" AND prescriptions.route = "NU"
mimicsql_data
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code tex...
SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-28507' AND patient.hospitaldischargetime IS NULL)) AND treatment.treatme...
eicu
CREATE TABLE table_name_79 ( film_title_used_in_nomination VARCHAR, language_s_ VARCHAR, original_title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the title used for Rosie, the film nominated for the dutch language?
SELECT film_title_used_in_nomination FROM table_name_79 WHERE language_s_ = "dutch" AND original_title = "rosie"
sql_create_context
CREATE TABLE jyjgzbb ( JYZBLSH text, YLJGDM text, BGDH text, BGRQ time, JYRQ time, JCRGH text, JCRXM text, SHRGH text, SHRXM text, JCXMMC text, JCZBDM text, JCFF text, JCZBMC text, JCZBJGDX text, JCZBJGDL number, JCZBJGDW text, SBBM text, YQBH text...
SELECT * FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '58482069' AND hz_info.YLJGDM = '3718001' AND NOT zyjzjlb.CYKSMC LIKE '%室%'
css
CREATE TABLE table_43421 ( "Background" text, "Original Team" text, "Hometown" text, "Result" text, "Raised" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Original Team of the contestant from Wrightsville, Georgia ?
SELECT "Original Team" FROM table_43421 WHERE "Hometown" = 'wrightsville, georgia'
wikisql
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT txmzjzjlb.JZKSRQ FROM txmzjzjlb WHERE txmzjzjlb.JZLSH = '34693713657' UNION SELECT ftxmzjzjlb.JZKSRQ FROM ftxmzjzjlb WHERE ftxmzjzjlb.JZLSH = '34693713657'
css
CREATE TABLE txmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZ...
SELECT * FROM hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_i...
css
CREATE TABLE table_30049462_5 ( high_points VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- in december 7 who made the high points
SELECT high_points FROM table_30049462_5 WHERE date = "December 7"
sql_create_context
CREATE TABLE table_name_48 ( outcome VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score of the match played on 18 January 1999?
SELECT outcome FROM table_name_48 WHERE date = "18 january 1999"
sql_create_context
CREATE TABLE table_51853 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what date was Richmond playing as an away tea...
SELECT "Date" FROM table_51853 WHERE "Away team" = 'richmond'
wikisql
CREATE TABLE table_name_74 ( date VARCHAR, event VARCHAR, heat_semifinal_final VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date was the men's 100m breaststroke in heat 6?
SELECT date FROM table_name_74 WHERE event = "men's 100m breaststroke" AND heat_semifinal_final = "heat 6"
sql_create_context
CREATE TABLE table_25861 ( "Outcome" text, "Year" real, "Championship" text, "Surface" text, "Opponent in the final" text, "Score in the final" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the opponent in the final for 3 6, 1 6
SELECT "Opponent in the final" FROM table_25861 WHERE "Score in the final" = '3–6, 1–6'
wikisql
CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time...
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 = 'DENVER' AND date_day.day_number = 23 AND date_day.month_number = 4 AND da...
atis
CREATE TABLE table_20626467_1 ( class VARCHAR, winner_2nd VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What class was the 2nd - portillo?
SELECT class FROM table_20626467_1 WHERE winner_2nd = "2nd - Portillo"
sql_create_context
CREATE TABLE table_33175 ( "Player" text, "Span" text, "Start" real, "Tries" real, "Conv" real, "Pens" real, "Drop" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In 1990-2005 what is the lowest Start with Convs smaller than 2?
SELECT MIN("Start") FROM table_33175 WHERE "Span" = '1990-2005' AND "Conv" < '2'
wikisql
CREATE TABLE Customers_Cards ( card_id INTEGER, customer_id INTEGER, card_type_code VARCHAR(15), card_number VARCHAR(80), date_valid_from DATETIME, date_valid_to DATETIME, other_card_details VARCHAR(255) ) CREATE TABLE Accounts ( account_id INTEGER, customer_id INTEGER, account_...
SELECT card_type_code, COUNT(*) FROM Financial_Transactions AS T1 JOIN Customers_Cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_type_code ORDER BY card_type_code DESC
nvbench
CREATE TABLE table_204_23 ( id number, "#" number, "wrestlers" text, "reign" number, "date" text, "days held" number, "location" text, "event" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who held the title the most t...
SELECT "wrestlers" FROM table_204_23 WHERE "wrestlers" IN ('the super destroyers', 'the dudley boyz') GROUP BY "wrestlers" ORDER BY COUNT(*) DESC LIMIT 1
squall
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, ...
SELECT AVG(t_kc24.PER_ACC_PAY) FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '8773150' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2005-06-09' AND '2006-02-24' UNION SELECT AVG(t_kc24.PER_ACC_PAY) FROM fgwyjzb JOIN t_kc24 ON fgwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHE...
css
CREATE TABLE table_name_81 ( pick INTEGER, round VARCHAR, college VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the average pick of northwestern state college under round 3?
SELECT AVG(pick) FROM table_name_81 WHERE round < 3 AND college = "northwestern state"
sql_create_context
CREATE TABLE table_69847 ( "Team" text, "Car No." text, "MNZ SPR" text, "MNZ FEA" text, "SPA SPR" text, "SPA FEA" text, "MON FEA" text, "SIL SPR" text, "SIL FEA" text, "HUN SPR" text, "HUN FEA" text, "LMS SPR" text, "LMS FEA" text, "CAT SPR" text, "CAT FEA" te...
SELECT "MNZ FEA" FROM table_69847 WHERE "SIL SPR" = '18'
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...
SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM...
css
CREATE TABLE table_train_12 ( "id" int, "sequential_organ_failure_assessment_sofa" int, "active_infection" bool, "taking_pioglitazone" bool, "taking_rosiglitazone" bool, "body_weight" float, "diabetic" string, "organ_failure" bool, "age" float, "NOUSE" float ) -- Using valid SQ...
SELECT * FROM table_train_12 WHERE active_infection = 1 AND (organ_failure = 1 OR sequential_organ_failure_assessment_sofa >= 2)
criteria2sql
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, O...
WITH counts_cte AS (SELECT u.Id AS uid, u.DownVotes AS down, COUNT(DISTINCT c.PostId) AS CommentedPosts FROM Users AS u LEFT OUTER JOIN Comments AS c ON c.UserId = u.Id WHERE u.DownVotes > '##min?100##' GROUP BY u.Id, u.DownVotes) SELECT RANK() OVER (ORDER BY (CASE WHEN CommentedPosts = 0 THEN (CAST(down AS FLOAT) / CA...
sede
CREATE TABLE table_name_66 ( population INTEGER, median_household_income VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many people have a Median household income of $37,759?
SELECT SUM(population) FROM table_name_66 WHERE median_household_income = "$37,759"
sql_create_context
CREATE TABLE table_22102 ( "Player" text, "Alma Mater" text, "National Lacrosse League" text, "Major League Lacrosse" text, "International Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- List all of the NLL Toronto Rock players.
SELECT "Player" FROM table_22102 WHERE "National Lacrosse League" = 'Toronto Rock'
wikisql
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE treatment ( treatmenti...
SELECT COUNT(*) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-2181' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime D...
eicu
CREATE TABLE table_40798 ( "Free" text, "Free polite" text, "Genitive 1" text, "Genitive 2" text, "Genitive 3" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Free has a Free polite of *[i-]k-ita?
SELECT "Free" FROM table_40798 WHERE "Free polite" = '*[i-]k-ita'
wikisql
CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_fro...
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 = 'ATLANTA' AND date_day.day_number = 24 AND date_day.month_number = 5 AND ...
atis
CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters int, num_enrolled int, has_discussion varchar, has_lab varchar, has_p...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE (course.number = 398 OR course.number = 498 OR course.number = 598) AND course.department = 'E...
advising
CREATE TABLE table_2267857_1 ( report VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number for report july 23
SELECT COUNT(report) FROM table_2267857_1 WHERE date = "July 23"
sql_create_context