instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ...
SELECT DATEADD(month, DATEDIFF(month, 0, CreationDate), 0) AS Month, COUNT(*) AS Count FROM Posts WHERE PostTypeId = 1 GROUP BY DATEADD(month, DATEDIFF(month, 0, CreationDate), 0) ORDER BY DATEADD(month, DATEDIFF(month, 0, CreationDate), 0)
sede
CREATE TABLE table_11496 ( "Date" text, "Opponent" text, "Home/Away" text, "Field" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the result of the home game on August 14?
SELECT "Result" FROM table_11496 WHERE "Home/Away" = 'home' AND "Date" = 'august 14'
wikisql
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
SELECT COUNT(DISTINCT course_offering.offering_id) FROM course, course_offering WHERE course.course_id = course_offering.course_id AND course.department = 'DESCI' AND course.number = 790
advising
CREATE TABLE table_22941863_19 ( points_classification VARCHAR, stage VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the stage is 3, what is the points classification name?
SELECT points_classification FROM table_22941863_19 WHERE stage = 3
sql_create_context
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 ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "15" AND diagnoses.short_title = "Erythematous cond NOS"
mimicsql_data
CREATE TABLE table_48892 ( "Team #1" text, "Points" text, "Team #2" text, "1st leg" text, "2nd leg" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 2nd leg of goi s team 2?
SELECT "2nd leg" FROM table_48892 WHERE "Team #2" = 'goiás'
wikisql
CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, good_feedback int, ...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.number <> 627 AND instructor.name LIKE '%Brendan Goff%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_...
advising
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "OLAN5" AND lab.fluid = "Cerebrospinal Fluid (CSF)"
mimicsql_data
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 time_zone ( time_zone_code text, time_zone_name ...
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, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_...
atis
CREATE TABLE phone ( name text, phone_id number, memory_in_g number, carrier text, price number ) CREATE TABLE phone_market ( market_id number, phone_id text, num_of_stock number ) CREATE TABLE market ( market_id number, district text, num_of_employees number, num_of_sh...
SELECT T2.name, SUM(T1.num_of_stock) FROM phone_market AS T1 JOIN phone AS T2 ON T1.phone_id = T2.phone_id GROUP BY T2.name
spider
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) -- Using valid SQLite, answer the following questions for the...
SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name
nvbench
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId n...
SELECT Tags.TagName, CAST(SUM(Posts.Score) AS FLOAT) / CAST(COUNT(*) AS FLOAT) AS average_Q_score FROM (PostTags INNER JOIN Tags ON PostTags.TagId = Tags.Id) INNER JOIN Posts ON Posts.Id = PostTags.PostId WHERE Tags.Count > 9 GROUP BY Tags.TagName ORDER BY average_Q_score
sede
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '70297325' AND t_kc22.STA_DATE BETWEEN '2016-05-13' AND '2020-10-13' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 1
css
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_...
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE NOT admissions.dischtime IS NULL AND STRFTIME('%y', admissions.dischtime) >= '2104'
mimic_iii
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...
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '郑乐山' AND t_kc21.MED_SER_ORG_NO = '6652553' AND t_kc21.IN_HOSP_DATE BETWEEN '2011-02-09' AND '2012-12-03')
css
CREATE TABLE table_name_83 ( player VARCHAR, to_par VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which player has a To par of 6?
SELECT player FROM table_name_83 WHERE to_par = "–6"
sql_create_context
CREATE TABLE table_25802618_15 ( stage INTEGER, winner VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the latest stage won by Mikhail Ignatiev?
SELECT MAX(stage) FROM table_25802618_15 WHERE winner = "Mikhail Ignatiev"
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.language = "HAIT" AND lab.label = "Protein"
mimicsql_data
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 demographic ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "F" AND diagnoses.long_title = "Personal history, urinary (tract) infection"
mimicsql_data
CREATE TABLE table_35094 ( "Date" text, "Result" text, "Score" text, "Venue" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Result of l, and a Competition of 1966 asian games, and a Score of 0 1 had what date?
SELECT "Date" FROM table_35094 WHERE "Result" = 'l' AND "Competition" = '1966 asian games' AND "Score" = '0–1'
wikisql
CREATE TABLE Customers ( first_name VARCHAR, last_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- List the first name and last name of all customers.
SELECT first_name, last_name FROM Customers
sql_create_context
CREATE TABLE table_3604 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- First elected in 1807 1817 in what district?
SELECT "District" FROM table_3604 WHERE "First elected" = '1807 1817'
wikisql
CREATE TABLE cinema ( LOCATION VARCHAR, capacity INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show all the locations where no cinema has capacity over 800.
SELECT LOCATION FROM cinema EXCEPT SELECT LOCATION FROM cinema WHERE capacity > 800
sql_create_context
CREATE TABLE table_name_19 ( population INTEGER, region VARCHAR, regional_county_municipality VARCHAR, type VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the average population when the regional county municipality is le domaine-du-roy, the ...
SELECT AVG(population) FROM table_name_19 WHERE regional_county_municipality = "le domaine-du-roy" AND type = "m" AND region < 2
sql_create_context
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE ReviewRejectionReasons ( Id number, Na...
SELECT COUNT(*) AS aantal, HasYouTube, PostType FROM (SELECT p.Id AS PostId, CASE WHEN p.Body LIKE '%youtube.com%' OR p.Body LIKE '%youtu.be%' OR p.Body LIKE '%soundcloud.com%' THEN 1 ELSE 0 END AS HasYouTube, pt.Name AS PostType FROM Posts AS p LEFT JOIN PostTypes AS pt ON pt.Id = p.PostTypeId) AS pp GROUP BY HasYouTu...
sede
CREATE TABLE table_15299235_1 ( grand_prix VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who won the spanish grand prix?
SELECT 250 AS cc_winner FROM table_15299235_1 WHERE grand_prix = "Spanish grand_prix"
sql_create_context
CREATE TABLE table_16031 ( "Outcome" text, "Year" real, "Championship" text, "Surface" text, "Partner" text, "Opponents" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score of the match with opponents Gretchen Mage...
SELECT "Score" FROM table_16031 WHERE "Opponents" = 'Gretchen Magers Kelly Jones'
wikisql
CREATE TABLE table_29486189_4 ( representative VARCHAR, first_elected VARCHAR, residence VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many representatives from hanover twp were first elected in 2008
SELECT COUNT(representative) FROM table_29486189_4 WHERE first_elected = "2008" AND residence = "Hanover Twp"
sql_create_context
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...
SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY SUM(EMPLOYEE_ID)
nvbench
CREATE TABLE table_name_22 ( number VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What number is Tony Dixon?
SELECT number FROM table_name_22 WHERE name = "tony dixon"
sql_create_context
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 instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'ARMENIAN' AND course.number = 101 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offeri...
advising
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 COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '5433552' AND HOSP_STS > 0
css
CREATE TABLE table_58063 ( "Species" text, "Strain" text, "Type" text, "Base Pairs" text, "Genes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many base pairs are there in the tohamai strain?
SELECT "Base Pairs" FROM table_58063 WHERE "Strain" = 'tohamai'
wikisql
CREATE TABLE table_19382 ( "Country" text, "Local Name" text, "Host" text, "Channel" text, "Year Aired" text, "Top Prize" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where is the show aired in New Zealand?
SELECT "Channel" FROM table_19382 WHERE "Country" = 'New Zealand'
wikisql
CREATE TABLE table_name_68 ( kickoff_ VARCHAR, a_ VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What time was the kickoff on September 15, 1985?
SELECT kickoff_ AS "a_" FROM table_name_68 WHERE date = "september 15, 1985"
sql_create_context
CREATE TABLE table_12186309_1 ( womens_singles VARCHAR, mens_doubles VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the women's singles were men's doubles were steen fladberg jens peter nierhoff?
SELECT womens_singles FROM table_12186309_1 WHERE mens_doubles = "Steen Fladberg Jens Peter Nierhoff"
sql_create_context
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
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 = '028-30487')) AND lab.labname = 'mchc' AND lab.labresulttime = '2105-06-03 11:50...
eicu
CREATE TABLE table_name_17 ( city VARCHAR, mascot VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Mascot of blazers involves what city?
SELECT city FROM table_name_17 WHERE mascot = "blazers"
sql_create_context
CREATE TABLE table_23996 ( "Name" text, "Completions" real, "Attempts" real, "Completion %" text, "Yards" real, "Touchdowns" real, "Interceptions" real, "QB Rating" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many touchdowns were ...
SELECT MAX("Touchdowns") FROM table_23996 WHERE "QB Rating" = '82.7'
wikisql
CREATE TABLE table_7757 ( "Province of Silla" text, "Administrative district" text, "Pre-1009 province" text, "Post-1009 province" text, "Modern equivalent" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Administrative district has a Pre-1009 ...
SELECT "Administrative district" FROM table_7757 WHERE "Pre-1009 province" = 'gwannae -do' AND "Post-1009 province" = 'seohae -do'
wikisql
CREATE TABLE Ref_Characteristic_Types ( characteristic_type_code VARCHAR(15), characteristic_type_description VARCHAR(80) ) CREATE TABLE Characteristics ( characteristic_id INTEGER, characteristic_type_code VARCHAR(15), characteristic_data_type VARCHAR(10), characteristic_name VARCHAR(80), ...
SELECT product_category_description, COUNT(product_category_description) FROM Ref_Product_Categories AS T1 JOIN Products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%' GROUP BY product_category_description ORDER BY product_category_description DESC
nvbench
CREATE TABLE table_30614 ( "IME Exchange (Including spot, credit and forward transactions)" text, "2007/08" text, "2008/09" text, "2009/10" text, "2010/11" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When 2007/08 is 6,443.8 what is ime exchange (...
SELECT "IME Exchange (Including spot, credit and forward transactions)" FROM table_30614 WHERE "2007/08" = '6,443.8'
wikisql
CREATE TABLE table_17760 ( "No." real, "Title" text, "Directed by" text, "Written by" text, "Bens location" text, "Original air date" text, "U.S. viewers (million)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the original air date...
SELECT "Original air date" FROM table_17760 WHERE "No." = '2'
wikisql
CREATE TABLE table_name_23 ( date VARCHAR, time VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Date of the Event with a Time of 2:23:47?
SELECT date FROM table_name_23 WHERE time = "2:23:47"
sql_create_context
CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH text, KH text, KLX number, MJZH text, HZXM text, NLS number, NLY number, ZSEBZ number, JZZTDM number, JZZTMC text, JZJSSJ time, TXBZ number, ZZBZ number, WDBZ number, JZKSBM text, JZKSMC text, JZKSRQ time, ...
SELECT CYZTDM FROM zyjzjlb WHERE JZLSH = '42136111810'
css
CREATE TABLE table_train_42 ( "id" int, "taking_vitamin_c" bool, "do_not_resuscitate_dnr" bool, "allergy_to_thiamine" bool, "taking_thiamine" bool, "receiving_vasopressor" bool, "sepsis" bool, "hypotension" bool, "allergy_to_vitamin_c" bool, "glucose_6_phosphate_dehydrogenase_def...
SELECT * FROM table_train_42 WHERE glucose_6_phosphate_dehydrogenase_deficiency_g6pd = 1
criteria2sql
CREATE TABLE table_name_18 ( year_made VARCHAR, wheel_arrangement VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum number of years where the wheel arrangement of 0-4-0t?
SELECT COUNT(year_made) FROM table_name_18 WHERE wheel_arrangement = "0-4-0t"
sql_create_context
CREATE TABLE table_53385 ( "Constructor" text, "Chassis" text, "Engine" text, "Tyre" text, "Driver" text, "Rounds" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Chassis was driven by Otto Stuppacher?
SELECT "Chassis" FROM table_53385 WHERE "Driver" = 'otto stuppacher'
wikisql
CREATE TABLE table_16279520_1 ( title VARCHAR, release VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the title of the 1.1 realease?
SELECT title FROM table_16279520_1 WHERE release = "1.1"
sql_create_context
CREATE TABLE Claims ( Claim_ID INTEGER, Policy_ID INTEGER, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed INTEGER, Amount_Settled INTEGER ) CREATE TABLE Payments ( Payment_ID INTEGER, Settlement_ID INTEGER, Payment_Method_Code VARCHAR(255), Date_Payment_Made DATE,...
SELECT Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa' ORDER BY Amount_Payment
nvbench
CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE field ( fieldid int ) CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE dataset ( datasetid int, datasetname varchar ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE ...
SELECT DISTINCT COUNT(DISTINCT writes.paperid) FROM author, writes WHERE author.authorname = 'eric brewer' AND writes.authorid = author.authorid
scholar
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description t...
SELECT COUNT(*) AS unanswered, MONTH(Posts.CreationDate) AS month, YEAR(Posts.CreationDate) AS year FROM Posts JOIN PostTypes ON PostTypes.Id = Posts.PostTypeId AND PostTypes.Name LIKE 'Question' WHERE Posts.AnswerCount = 0 GROUP BY YEAR(Posts.CreationDate), MONTH(Posts.CreationDate) ORDER BY YEAR(Posts.CreationDate) D...
sede
CREATE TABLE table_name_40 ( tournament VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Tournament, when Date is '6 April 1992'?
SELECT tournament FROM table_name_40 WHERE date = "6 april 1992"
sql_create_context
CREATE TABLE table_203_804 ( id number, "pos" text, "no" number, "driver" text, "constructor" text, "laps" number, "time/retired" text, "grid" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which driver did the least number of laps ?
SELECT "driver" FROM table_203_804 ORDER BY "laps" LIMIT 1
squall
CREATE TABLE table_28677723_14 ( tor_fløysvik INTEGER, karianne_gulliksen VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the most for fl ysvik for 8
SELECT MAX(tor_fløysvik) FROM table_28677723_14 WHERE karianne_gulliksen = 8
sql_create_context
CREATE TABLE table_name_72 ( placement_in_miss_universe VARCHAR, delegate VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Placement in Miss Universe has a Delegate of janine mari raymundo tugonon?
SELECT placement_in_miss_universe FROM table_name_72 WHERE delegate = "janine mari raymundo tugonon"
sql_create_context
CREATE TABLE table_train_103 ( "id" int, "systolic_blood_pressure_sbp" int, "epilepsy" bool, "diastolic_blood_pressure_dbp" int, "heart_rate" int, "seizure_disorder" bool, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT * FROM table_train_103 WHERE heart_rate > 100 OR heart_rate < 50
criteria2sql
CREATE TABLE table_24994 ( "Year" text, "Date" text, "Driver" text, "Team" text, "Manufacturer" text, "Laps" text, "Miles (km)" text, "Race Time" text, "Average Speed (mph)" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided abov...
SELECT "Manufacturer" FROM table_24994 WHERE "Date" = 'May 21'
wikisql
CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number...
SELECT Posts.Id AS "post_link", Posts.Tags, PostInits.Text AS "initial_tags", Posts.CreationDate FROM Posts INNER JOIN (SELECT PostId, Text FROM PostHistory WHERE PostHistoryTypeId = 3 AND NOT Text LIKE '%##Tag##%') AS PostInits ON Posts.Id = PostInits.PostId WHERE Posts.Tags LIKE '%##Tag##%' AND (DATEDIFF(month, Posts...
sede
CREATE TABLE table_26267849_11 ( percentage_of_votes VARCHAR, act VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the percentage of votes for violinist
SELECT percentage_of_votes FROM table_26267849_11 WHERE act = "Violinist"
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 prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT demographic.dischtime, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "93033"
mimicsql_data
CREATE TABLE table_70889 ( "Auckland" text, "Gold Coast" text, "Sydney" text, "Melbourne" text, "Adelaide" text, "Perth" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Gold Coast has Melbourne yes, and Auckland yes?
SELECT "Gold Coast" FROM table_70889 WHERE "Melbourne" = 'yes' AND "Auckland" = 'yes'
wikisql
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 jybgb ( BBCJBW text, BBDM tex...
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jyb...
css
CREATE TABLE table_16268 ( "Year" real, "Network" text, "Host" text, "Pre-race analyst" text, "Lap-by-lap" text, "Color commentator(s)" text, "Pit reporters" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which network has Marty Reid as host...
SELECT "Network" FROM table_16268 WHERE "Lap-by-lap" = 'Marty Reid' AND "Host" = 'Marty Reid'
wikisql
CREATE TABLE table_4884 ( "Year" real, "Aircraft kilometers" text, "Departures" real, "Flying hours" real, "Passengers" real, "Seat factor" text, "Employees" text, "Profit/loss" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the...
SELECT MIN("Year") FROM table_4884 WHERE "Seat factor" = '68%' AND "Flying hours" > '105,579'
wikisql
CREATE TABLE table_26853 ( "Year" real, "Mutya ng Pilipinas Asia Pacific" text, "1st runner-up" text, "2nd runner-up" text, "3rd runner-up" text, "4th runner-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- List the year that mimilannie p. lis...
SELECT MAX("Year") FROM table_26853 WHERE "2nd runner-up" = 'Mimilannie P. Lisondra'
wikisql
CREATE TABLE table_name_5 ( winner VARCHAR, city VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Winner of the Event in Panama City?
SELECT winner FROM table_name_5 WHERE city = "panama city"
sql_create_context
CREATE TABLE table_55524 ( "Country" text, "Interview" real, "Swimsuit" real, "Evening Gown" real, "Average" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the country of the contestant with a swimsuit of 9.46?
SELECT "Country" FROM table_55524 WHERE "Swimsuit" = '9.46'
wikisql
CREATE TABLE table_72797 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many cfl teams had pick # 21?
SELECT COUNT("CFL Team") FROM table_72797 WHERE "Pick #" = '21'
wikisql
CREATE TABLE table_33023 ( "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. -- Which Venue has Footscray as it's Home team?
SELECT "Venue" FROM table_33023 WHERE "Home team" = 'footscray'
wikisql
CREATE TABLE table_name_40 ( years VARCHAR, roll VARCHAR, authority VARCHAR, decile VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the years with authority of state and decile more than 6 with roll less than 33
SELECT years FROM table_name_40 WHERE authority = "state" AND decile > 6 AND roll < 33
sql_create_context
CREATE TABLE table_16996 ( "Marginal Ordinary Income Tax Rate" text, "Single" text, "Married Filing Jointly or Qualified Widow(er)" text, "Married Filing Separately" text, "Head of Household" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is th...
SELECT COUNT("Marginal Ordinary Income Tax Rate") FROM table_16996 WHERE "Married Filing Jointly or Qualified Widow(er)" = '$208,851–$372,950'
wikisql
CREATE TABLE Tryout ( pID numeric(5,0), cName varchar(20), pPos varchar(8), decision varchar(3) ) CREATE TABLE Player ( pID numeric(5,0), pName varchar(20), yCard varchar(3), HS numeric(5,0) ) CREATE TABLE College ( cName varchar(20), state varchar(2), enr numeric(5,0) ) ...
SELECT pName, HS FROM Player WHERE HS < 1500 ORDER BY pName
nvbench
CREATE TABLE table_name_60 ( venue VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where was the competition on August 15, 2012?
SELECT venue FROM table_name_60 WHERE date = "august 15, 2012"
sql_create_context
CREATE TABLE table_8617 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Record" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date was the week 10 game?
SELECT "Date" FROM table_8617 WHERE "Week" = '10'
wikisql
CREATE TABLE table_203_416 ( id number, "school name" text, "city" text, "grades" text, "establishment" number, "charter" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many schools are not charter ?
SELECT COUNT("school name") FROM table_203_416 WHERE "charter" IS NULL
squall
CREATE TABLE Invoice_Line_Items ( order_item_id INTEGER, invoice_number INTEGER, product_id INTEGER, product_title VARCHAR(80), product_quantity VARCHAR(50), product_price DECIMAL(19,4), derived_product_cost DECIMAL(19,4), derived_vat_payable DECIMAL(19,4), derived_total_cost DECIMAL...
SELECT order_id, COUNT(DISTINCT product_id) FROM Order_Items
nvbench
CREATE TABLE table_name_78 ( away_team VARCHAR, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the away team for the match with a home team of Citizen Team A?
SELECT away_team FROM table_name_78 WHERE home_team = "citizen team a"
sql_create_context
CREATE TABLE table_3706 ( "No. in series" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (million)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Season 9 all the t...
SELECT "Title" FROM table_3706 WHERE "No. in series" = '9'
wikisql
CREATE TABLE flight ( flno number, origin text, destination text, distance number, departure_date time, arrival_date time, price number, aid number ) CREATE TABLE certificate ( eid number, aid number ) CREATE TABLE employee ( eid number, name text, salary number ) ...
SELECT name, salary FROM employee ORDER BY salary
spider
CREATE TABLE table_name_34 ( score VARCHAR, decision VARCHAR, home VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score for Boston's Home game that had Gerber as the decision?
SELECT score FROM table_name_34 WHERE decision = "gerber" AND home = "boston"
sql_create_context
CREATE TABLE table_15187794_1 ( race_winner VARCHAR, no VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many people won in No. 12
SELECT COUNT(race_winner) FROM table_15187794_1 WHERE no = 12
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...
/* SELECT * FROM POSTS PS WHERE PS.ID IN ( SELECT SUBSTRING(PH.Text,24,CHARINDEX(PH.Text, ']')) FROM Posts P INNER JOIN PostHistory PH ON P.Id=PH.PostId AND PH.PostHistoryTypeId =10 AND PH.Comment=1 WHERE P.ClosedDate IS NOT NULL ) */ SELECT SUBSTRING(PH.Text, STR_POSITION(ph.Text, ''), STR_POSITION(PH.Text, '')) FROM ...
sede
CREATE TABLE projects ( project_id number, project_details text ) CREATE TABLE statements ( statement_id number, statement_details text ) CREATE TABLE documents_with_expenses ( document_id number, budget_type_code text, document_details text ) CREATE TABLE documents ( document_id numb...
SELECT document_type_code FROM documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE table_80237 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average number of cuts made in the Top 25 smaller th...
SELECT AVG("Cuts made") FROM table_80237 WHERE "Top-25" < '5'
wikisql
CREATE TABLE table_10975034_4 ( college VARCHAR, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many colleges have a DB position?
SELECT COUNT(college) FROM table_10975034_4 WHERE position = "DB"
sql_create_context
CREATE TABLE table_40600 ( "Ballarat FL" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of against in Ballarat FL of East Point and wins less than 16?
SELECT SUM("Against") FROM table_40600 WHERE "Ballarat FL" = 'east point' AND "Wins" < '16'
wikisql
CREATE TABLE table_23040 ( "No." real, "Country" text, "Local title" text, "Format" text, "Start Date" text, "End Date" text, "Episodes" real, "Premiere/Air Dates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the production fo...
SELECT "Format" FROM table_23040 WHERE "Local title" = 'Fort Boyard: Ultimate Challenge'
wikisql
CREATE TABLE table_name_89 ( player VARCHAR, finish VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which player finished t35?
SELECT player FROM table_name_89 WHERE finish = "t35"
sql_create_context
CREATE TABLE mzjzjlb_jybgb ( YLJGDM_MZJZJLB text, BGDH number, YLJGDM number ) CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, ...
SELECT COUNT(*) FROM mzjzjlb WHERE mzjzjlb.YLJGDM = '6929712' AND mzjzjlb.JZKSRQ BETWEEN '2014-03-17' AND '2014-10-14' AND mzjzjlb.TXBZ > 0
css
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT hz_info.person_info_JGDM, hz_info.person_info_JGMC, COUNT(hz_info.RYBH) FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE mzjzjlb.JZZDSM = '嗜眠症' GROUP BY hz_info.person_info_JGDM
css
CREATE TABLE table_name_60 ( date VARCHAR, winning_constructor VARCHAR, winning_driver VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the date for bugatti fpr stanislas czaykowski
SELECT date FROM table_name_60 WHERE winning_constructor = "bugatti" AND winning_driver = "stanislas czaykowski"
sql_create_context
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.MED_SER_ORG_NO FROM t_kc21 WHERE t_kc21.PERSON_NM = '袁秀艾' AND t_kc21.IN_HOSP_DATE BETWEEN '2011-08-04' AND '2014-09-24' GROUP BY t_kc21.MED_SER_ORG_NO ORDER BY COUNT(*) DESC LIMIT 1
css
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 jyjgzbb.JCFF 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 W...
css
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, ...
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.dischtime IS NULL AND admissions.age BETWEEN 20 AND 29
mimic_iii
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId ...
SELECT TIME_TO_STR(CreationDate, '%W') AS "week", COUNT(*) AS "comment_count", CASE WHEN TIME_TO_STR(CreationDate, '%W') > 30 THEN 0 ELSE 1000 END AS "hot_meta_posts_enabled" FROM Comments WHERE CreationDate > '2019-04-01' GROUP BY TIME_TO_STR(CreationDate, '%W') ORDER BY TIME_TO_STR(CreationDate, '%W')
sede
CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, ...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program, program_course, semester WHERE program_course.course_id = course.course_id AND program_course.course_id = course.course_id AND program.name LIKE '%CS%' AND program.program_id = program_course.program_id AND semester.sem...
advising
CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH text, KH text, KLX number, MJZH text, HZXM text, NLS number, NLY number, ZSEBZ number, JZZTDM number, JZZTMC text, JZJSSJ time, TXBZ number, ZZBZ number, WDBZ number, JZKSBM text, JZKSMC text, JZKSRQ time, ...
SELECT SG, TZ, TW, SSY, SZY, XL, HXPLC, ML FROM mzjzjlb WHERE JZLSH = '50197380603'
css
CREATE TABLE table_13805 ( "Year" text, "Game" text, "Genre" text, "Platform(s)" text, "Developer(s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the platform(s) for the year 2006 (10th)?
SELECT "Platform(s)" FROM table_13805 WHERE "Year" = '2006 (10th)'
wikisql
CREATE TABLE table_11148 ( "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. -- What was the venue when the home team was Essend...
SELECT "Venue" FROM table_11148 WHERE "Home team" = 'essendon'
wikisql