instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE Organisation_Types ( organisation_type VARCHAR(10), organisation_type_description VARCHAR(255) ) CREATE TABLE Grants ( grant_id INTEGER, organisation_id INTEGER, grant_amount DECIMAL(19,4), grant_start_date DATETIME, grant_end_date DATETIME, other_details VARCHAR(255) ) CR...
SELECT T2.organisation_details, T1.organisation_id FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_details ORDER BY T2.organisation_details
nvbench
CREATE TABLE table_68602 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which opponent has a record of 17-11?
SELECT "Opponent" FROM table_68602 WHERE "Record" = '17-11'
wikisql
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0...
SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY AVG(MANAGER_ID)
nvbench
CREATE TABLE table_name_44 ( address VARCHAR, mascot VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the address for the school that has the coyotes mascot?
SELECT address FROM table_name_44 WHERE mascot = "coyotes"
sql_create_context
CREATE TABLE table_name_12 ( Block INTEGER, assists VARCHAR, total_blocks VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When assists is more than 32 and total blocks is more than 88, what is the total of block assists?
SELECT SUM(Block) AS assists FROM table_name_12 WHERE assists > 32 AND total_blocks > 88
sql_create_context
CREATE TABLE table_3342 ( "Settlement" text, "Cyrillic Name" text, "Type" text, "Population (2011)" real, "Largest ethnic group (2002)" text, "Dominant religion (2002)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the largest ethnic gr...
SELECT "Largest ethnic group (2002)" FROM table_3342 WHERE "Cyrillic Name" = 'Брестач'
wikisql
CREATE TABLE table_18143210_2 ( number_of_seasons_in_liga_mx VARCHAR, first_season_of_current_spell_in_top_division VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many 'number of season in Liga MX' were played if the 'first season of current spell in top...
SELECT number_of_seasons_in_liga_mx FROM table_18143210_2 WHERE first_season_of_current_spell_in_top_division = "1962-63"
sql_create_context
CREATE TABLE postseason ( team_id_winner VARCHAR, year VARCHAR ) CREATE TABLE team ( name VARCHAR, team_id_br VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the name and id of the team with the most victories in 2008 postseason?
SELECT T2.name, T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T1.year = 2008 GROUP BY T1.team_id_winner ORDER BY COUNT(*) DESC LIMIT 1
sql_create_context
CREATE TABLE Activity ( actid INTEGER, activity_name varchar(25) ) CREATE TABLE Faculty_Participates_in ( FacID INTEGER, actid INTEGER ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, ...
SELECT Fname, COUNT(*) FROM Faculty AS T1 JOIN Faculty_Participates_in AS T2 ON T1.FacID = T2.FacID GROUP BY T1.FacID ORDER BY Fname
nvbench
CREATE TABLE table_name_36 ( date VARCHAR, crowd INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the attendance at a venue bigger than 35,151?
SELECT date FROM table_name_36 WHERE crowd > 35 OFFSET 151
sql_create_context
CREATE TABLE match_result ( Rank int, Club_ID int, Gold int, Big_Silver int, Small_Silver int, Bronze int, Points int ) CREATE TABLE coach ( Coach_ID int, Coach_name text, Gender text, Club_ID int, Rank int ) CREATE TABLE club ( Club_ID int, Club_name text, ...
SELECT Gender, COUNT(Gender) FROM player GROUP BY Gender ORDER BY Gender DESC
nvbench
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 wdmzjzjlb.JZLSH FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE hz_info.RYBH = '14284593' AND hz_info.YLJGDM = '6828719' AND NOT wdmzjzjlb.JZKSMC LIKE '%心血管病%' UNION SELECT bdmzjzjlb.JZLSH FROM hz_info JOIN bdmzjzjlb ON hz_info....
css
CREATE TABLE mzjzjlb_jybgb ( YLJGDM_MZJZJLB text, BGDH number, YLJGDM number ) 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, X...
SELECT COUNT(*) FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '窦碧玉' AND mzjzjlb.JZKSRQ BETWEEN '2001-08-28' AND '2006-01-01' AND mzjzjlb.YLJGDM = '9175260'
css
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_labitems ( row_id number, itemid number, label text ) CREATE TABLE outputevents ( row_id number, subject_id number, ...
SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 83182 AND admissions.dischtime IS NULL) ORDER BY prescriptions.startdate DESC LIMIT 1
mimic_iii
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "Mv collision NOS-driver"
mimicsql_data
CREATE TABLE table_14560 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which opponent has a Date of april 14?
SELECT "Opponent" FROM table_14560 WHERE "Date" = 'april 14'
wikisql
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimme...
SELECT meter_600, ID FROM swimmer ORDER BY meter_600
nvbench
CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, ...
SELECT MIN(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25814)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arte...
mimic_iii
CREATE TABLE Dorm_amenity ( amenid INTEGER, amenity_name VARCHAR(25) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Lives_in ( stuid INTEGER, ...
SELECT city_code, COUNT(*) FROM Student GROUP BY city_code ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE Ref_Transaction_Types ( transaction_type_description VARCHAR, transaction_type_code VARCHAR ) CREATE TABLE TRANSACTIONS ( date_of_transaction VARCHAR, transaction_type_code VARCHAR, share_count INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided ab...
SELECT T1.transaction_type_description, T2.date_of_transaction FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code WHERE T2.share_count < 10
sql_create_context
CREATE TABLE table_22824 ( "Team #1" text, "Agg. score" text, "Team #2" text, "1st leg" text, "2nd leg" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the 2nd leg result in the round where Panionios is team #2?
SELECT "2nd leg" FROM table_22824 WHERE "Team #2" = 'Panionios'
wikisql
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT prescriptions.drug_type, prescriptions.route FROM prescriptions WHERE prescriptions.formulary_drug_cd = "SOLN2"
mimicsql_data
CREATE TABLE table_63664 ( "Restaurant Name" text, "Original Name" text, "Location" text, "Chef" text, "Designer" text, "Still Open?" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the location when the designer is glen peloso and the re...
SELECT "Location" FROM table_63664 WHERE "Designer" = 'glen peloso' AND "Restaurant Name" = 'joe boo''s cookoos'
wikisql
CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adults INTEGER, Kids INTEGER ) CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, baseP...
SELECT bedType, COUNT(*) FROM Rooms GROUP BY bedType ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE table_70593 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which entrant scored less than 8 points and used a Maserati chassis?
SELECT "Entrant" FROM table_70593 WHERE "Points" < '8' AND "Chassis" = 'maserati'
wikisql
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE wdmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, K...
SELECT wdmzjzjlb.JZJSSJ FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '81008457398' UNION SELECT bdmzjzjlb.JZJSSJ FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '81008457398'
css
CREATE TABLE table_name_54 ( zone INTEGER, stations VARCHAR, platforms VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the average zone for waddon railway station and has more than 2 platforms
SELECT AVG(zone) FROM table_name_54 WHERE stations = "waddon railway station" AND platforms > 2
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( ...
SELECT AVG(demographic.age) FROM demographic WHERE demographic.insurance = "Government" AND demographic.days_stay = "1"
mimicsql_data
CREATE TABLE table_name_22 ( location VARCHAR, time VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Location when the time was 11:55?
SELECT location FROM table_name_22 WHERE time = "11:55"
sql_create_context
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
SELECT jybgb.SQRGH, jybgb.SQRXM FROM jybgb WHERE jybgb.JZLSH = '05077547937' GROUP BY jybgb.SQRGH HAVING COUNT(*) > 2
css
CREATE TABLE table_25353861_5 ( rebounds VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many rebounds did Tammy Sutton-Brown have?
SELECT rebounds FROM table_25353861_5 WHERE player = "Tammy Sutton-Brown"
sql_create_context
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON 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 AND jybgb.BGDH = jy...
css
CREATE TABLE department ( name VARCHAR, num_employees VARCHAR, department_id VARCHAR ) CREATE TABLE management ( department_id VARCHAR, temporary_acting VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show the name and number of employees for the...
SELECT T1.name, T1.num_employees FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id WHERE T2.temporary_acting = 'Yes'
sql_create_context
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT demographic.admission_location, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Dominga Garvin"
mimicsql_data
CREATE TABLE vocals ( songid VARCHAR ) CREATE TABLE songs ( title VARCHAR, songid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find all the songs that do not have a lead vocal.
SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = "lead"
sql_create_context
CREATE TABLE table_62376 ( "1999/ 00" text, "2000/ 01" text, "2001/ 02" text, "2002/ 03" text, "2003/ 04" text, "2004/ 05" text, "2005/ 06" text, "2006/ 07" text, "2007/ 08" text, "2008/ 09" text, "2009/ 10" text, "2010/ 11" text, "2011/ 12" text, "2012/ 13" text ...
SELECT "2010/ 11" FROM table_62376 WHERE "2011/ 12" = 'former non-ranking tournaments'
wikisql
CREATE TABLE table_36358 ( "Virtue" text, "Latin" text, "Gloss" text, "(Vice)" text, "(Latin)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which virtue is acedia(Latin)?
SELECT "Virtue" FROM table_36358 WHERE "(Latin)" = 'acedia'
wikisql
CREATE TABLE table_name_20 ( home_team VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the home team's score at Corio Oval?
SELECT home_team AS score FROM table_name_20 WHERE venue = "corio oval"
sql_create_context
CREATE TABLE table_5157 ( "Driver" text, "Team" text, "Laps" real, "Time/Retired" text, "Grid" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Grid has a Driver of cristiano da matta, and Points smaller than 33?
SELECT SUM("Grid") FROM table_5157 WHERE "Driver" = 'cristiano da matta' AND "Points" < '33'
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 COUNT(*) FROM (SELECT t_kc21.MED_ORG_DEPT_CD FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '7452450' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2006-09-03' AND '2007-05-05' GROUP BY t_kc21.MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) > 5876.89) AS T
css
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 WHERE demographic.marital_status = "MARRIED" AND demographic.diagnosis = "LEFT INTERNAL JUGULAR VEIN THROMBOSIS;LEFT ARM EDEMA"
mimicsql_data
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDa...
SELECT * FROM Users WHERE Location LIKE '%Frederick, MD%' ORDER BY Reputation DESC
sede
CREATE TABLE table_71853 ( "Matches" real, "Innings" real, "Not Out" real, "High Score" text, "Runs" real, "Average" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the match total for a score over 299 and under 412 innings?
SELECT SUM("Matches") FROM table_71853 WHERE "High Score" = '299' AND "Innings" < '412'
wikisql
CREATE TABLE table_203_323 ( id number, "city" text, "country" text, "airport" text, "begin" number, "end" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which two destinations were available for less than one year ?
SELECT "city" FROM table_203_323 WHERE "end" - "begin" < 1
squall
CREATE TABLE table_71438 ( "Election" text, "1st Member" text, "1st Party" text, "2nd Member" text, "2nd Party" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 1st party with Charles Isaac Elton as the 2nd member?
SELECT "1st Party" FROM table_71438 WHERE "2nd Member" = 'charles isaac elton'
wikisql
CREATE TABLE table_11121 ( "Year" real, "Tournament" text, "Venue" text, "Result" text, "Extra" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year is the event in athens, greece?
SELECT MAX("Year") FROM table_11121 WHERE "Venue" = 'athens, greece'
wikisql
CREATE TABLE table_70957 ( "Parties and voter communities" text, "% 2006" real, "seats 2006" real, "% 2001" real, "seats 2001" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When seats for 2001 is greater than 15 and % 2001 is greater than 100, what...
SELECT AVG("% 2006") FROM table_70957 WHERE "seats 2001" > '15' AND "% 2001" > '100'
wikisql
CREATE TABLE table_name_61 ( round VARCHAR, tournament VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Round, when Tournament is 'Paris'?
SELECT round FROM table_name_61 WHERE tournament = "paris"
sql_create_context
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE SuggestedEdits ( Id number, ...
SELECT a.Id AS "post_link", a.Score, au.Id AS "user_link" FROM Posts AS p JOIN Posts AS a ON p.Id = a.ParentId JOIN Users AS au ON a.OwnerUserId = au.Id WHERE p.PostTypeId = 1 AND p.OwnerUserId = '##UserId##' ORDER BY a.Score DESC
sede
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) 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), CO...
SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY SUM(EMPLOYEE_ID)
nvbench
CREATE TABLE table_11545282_10 ( no VARCHAR, school_club_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What number does the player from Ohio play with?
SELECT no FROM table_11545282_10 WHERE school_club_team = "Ohio"
sql_create_context
CREATE TABLE table_13951 ( "Date" text, "Tournament" text, "Surface" text, "Opponent in the final" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the date for the tournament jou -l s-tours?
SELECT "Date" FROM table_13951 WHERE "Tournament" = 'joué-lès-tours'
wikisql
CREATE TABLE table_2150 ( "Shekhina:" text, "Reason" text, "Mind" text, "Intelligence" text, "Thought" text, "Understanding" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the intelligence os the one that has s , 'thought'?
SELECT "Intelligence" FROM table_2150 WHERE "Thought" = '思 sī, "thought'
wikisql
CREATE TABLE table_name_78 ( points INTEGER, goals VARCHAR, assists VARCHAR, games VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the goals scored were below 6, 11 games were played, and there were 7 assists, what's the sum of points with games me...
SELECT SUM(points) FROM table_name_78 WHERE assists = 7 AND games = 11 AND goals < 6
sql_create_context
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 mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND pers...
css
CREATE TABLE table_name_12 ( rider VARCHAR, speed VARCHAR, time VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Rider had a Speed of 108.347mph and Time of 1:02.40.93?
SELECT rider FROM table_name_12 WHERE speed = "108.347mph" AND time = "1:02.40.93"
sql_create_context
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), ...
SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%'
nvbench
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
SELECT chartevents.charttime FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 1902)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart rat...
mimic_iii
CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE...
SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(SALARY)
nvbench
CREATE TABLE table_name_26 ( SLM INTEGER, built INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What locomotive built after 1895 has the highest SLM number?
SELECT MAX(SLM) AS number FROM table_name_26 WHERE built > 1895
sql_create_context
CREATE TABLE table_name_21 ( round VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the round when the match was against sergis kyratzis?
SELECT round FROM table_name_21 WHERE opponent = "sergis kyratzis"
sql_create_context
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
SELECT ACC_Road, SUM(School_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY ACC_Road
nvbench
CREATE TABLE table_name_23 ( time_of_broadcast VARCHAR, days_of_the_week VARCHAR, picture_format VARCHAR, hours VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the Time of broadcast has a Picture format of 4:3, and Hours of 20:30, and Days of the...
SELECT time_of_broadcast FROM table_name_23 WHERE picture_format = "4:3" AND hours = "20:30" AND days_of_the_week = "monday, wednesday, friday"
sql_create_context
CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar, wide_body varchar, wing_span int, length int, weight int, capacity int, pay_load int, cruising_speed int, range_...
SELECT DISTINCT flight.flight_id FROM airport_service, city, 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 ((DATE_DAY_0.day_number = 22 AND DATE_DAY_0.month_number = 3 AND DATE_DAY_0.year = 1991 AND...
atis
CREATE TABLE table_203_245 ( id number, "year" number, "competition" text, "venue" text, "position" text, "event" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many total international races did german silva place in the t...
SELECT COUNT("competition") FROM table_203_245 WHERE "position" <= 3
squall
CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDispl...
SELECT *, 'http://stackoverflow.com/questions/' + QuestionId + '/#comment' + CommentId + '_' + QuestionId AS Url FROM (SELECT COALESCE(Q.Title, Posts.Title) AS Question, Comments.UserDisplayName AS Commenter, Text AS Comment, Posts.OwnerDisplayName AS Poster, PostTypes.Name AS "post_type", Posts.CreationDate, CAST(Comm...
sede
CREATE TABLE table_name_54 ( rank_by_average INTEGER, total VARCHAR, place VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Rank by average is the lowest one that has a Total of 425, and a Place larger than 1?
SELECT MIN(rank_by_average) FROM table_name_54 WHERE total = 425 AND place > 1
sql_create_context
CREATE TABLE table_name_40 ( termini VARCHAR, population_area VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What termini does the route with a population Area of aguilares have?
SELECT termini FROM table_name_40 WHERE population_area = "aguilares"
sql_create_context
CREATE TABLE mzjzjlb_jybgb ( YLJGDM_MZJZJLB text, BGDH number, YLJGDM number ) CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time...
SELECT jybgb.SQRGH, jybgb.SQRXM FROM jybgb WHERE jybgb.JZLSH = '70939777652' GROUP BY jybgb.SQRGH HAVING COUNT(*) > 12
css
CREATE TABLE table_204_311 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the total number of bronze medals won by france ?
SELECT "bronze" FROM table_204_311 WHERE "nation" = 'france'
squall
CREATE TABLE table_55461 ( "Year" real, "Player" text, "Position" text, "College/Country" text, "WNBA Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Regarding players before 2000, what is the USC player's position?
SELECT "Position" FROM table_55461 WHERE "Year" < '2000' AND "College/Country" = 'usc'
wikisql
CREATE TABLE table_203_420 ( id number, "#" number, "stadium" text, "capacity" number, "city" text, "home team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many stadiums have a capacity between 6000 and 8000 ?
SELECT COUNT("stadium") FROM table_203_420 WHERE "capacity" >= 6000 AND "capacity" <= 8000
squall
CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, night text, season text, basis_days text ) CREATE TABLE equipment_sequence ( aircr...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ((CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'NASHVILLE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'TA...
atis
CREATE TABLE table_29135051_3 ( broadcast_date VARCHAR, guest_s_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- when was the episode on which barbara windsor and heston blumenthal guest starred broadcasted
SELECT broadcast_date FROM table_29135051_3 WHERE guest_s_ = "Barbara Windsor and Heston Blumenthal"
sql_create_context
CREATE TABLE table_71618 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the year with a kurtis kraft 500a chassis?
SELECT SUM("Year") FROM table_71618 WHERE "Chassis" = 'kurtis kraft 500a'
wikisql
CREATE TABLE table_2544694_3 ( indonesia_super_series_2008 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which series occurred when the 7800 was 5040.00?
SELECT indonesia_super_series_2008 FROM table_2544694_3 WHERE 780000 = "5040.00"
sql_create_context
CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, countr...
SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%Thermodynamics and Kinetics%' OR name LIKE '%Thermodynamics and Kinetics%') AND credits = 9
advising
CREATE TABLE table_name_12 ( tally VARCHAR, opposition VARCHAR, total VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the tally when the opposition is Derry, and total is 14?
SELECT tally FROM table_name_12 WHERE opposition = "derry" AND total = 14
sql_create_context
CREATE TABLE table_71198 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which opponent has a Time of 1:34?
SELECT "Opponent" FROM table_71198 WHERE "Time" = '1:34'
wikisql
CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDispl...
SELECT Id, DisplayName, Reputation, WebsiteUrl, Location FROM Users WHERE Location LIKE '%Michigan%' ORDER BY Reputation DESC LIMIT 150
sede
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.days_stay > "13" AND procedures.short_title = "Endosc destr stomach les"
mimicsql_data
CREATE TABLE table_25080 ( "Year" real, "Network" text, "Race caller" text, "s Host" text, "s Analyst" text, "Reporters" text, "Trophy presentation" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the race caller when jim mckay and al ...
SELECT "Race caller" FROM table_25080 WHERE "s Host" = 'Jim McKay and Al Michaels' AND "Year" = '1987'
wikisql
CREATE TABLE department ( dept_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- list names of all departments ordered by their names.
SELECT dept_name FROM department ORDER BY dept_name
sql_create_context
CREATE TABLE table_name_79 ( grid VARCHAR, time_retired VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the grid when the time/retired is +27.112?
SELECT grid FROM table_name_79 WHERE time_retired = "+27.112"
sql_create_context
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE intakeoutput ( intakeoutputid numb...
SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 40 AND 49) AND DATETIME(treatment.treatmenttime, 'start of year') = DATETIME(CURRENT...
eicu
CREATE TABLE table_39669 ( "Date" text, "Time" text, "Visitor" text, "Score" text, "Home" text, "Location/Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the visitor at the pittsburgh penguins at 7:00 pm tha...
SELECT "Visitor" FROM table_39669 WHERE "Home" = 'pittsburgh penguins' AND "Time" = '7:00 pm' AND "Record" = '0-2-2'
wikisql
CREATE TABLE table_name_8 ( result VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score of the game on November 22?
SELECT result FROM table_name_8 WHERE date = "november 22"
sql_create_context
CREATE TABLE table_203_629 ( id number, "year" number, "title" text, "lead vocalist" text, "aria chart position" number, "album" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who was the lead vocalist in sweat it out ?
SELECT "lead vocalist" FROM table_203_629 WHERE "title" = '"sweat it out"'
squall
CREATE TABLE table_name_94 ( partner VARCHAR, opponents_in_the_final VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the partner that played against Serena Williams Venus Williams?
SELECT partner FROM table_name_94 WHERE opponents_in_the_final = "serena williams venus williams"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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,...
SELECT jybgb.SHSJ FROM hz_info JOIN mzjzjlb JOIN jybgb ON 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 WHERE hz_info.RYBH = '17320230' AND jybgb.BGRQ BETWEEN '2013-09-23' AND '2019-11-29' UNION...
css
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 DISTINCT course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (course.number = 532 OR course.number = 481) AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 INNER JOIN course AS COURSEalias1 ON ...
advising
CREATE TABLE table_name_3 ( episode_title VARCHAR, prod_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the title of the episode with a production code of 1gowo04?
SELECT episode_title FROM table_name_3 WHERE prod_code = "1gowo04"
sql_create_context
CREATE TABLE table_name_83 ( opening VARCHAR, result VARCHAR, white VARCHAR, moves VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the opening when white is Anand with fewer than 61 moves for a result of ?
SELECT opening FROM table_name_83 WHERE white = "anand" AND moves < 61 AND result = "½–½"
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 COUNT(*) FROM (SELECT t_kc21.MED_ORG_DEPT_CD FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '1423006' GROUP BY t_kc21.MED_ORG_DEPT_CD HAVING AVG(t_kc21.IN_HOSP_DAYS) > 30) AS T
css
CREATE TABLE Residents_Services ( resident_id INTEGER, service_id INTEGER, date_moved_in DATETIME, property_id INTEGER, date_requested DATETIME, date_provided DATETIME, other_details VARCHAR(255) ) CREATE TABLE Timed_Locations_of_Things ( thing_id INTEGER, Date_and_Time DATETIME, ...
SELECT organization_details, COUNT(organization_details) FROM Things AS T1 JOIN Organizations AS T2 ON T1.organization_id = T2.organization_id GROUP BY organization_details ORDER BY organization_details
nvbench
CREATE TABLE stock ( shop_id number, device_id number, quantity number ) CREATE TABLE device ( device_id number, device text, carrier text, package_version text, applications text, software_platform text ) CREATE TABLE shop ( shop_id number, shop_name text, location tex...
SELECT T2.shop_name FROM stock AS T1 JOIN shop AS T2 ON T1.shop_id = T2.shop_id GROUP BY T1.shop_id ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE table_4985 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who did he fight in Rumble of the Kings 6?
SELECT "Opponent" FROM table_4985 WHERE "Event" = 'rumble of the kings 6'
wikisql
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 = "CORONARY ARTERY DISEASE" AND demographic.dob_year < "2107"
mimicsql_data
CREATE TABLE table_name_65 ( film_title_used_in_nomination VARCHAR, original_title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the film title used for nomination with the original title sedamdeset i dva dana?
SELECT film_title_used_in_nomination FROM table_name_65 WHERE original_title = "sedamdeset i dva dana"
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 Id, DisplayName, Reputation FROM Users ORDER BY Reputation DESC LIMIT 10
sede