instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_204_162 ( id number, "team" text, "constructor" text, "motorcycle" text, "tyres" text, "no" number, "rider" text, "rounds" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- are the riders of the camel yamaha team the same...
SELECT (SELECT "rider" FROM table_204_162 WHERE "team" = 'camel yamaha team') = (SELECT "rider" FROM table_204_162 WHERE "team" = 'tech 3 yamaha')
squall
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.short_title = "Int insert lead in vent"
mimicsql_data
CREATE TABLE table_47275 ( "Tournament" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT IS THE 2012 PERFORMANCE FOR THE MADRID MASTERS?
SELECT "2012" FROM table_47275 WHERE "Tournament" = 'madrid masters'
wikisql
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 WHERE demographic.diagnosis = "MORBID OBESITY/SDA" AND demographic.age < "62"
mimicsql_data
CREATE TABLE table_name_96 ( rank VARCHAR, final VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which rank has final with 5:18.85?
SELECT rank FROM table_name_96 WHERE final = "5:18.85"
sql_create_context
CREATE TABLE table_10706879_3 ( name VARCHAR, winning_driver VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the races that johnny rutherford has won?
SELECT name FROM table_10706879_3 WHERE winning_driver = "Johnny Rutherford"
sql_create_context
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, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND lab.label = "Cholesterol, LDL, Calculated"
mimicsql_data
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT demographic.diagnosis, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "84129"
mimicsql_data
CREATE TABLE table_58953 ( "Year" real, "Stage" real, "Category" real, "Start" text, "Finish" text, "Leader at the summit" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the category for the year when Brioude started and the stage is les...
SELECT COUNT("Category") FROM table_58953 WHERE "Start" = 'brioude' AND "Stage" < '7'
wikisql
CREATE TABLE table_name_34 ( label VARCHAR, region VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the label for the UK in 1996?
SELECT label FROM table_name_34 WHERE region = "uk" AND date = "1996"
sql_create_context
CREATE TABLE table_204_250 ( id number, "date" text, "opponent#" text, "rank#" text, "site" text, "result" text, "attendance" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which month is listed the least on this chart ?
SELECT "date" FROM table_204_250 GROUP BY "date" ORDER BY COUNT(*) LIMIT 1
squall
CREATE TABLE table_9745 ( "Tournament" text, "1985" text, "1986" text, "1987" text, "1988" text, "1989" text, "1990" text, "1991" text, "1992" text, "1993" text, "1994" text, "1995" text, "1996" text, "1997" text, "1998" text, "1999" text, "2010" text,...
SELECT "1987" FROM table_9745 WHERE "1999" = 'a' AND "1989" = 'a' AND "1997" = 'a'
wikisql
CREATE TABLE table_204_35 ( id number, "season" text, "tier" number, "division" text, "place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the number of times that they placed 1st ?
SELECT COUNT(*) FROM table_204_35 WHERE "place" = 1
squall
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TI...
SELECT HIRE_DATE, AVG(SALARY) FROM employees
nvbench
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 d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE...
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'lack of coordination') AND STRFTIME('%y', diagnoses_icd.ch...
mimic_iii
CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescript...
SELECT Id AS "post_link", OwnerUserId AS "user_link", CreationDate, LastActivityDate, Score, ViewCount, Body FROM Posts WHERE (CONCAT(LOWER(Title), ' ', LOWER(Body)) LIKE '%##text?analisi##%') ORDER BY CreationDate DESC LIMIT 500
sede
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 JOB_ID, AVG(MANAGER_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY AVG(MANAGER_ID) DESC
nvbench
CREATE TABLE table_62391 ( "Position" real, "Club" text, "Games played" real, "Wins" real, "Draws" real, "Loses" real, "Goals scored" real, "Goals conceded" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the su...
SELECT SUM("Goals scored") FROM table_62391 WHERE "Games played" < '20'
wikisql
CREATE TABLE table_36595 ( "Round" real, "Player" text, "Position" text, "Nationality" text, "College/Junior/Club Team (League)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What nationality is Rob Nicholson?
SELECT "Nationality" FROM table_36595 WHERE "Player" = 'rob nicholson'
wikisql
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, Deletio...
SELECT Answer.Id AS "post_link", Answer.Score AS "score", Answer.CreationDate AS "creation_date" FROM Posts AS Question LEFT JOIN Posts AS Answer ON Question.Id = Answer.ParentId WHERE Answer.OwnerUserId = @MyUserID AND Answer.PostTypeId IN (2, 3) AND NOT Question.Tags LIKE '%' + @Tag + '%' AND UPPER(Question.Body) LIK...
sede
CREATE TABLE table_203_266 ( id number, "group" text, "members" number, "caucusing" number, "total" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the total amount of members in the socialist group not including caucusing members ?
SELECT "members" FROM table_203_266 WHERE "group" = 'socialist group'
squall
CREATE TABLE table_26485957_1 ( artist VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which artist had a result of 4?
SELECT artist FROM table_26485957_1 WHERE result = "4"
sql_create_context
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_ID number ) CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, C...
SELECT t_kc21.CLINIC_ID FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '81127906647'
css
CREATE TABLE member ( member_id number, card_number text, name text, hometown text, level number ) CREATE TABLE purchase ( member_id number, branch_id text, year text, total_pounds number ) CREATE TABLE branch ( branch_id number, name text, open_year text, address_r...
SELECT COUNT(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T2.level = 6
spider
CREATE TABLE table_name_48 ( played INTEGER, first_game VARCHAR, drawn VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average number of games played associated with a first game in 1997 and over 0 games drawn?
SELECT AVG(played) FROM table_name_48 WHERE first_game = 1997 AND drawn > 0
sql_create_context
CREATE TABLE t_kc21 ( 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 COUNT(*) FROM t_kc22 WHERE t_kc22.MED_ORG_DEPT_CD = '83252' AND t_kc22.STA_DATE BETWEEN '2006-07-24' AND '2008-06-06' AND t_kc22.SOC_SRT_DIRE_CD = '913590-q'
css
CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId numb...
WITH firstrev_cte AS (SELECT MIN(ph.Id) AS MinId, p.Id FROM Posts AS p JOIN PostHistory AS ph ON ph.PostId = p.Id WHERE ph.Text LIKE '%<##tagName?divergence-operator##>%' AND ph.PostHistoryTypeId IN (3, 6, 9) GROUP BY p.Id) SELECT ph.PostId AS "post_link", 'site://posts/' + CAST(ph.PostId AS TEXT) + '/revisions' AS "re...
sede
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 T2.Headquarter, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Headquarter ORDER BY T2.Headquarter DESC
nvbench
CREATE TABLE table_name_65 ( crowd INTEGER, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the sum of the crowds at Western Oval?
SELECT SUM(crowd) FROM table_name_65 WHERE venue = "western oval"
sql_create_context
CREATE TABLE table_11630008_6 ( original_air_date VARCHAR, production_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When did the episode with production code 410 air?
SELECT original_air_date FROM table_11630008_6 WHERE production_code = 410
sql_create_context
CREATE TABLE table_name_90 ( year VARCHAR, award VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many times was the award inte awards?
SELECT COUNT(year) FROM table_name_90 WHERE award = "inte awards"
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 prescriptions ( subject_id text, hadm_id...
SELECT demographic.admission_type, lab.label FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.subject_id = "2560"
mimicsql_data
CREATE TABLE table_76488 ( "Rank" real, "Club" text, "Winners" real, "Runners-up" real, "Third" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Third has Runners-up of 0, and Winners of 0, and a Club of far rabat?
SELECT AVG("Third") FROM table_76488 WHERE "Runners-up" = '0' AND "Winners" = '0' AND "Club" = 'far rabat'
wikisql
CREATE TABLE table_7214 ( "Position" real, "Team" text, "Points" real, "Played" real, "Drawn" real, "Lost" real, "Against" real, "Difference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total amount of points when the play...
SELECT SUM("Points") FROM table_7214 WHERE "Played" < '12'
wikisql
CREATE TABLE table_61178 ( "Club" text, "Nickname" text, "Location" text, "Home Ground" text, "GFL Premierships" text, "Years in GFL" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the home ground of the Lions?
SELECT "Home Ground" FROM table_61178 WHERE "Nickname" = 'lions'
wikisql
CREATE TABLE table_40337 ( "Year" real, "Category" text, "Champion" text, "Runner-up" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which category had a year of 1991?
SELECT "Category" FROM table_40337 WHERE "Year" = '1991'
wikisql
CREATE TABLE table_name_15 ( cell_type VARCHAR, conduction_speed__m_s_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which cell type has a conduction speed of 35?
SELECT cell_type FROM table_name_15 WHERE conduction_speed__m_s_ = "35"
sql_create_context
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 HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%'
nvbench
CREATE TABLE table_77447 ( "Game" text, "Date" text, "Opponent" text, "Result" text, "Dolphins' points" text, "Opponents' Points" text, "Record" text, "Streak" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What wa...
SELECT "Attendance" FROM table_77447 WHERE "Opponent" = 'oakland raiders'
wikisql
CREATE TABLE table_8743 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of week 3?
SELECT "Date" FROM table_8743 WHERE "Week" = '3'
wikisql
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code tex...
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 97330 ORDER BY admissions.admittime DESC LIMIT 1
mimic_iii
CREATE TABLE table_name_18 ( hometown_school VARCHAR, team VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the home town of Bob Geren, picked by the San Diego Padres?
SELECT hometown_school FROM table_name_18 WHERE team = "san diego padres" AND player = "bob geren"
sql_create_context
CREATE TABLE table_name_5 ( score INTEGER, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average score with lee westwood as the player?
SELECT AVG(score) FROM table_name_5 WHERE player = "lee westwood"
sql_create_context
CREATE TABLE table_618 ( "Ensemble" text, "Gold Medals" real, "Silver Medals" real, "Bronze Medals" real, "Total Medals" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many gold medals does the Choctawhatchee High School have?
SELECT MAX("Gold Medals") FROM table_618 WHERE "Ensemble" = 'Choctawhatchee High School'
wikisql
CREATE TABLE table_55058 ( "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. -- If the Home team is carlton, what's the lowest C...
SELECT MIN("Crowd") FROM table_55058 WHERE "Home team" = 'carlton'
wikisql
CREATE TABLE table_name_12 ( game INTEGER, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which game had a record of 45-16?
SELECT AVG(game) FROM table_name_12 WHERE record = "45-16"
sql_create_context
CREATE TABLE Dorm ( dormid INTEGER, dorm_name VARCHAR(20), student_capacity INTEGER, gender VARCHAR(1) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREAT...
SELECT gender, COUNT(*) FROM Dorm GROUP BY gender ORDER BY gender
nvbench
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_DIRE_CD text, MED_DIRE_NM text,...
SELECT t_kc21.MED_SER_ORG_NO FROM t_kc21 WHERE t_kc21.PERSON_ID = '31744716' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.SOC_SRT_DIRE_NM = '连花清瘟胶囊')
css
CREATE TABLE table_13112 ( "Elected" text, "Assembled" text, "Dissolved" text, "1st member" text, "2nd member" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Assembled has Elected of 1562/63?
SELECT "Assembled" FROM table_13112 WHERE "Elected" = '1562/63'
wikisql
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose...
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 77177 AND STRFTIME('%y', admissions.admittime) = '2101'
mimic_iii
CREATE TABLE table_52417 ( "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 Home team has an Away team score of 6.9 (4...
SELECT "Home team" FROM table_52417 WHERE "Away team score" = '6.9 (45)'
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 jyjgzbb.YQBH, jyjgzbb.YQMC FROM person_info JOIN hz_info JOIN mzjzjlb 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 = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHE...
css
CREATE TABLE table_16400024_1 ( release_date VARCHAR, part_number_s_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the release date of part 80525py500512bx80525u500512bx80525u500512e?
SELECT release_date FROM table_16400024_1 WHERE part_number_s_ = "80525PY500512BX80525U500512BX80525U500512E"
sql_create_context
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2158" AND procedures.long_title = "Radical neck dissection, unilateral"
mimicsql_data
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 COUNT(*) FROM mzjzjlb JOIN hz_info_mzjzjlb JOIN hz_info ON hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.mzjzjlb_id = mzjzjlb.mzjzjlb_id AND hz_info_mzjzjlb.YLJGDM = hz_info.YLJGDM WHERE hz_info.YLJGDM = '00...
css
CREATE TABLE table_53104 ( "Race" text, "Circuit" text, "Date" text, "Pole position" text, "Fastest lap" text, "Winning driver" text, "Constructor" text, "Tyre" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What drive...
SELECT "Winning driver" FROM table_53104 WHERE "Pole position" = 'joakim bonnier'
wikisql
CREATE TABLE table_name_84 ( player VARCHAR, jersey_number_s_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who has a Jersey number of 31?
SELECT player FROM table_name_84 WHERE jersey_number_s_ = "31"
sql_create_context
CREATE TABLE table_name_54 ( year INTEGER, location VARCHAR, winner VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT YEAR WAS AT GIANTS STADIUM, WITH WINNER OF NEW YORK GIANTS?
SELECT MIN(year) FROM table_name_54 WHERE location = "giants stadium" AND winner = "new york giants"
sql_create_context
CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CRE...
SELECT * FROM Posts WHERE PostTypeId = 1 AND (Score < -1 OR NOT ClosedDate IS NULL OR NOT DeletionDate IS NULL)
sede
CREATE TABLE table_169955_1 ( months_in_malayalam_era VARCHAR, in_malayalam VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the months in the malayalam era for
SELECT months_in_malayalam_era FROM table_169955_1 WHERE in_malayalam = "കുംഭം"
sql_create_context
CREATE TABLE customer_orders ( order_id number, customer_id number, order_status text, order_date time, order_details text ) CREATE TABLE order_items ( order_id number, product_id number, order_quantity text ) CREATE TABLE customer_addresses ( customer_id number, address_id num...
SELECT customer_name FROM customers WHERE payment_method = "Cash"
spider
CREATE TABLE table_16441561_5 ( cfl_team VARCHAR, college VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which CFL team did the player from British Columbia get drafted to
SELECT cfl_team FROM table_16441561_5 WHERE college = "British Columbia"
sql_create_context
CREATE TABLE table_204_294 ( id number, "date" text, "time" text, "opponent#" text, "rank#" text, "site" text, "tv" text, "result" text, "attendance" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the nebraska cornhuskers ...
SELECT MIN("rank#") FROM table_204_294
squall
CREATE TABLE table_name_51 ( years VARCHAR, goals VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What years had players who scored 36 goals?
SELECT years FROM table_name_51 WHERE goals = "36"
sql_create_context
CREATE TABLE table_16295365_1 ( conference VARCHAR, school VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which conference is Belmont in?
SELECT conference FROM table_16295365_1 WHERE school = "Belmont"
sql_create_context
CREATE TABLE table_74385 ( "Year" real, "Network" text, "Play-by-play announcers" text, "s Color commentator" text, "Pregame hosts" text, "Pregame analysts" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the s color commentator when the p...
SELECT "s Color commentator" FROM table_74385 WHERE "Pregame hosts" = 'Jon Sciambi'
wikisql
CREATE TABLE table_name_51 ( home_team VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the home side when north melbourne is the away side?
SELECT home_team FROM table_name_51 WHERE away_team = "north melbourne"
sql_create_context
CREATE TABLE table_65882 ( "Source" text, "Chrome" text, "Internet Explorer" text, "Firefox" text, "Safari" text, "Opera" text, "Other" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- According to W3Counter, what percentage of browsers used F...
SELECT "Firefox" FROM table_65882 WHERE "Source" = 'w3counter'
wikisql
CREATE TABLE table_3976 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the cfl team for robert beveridge
SELECT "CFL Team" FROM table_3976 WHERE "Player" = 'Robert Beveridge'
wikisql
CREATE TABLE table_18940 ( "Club" text, "Played" text, "Won" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text ) -- Using valid SQLite, answer the follo...
SELECT "Won" FROM table_18940 WHERE "Try bonus" = '10'
wikisql
CREATE TABLE table_name_63 ( rank VARCHAR, s_wicket VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which rank is 40 for s Wicket with a player of Daniel Marsh?
SELECT rank FROM table_name_63 WHERE s_wicket = "40" AND player = "daniel marsh"
sql_create_context
CREATE TABLE table_name_31 ( tournament VARCHAR, extra VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what tournament was there an extra of 400 m hurdles?
SELECT tournament FROM table_name_31 WHERE extra = "400 m hurdles"
sql_create_context
CREATE TABLE table_name_91 ( year INTEGER, chassis VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average year for a merzario a2 chassis?
SELECT AVG(year) FROM table_name_91 WHERE chassis = "merzario a2"
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "S/P FALL" AND demographic.dob_year < "2085"
mimicsql_data
CREATE TABLE table_67162 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What place does Fred Funk, who has a score of 69-69=138, have?
SELECT "Place" FROM table_67162 WHERE "Score" = '69-69=138' AND "Player" = 'fred funk'
wikisql
CREATE TABLE table_3113 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the original air d...
SELECT "Original air date" FROM table_3113 WHERE "Title" = 'The Boss'
wikisql
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 Headquarter, Revenue FROM Manufacturers ORDER BY Revenue DESC
nvbench
CREATE TABLE table_12072 ( "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 highest number of wins that has a top-25 of 13 and e...
SELECT MAX("Wins") FROM table_12072 WHERE "Top-25" = '13' AND "Events" < '32'
wikisql
CREATE TABLE table_204_698 ( id number, "name" text, "lifetime" text, "nationality" text, "notable as" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- patricia velasquez and ron vawter both had what career ?
SELECT "notable as" FROM table_204_698 WHERE "name" = 'patricia velasquez' INTERSECT SELECT "notable as" FROM table_204_698 WHERE "name" = 'ron vawter'
squall
CREATE TABLE schedule ( Cinema_ID int, Film_ID int, Date text, Show_times_per_day int, Price float ) CREATE TABLE cinema ( Cinema_ID int, Name text, Openning_year int, Capacity int, Location text ) CREATE TABLE film ( Film_ID int, Rank_in_series int, Number_in_seaso...
SELECT Date, SUM(Price) FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID JOIN cinema AS T3 ON T1.Cinema_ID = T3.Cinema_ID GROUP BY Date ORDER BY Date
nvbench
CREATE TABLE tourist_attraction_features ( tourist_attraction_id number, feature_id number ) CREATE TABLE visits ( visit_id number, tourist_attraction_id number, tourist_id number, visit_date time, visit_details text ) CREATE TABLE shops ( shop_id number, shop_details text ) CREAT...
SELECT other_hotel_details FROM hotels ORDER BY price_range DESC LIMIT 3
spider
CREATE TABLE table_56470 ( "Driver" text, "Constructor" text, "Laps" real, "Time/retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many grids have a Constructor of talbot-lago - talbot, a Laps under 83, and a driver of johnny ...
SELECT COUNT("Grid") FROM table_56470 WHERE "Constructor" = 'talbot-lago - talbot' AND "Laps" < '83' AND "Driver" = 'johnny claes'
wikisql
CREATE TABLE table_name_12 ( race VARCHAR, distance VARCHAR, winner_or_2nd VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the race with a 10f distance and mollison as the winner or 2nd?
SELECT race FROM table_name_12 WHERE distance = "10f" AND winner_or_2nd = "mollison"
sql_create_context
CREATE TABLE table_name_32 ( date VARCHAR, result VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date has w 20-17 as the result, and 1-0 as the record?
SELECT date FROM table_name_32 WHERE result = "w 20-17" AND record = "1-0"
sql_create_context
CREATE TABLE table_name_41 ( entrant VARCHAR, year INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the entrant before 1988?
SELECT entrant FROM table_name_41 WHERE year < 1988
sql_create_context
CREATE TABLE table_204_784 ( id number, "player" text, "league" number, "cup" number, "europa league" number, "total" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who was the top goalscorer on this team ?
SELECT "player" FROM table_204_784 WHERE id = 1
squall
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 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 '2014-06-18' AND '2014-12-24' AND t_kc22.SOC_SRT_DIRE_NM = '氟哌噻吨美利曲辛片' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE fg...
css
CREATE TABLE table_8575 ( "Region" text, "Date" text, "Label" text, "Format" text, "Catalog" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What label is from the Region of Spain?
SELECT "Label" FROM table_8575 WHERE "Region" = 'spain'
wikisql
CREATE TABLE table_69999 ( "Tournament" text, "Wins" real, "Top-25" real, "Events" real, "Cuts made" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- During the PGA Championship, what's the lowest amount of events with wins greater than 0?
SELECT MIN("Events") FROM table_69999 WHERE "Tournament" = 'pga championship' AND "Wins" > '0'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE vitalperiodi...
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-62326' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospi...
eicu
CREATE TABLE table_36124 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When has Score of 4 5 and quebec nordiques as Visitor?
SELECT "Date" FROM table_36124 WHERE "Score" = '4–5' AND "Visitor" = 'quebec nordiques'
wikisql
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_NM = '苗慧捷' AND t_kc22.STA_DATE BETWEEN '2004-08-29' AND '2014-05-22' AND t_kc22.SELF_PAY_PRO < 0.71
css
CREATE TABLE table_27927185_1 ( originalairdate VARCHAR, viewers__millions_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the original air-date that had 4.77 million viewers?
SELECT originalairdate FROM table_27927185_1 WHERE viewers__millions_ = "4.77"
sql_create_context
CREATE TABLE table_name_29 ( points__percentage VARCHAR, total_w_l_h VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT IS THE POINTS PERCENTAGE WITH A TOTAL OF 1-2-2 RECORD?
SELECT points__percentage FROM table_name_29 WHERE total_w_l_h = "1-2-2"
sql_create_context
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE Comments ( Id num...
SELECT answer.Id AS "post_link", * FROM Posts AS answer JOIN Posts AS p ON answer.ParentId = p.Id JOIN PostHistory AS ph ON ph.PostId = p.Id JOIN PostTypes AS pt ON p.PostTypeId = pt.Id WHERE ph.CreationDate = (SELECT MAX(ph.CreationDate) FROM PostHistory AS ph JOIN CloseReasonTypes AS crt ON crt.Id = ph.Comment JOIN P...
sede
CREATE TABLE table_13919 ( "Position" text, "Gymnast" text, "A Score" real, "B Score" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me the total number of Total that has the B Score of 9.15?
SELECT COUNT("Total") FROM table_13919 WHERE "B Score" = '9.15'
wikisql
CREATE TABLE table_77335 ( "C/W 15+" real, "Oblast\\Age" text, "15 to 17" real, "18 to 19" real, "20 to 24" real, "25 to 29" real, "30 to 34" real, "35 to 39" real, "40 to 44" real, "45 to 49" real, "50 to 54" real, "55 to 59" real, "60 to 64" real, "65 to 69" rea...
SELECT SUM("60 to 64") FROM table_77335 WHERE "Oblast\\Age" = 'nenets in yamal ao' AND "45 to 49" > '3,883'
wikisql
CREATE TABLE table_37190 ( "Ship" text, "Hull No." text, "Builder" text, "Home Port" text, "Commissioned\u2013 Decommissioned" text, "NVR page" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the ship for oakland home port and NVR page of ao...
SELECT "Ship" FROM table_37190 WHERE "Home Port" = 'oakland' AND "NVR page" = 'aor-3'
wikisql
CREATE TABLE table_64079 ( "Year" real, "Category" text, "Film" text, "Result" text, "Lost to" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which Film has a Category of best actress musical or comedy, and a Lost to of nicole kidman ( moulin rouge!...
SELECT "Film" FROM table_64079 WHERE "Category" = 'best actress – musical or comedy' AND "Lost to" = 'nicole kidman ( moulin rouge! )'
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 jyjgzbb ( BGDH text, BGRQ tim...
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZ...
css