instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_90 ( crowd INTEGER, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Fitzroy's Home team Crowd?
SELECT SUM(crowd) FROM table_name_90 WHERE home_team = "fitzroy"
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 * FROM person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE person_info.XM = '姜逸春' AND hz_info.YLJGDM = '3708794' AND NOT zyjzjlb.JZKSMC LIKE '%药房%'
css
CREATE TABLE table_65573 ( "Week 1" text, "Week 3" text, "Week 4" text, "Week 6" text, "Week 7" text, "Week 8" text, "Week 9" text, "Week 10" text, "Final Week 12" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who did the housemate ...
SELECT "Week 8" FROM table_65573 WHERE "Week 1" = 'carol roopali'
wikisql
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE outputevents...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissi...
mimic_iii
CREATE TABLE table_3059 ( "Name of Award" text, "Name of Film" text, "Language" text, "Awardee(s)" text, "Cash Prize" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number of awardees for best screenplay
SELECT COUNT("Awardee(s)") FROM table_3059 WHERE "Name of Award" = 'Best Screenplay'
wikisql
CREATE TABLE table_name_80 ( olympics_so_far INTEGER, class VARCHAR, sailors VARCHAR, first_og VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest value for Olympics, when Sailors is greater than 1, when First OG is after 1948, and when...
SELECT MIN(olympics_so_far) FROM table_name_80 WHERE sailors > 1 AND first_og > 1948 AND class = "flying dutchman"
sql_create_context
CREATE TABLE table_70779 ( "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 most points that the Maserati 250F chassis scored in years after 1955?
SELECT MAX("Points") FROM table_70779 WHERE "Chassis" = 'maserati 250f' AND "Year" > '1955'
wikisql
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 t1.drug FROM (SELECT prescriptions.drug, COUNT(prescriptions.startdate) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 94229 AND admissions.dischtime IS NULL) GROUP BY prescriptions.drug) AS t1 WHERE t1.c1 = 2
mimic_iii
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JO...
SELECT HIRE_DATE, EMPLOYEE_ID FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY HIRE_DATE
nvbench
CREATE TABLE table_13796 ( "Name" text, "Population (2011)" real, "Population (2006)" text, "Change (%)" text, "Land area (km\u00b2)" text, "Population density (per km\u00b2)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What population densit...
SELECT "Population density (per km\u00b2)" FROM table_13796 WHERE "Population (2006)" = '84'
wikisql
CREATE TABLE table_67358 ( "Image" real, "Smith" text, "Ashmolean" real, "Foster" real, "Hahland" real, "Dinsmoor" text, "Hofkes-Brukker" text, "Harrison" text, "Cooper" text, "BM/Corbett" text ) -- Using valid SQLite, answer the following questions for the tables provided abov...
SELECT COUNT("Ashmolean") FROM table_67358 WHERE "Harrison" = '14s' AND "Image" < '542'
wikisql
CREATE TABLE table_26385848_1 ( year__ceremony_ VARCHAR, film_title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the year (ceremony) for the film title Eldra?
SELECT year__ceremony_ FROM table_26385848_1 WHERE film_title = "Eldra"
sql_create_context
CREATE TABLE table_name_51 ( club_province VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the club/province for steve borthwick
SELECT club_province FROM table_name_51 WHERE player = "steve borthwick"
sql_create_context
CREATE TABLE table_197638_7 ( age VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many ages have Maureen Connolly Brinker as the player?
SELECT COUNT(age) FROM table_197638_7 WHERE player = "Maureen Connolly Brinker"
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 qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '41726844' AND NOT qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT <= 1130.37) UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '41726844' AND NOT gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_...
css
CREATE TABLE table_37980 ( "Year" text, "Conference" text, "Overall Record" text, "Conference Record" text, "Coach" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the coach in 1953?
SELECT "Coach" FROM table_37980 WHERE "Year" = '1953'
wikisql
CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text,...
SELECT Tags.TagName, Tags.Count FROM Tags WHERE Tags.TagName = 'angularjs' OR Tags.TagName = 'angular' OR Tags.TagName = 'reactjs' OR Tags.TagName = 'vue.js' OR Tags.TagName = 'vuejs2' OR Tags.TagName = 'ember.js' OR Tags.TagName = 'backbone.js' OR Tags.TagName = 'polymer'
sede
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 jybgb.SHRGH, jybgb.SHRXM FROM jybgb WHERE jybgb.JZLSH = '40691396989' GROUP BY jybgb.SHRGH HAVING COUNT(*) > 11
css
CREATE TABLE order_items ( order_id number, product_id number, order_quantity text ) CREATE TABLE customer_contact_channels ( customer_id number, channel_code text, active_from_date time, active_to_date time, contact_number text ) CREATE TABLE customers ( customer_id number, pa...
SELECT customer_name FROM customers WHERE customer_name LIKE "%Alex%"
spider
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 prescription...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND lab.label = "Sodium, Urine"
mimicsql_data
CREATE TABLE table_name_88 ( team_2 VARCHAR, team_1 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was Team 2 when Team 1 was Am rica?
SELECT team_2 FROM table_name_88 WHERE team_1 = "américa"
sql_create_context
CREATE TABLE Faculty ( FacID INTEGER, Lname VARCHAR(15), Fname VARCHAR(15), Rank VARCHAR(15), Sex VARCHAR(1), Phone INTEGER, Room VARCHAR(5), Building VARCHAR(13) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1...
SELECT Sex, COUNT(*) FROM Faculty GROUP BY Sex ORDER BY COUNT(*)
nvbench
CREATE TABLE table_203_467 ( id number, "year" number, "numer of jamaicans\ngranted british\ncitizenship" number, "naturalisation\nby residence" number, "naturalisation\nby marriage" number, "registration\nof a minor child" number, "registration\nby other means" number ) -- Using valid SQL...
SELECT "numer of jamaicans\ngranted british\ncitizenship" FROM table_203_467 WHERE "year" = 1998
squall
CREATE TABLE table_22551 ( "Nation" text, "Rider" text, "Horse" text, "Cross Country Penalties" text, "Total Penalties" text, "Total Team Penalties" text, "Team Rank" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which nation is where rider...
SELECT "Nation" FROM table_22551 WHERE "Rider" = 'Phillip Dutton'
wikisql
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT t_kc21.MAIN_COND_DES FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '55437969085'
css
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, ...
SELECT t.Name, h.CreationDate, PostId AS "post_link" FROM PostHistory AS h JOIN PostHistoryTypes AS t ON t.Id = PostHistoryTypeId WHERE PostId IN (SELECT Id FROM Posts WHERE OwnerUserId = '##UserId##') AND h.UserId = '##UserId##' AND PostHistoryTypeId IN (4, 5, 6, 7, 8, 9) ORDER BY h.CreationDate DESC
sede
CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE flight_stop ( flight_id int, stop...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA' AND date_day.day_number = 24 AND date_day.month_number = 5 ...
atis
CREATE TABLE table_name_70 ( street_address VARCHAR, floors VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which address has 44 floors?
SELECT street_address FROM table_name_70 WHERE floors = 44
sql_create_context
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, Mark...
SELECT a.Id AS "post_link", a.Score AS "answer_score", LENGTH(a.Body) AS "answer_length", a.Body AS "answer_body" FROM Posts AS a INNER JOIN Posts AS q ON q.Id = a.ParentId WHERE a.PostTypeId = 2 AND q.Tags LIKE '%<regex>%' AND (a.Body LIKE '<pre><code>%' OR a.Body LIKE '<p><code>%') AND LENGTH(a.Body) <= 100 GROUP BY ...
sede
CREATE TABLE table_204_200 ( id number, "iso/iec standard" text, "title" text, "status" text, "description" text, "wg" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many iso/iec were published before the year 2000 ?
SELECT COUNT("iso/iec standard") FROM table_204_200 WHERE "status" < 2000
squall
CREATE TABLE table_15851155_1 ( enrollment INTEGER, school VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the minimum enrollment for montana tech of the university of montana
SELECT MIN(enrollment) FROM table_15851155_1 WHERE school = "Montana Tech of the University of Montana"
sql_create_context
CREATE TABLE party_forms ( form_id VARCHAR ) CREATE TABLE forms ( form_name VARCHAR, form_id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the name of the most popular party form.
SELECT t1.form_name FROM forms AS t1 JOIN party_forms AS t2 ON t1.form_id = t2.form_id GROUP BY t2.form_id ORDER BY COUNT(*) DESC LIMIT 1
sql_create_context
CREATE TABLE table_42152 ( "Location" text, "Aircraft" text, "Tail number" text, "Aircraft damage" text, "Fatalities" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What tail number was on the an-26, with 25/25 fatalities?
SELECT "Tail number" FROM table_42152 WHERE "Aircraft" = 'an-26' AND "Fatalities" = '25/25'
wikisql
CREATE TABLE table_56433 ( "Tournament" text, "1989" text, "1990" text, "1991" text, "1992" text, "1993" text, "1994" text, "1995" text, "1996" text, "1997" text, "1998" text, "1999" text, "2000" text, "2001" text, "2002" text, "2003" text, "2004" text...
SELECT "Tournament" FROM table_56433 WHERE "2000" = '3r'
wikisql
CREATE TABLE table_13944 ( "Rank" real, "Athlete" text, "Country" text, "Time" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- The Athlete Shin Yeong-eun with a rank larger than 3 and notes of FD had what time?
SELECT "Time" FROM table_13944 WHERE "Rank" > '3' AND "Notes" = 'fd' AND "Athlete" = 'shin yeong-eun'
wikisql
CREATE TABLE match_season ( Season real, Player text, Position text, Country int, Team int, Draft_Pick_Number int, Draft_Class text, College text ) CREATE TABLE player ( Player_ID int, Player text, Years_Played text, Total_WL text, Singles_WL text, Doubles_WL tex...
SELECT Draft_Class, Draft_Pick_Number FROM match_season WHERE Position = "Defender"
nvbench
CREATE TABLE table_7774 ( "Date" text, "Event" text, "City" text, "Oil Pattern" text, "Winner (Title #)" text, "Runner-up" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the runner-up from Milwaukee?
SELECT "Runner-up" FROM table_7774 WHERE "City" = 'milwaukee'
wikisql
CREATE TABLE table_72092 ( "District" text, "Total amount of trees" real, "Prevailing types, %" text, "Amount of old trees" text, "Amount of trees, that require replacement" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the amount of trees,...
SELECT "Amount of trees, that require replacement" FROM table_72092 WHERE "District" = 'Motovilikhinsky'
wikisql
CREATE TABLE table_name_73 ( issue_price INTEGER, special_notes VARCHAR, mintage VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average issue price with from Toronto maple leafs gift set, and a Mintage of 3527?
SELECT AVG(issue_price) FROM table_name_73 WHERE special_notes = "from toronto maple leafs gift set" AND mintage = "3527"
sql_create_context
CREATE TABLE diagnoses ( 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "F" AND procedures.short_title = "IV infusion clofarabine"
mimicsql_data
CREATE TABLE t_kc21_t_kc24 ( MED_CLINIC_ID text, MED_SAFE_PAY_ID number ) 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, ...
SELECT AVG(t_kc21.MED_AMOUT) FROM t_kc21 WHERE t_kc21.MED_ORG_DEPT_NM = '小儿骨科' AND t_kc21.IN_HOSP_DATE BETWEEN '2002-03-19' AND '2021-03-24' AND t_kc21.IN_DIAG_DIS_NM = '精神障碍' AND t_kc21.CLINIC_TYPE = '住院'
css
CREATE TABLE table_name_4 ( assists VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many assists did Steve Walker have?
SELECT assists FROM table_name_4 WHERE player = "steve walker"
sql_create_context
CREATE TABLE Orders ( order_id INTEGER, customer_id INTEGER, date_order_placed DATETIME, order_details VARCHAR(255) ) CREATE TABLE Order_Items ( order_item_id INTEGER, order_id INTEGER, product_id INTEGER, product_quantity VARCHAR(50), other_order_item_details VARCHAR(255) ) CREATE...
SELECT invoice_number, COUNT(*) FROM Financial_Transactions GROUP BY invoice_number
nvbench
CREATE TABLE table_name_51 ( round INTEGER, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which round has a record of 5-3 (1)?
SELECT MIN(round) FROM table_name_51 WHERE record = "5-3 (1)"
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 demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.route = "IV DRIP"
mimicsql_data
CREATE TABLE table_21017 ( "Model number" text, "sSpec number" text, "Frequency" text, "L2 cache" text, "FSB" text, "Mult." text, "Voltage" text, "TDP" text, "Socket" text, "Release date" text, "Part number(s)" text, "Release price ( USD )" text ) -- Using valid SQLite,...
SELECT "FSB" FROM table_21017 WHERE "Model number" = 'Atom Z540'
wikisql
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,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...
SELECT JOB_TITLE, COUNT(JOB_TITLE) FROM employees AS T1 JOIN jobs AS T2 ON T1.JOB_ID = T2.JOB_ID WHERE T1.DEPARTMENT_ID = 80 GROUP BY JOB_TITLE
nvbench
CREATE TABLE table_name_74 ( rounds VARCHAR, constructor VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What rounds did Gordini participate in?
SELECT rounds FROM table_name_74 WHERE constructor = "gordini"
sql_create_context
CREATE TABLE Apartments ( apt_type_code VARCHAR, room_count INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show each apartment type code, and the maximum and minimum number of rooms for each type.
SELECT apt_type_code, MAX(room_count), MIN(room_count) FROM Apartments GROUP BY apt_type_code
sql_create_context
CREATE TABLE table_17155250_1 ( language_s_ VARCHAR, film_title_used_in_nomination VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What languages were spoken in the film 'FireDancer'?
SELECT language_s_ FROM table_17155250_1 WHERE film_title_used_in_nomination = "FireDancer"
sql_create_context
CREATE TABLE table_203_406 ( id number, "entrant" text, "constructor" text, "chassis" text, "engine" text, "tyre" text, "driver" text, "rounds" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many drivers drove all the rounds ?
SELECT COUNT("driver") FROM table_203_406 WHERE "rounds" = 'all'
squall
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.long_title = "Chronic pulmonary heart disease, unspecified"
mimicsql_data
CREATE TABLE jobs ( job_id text, job_title text, min_salary number, max_salary number ) CREATE TABLE countries ( country_id text, country_name text, region_id number ) CREATE TABLE regions ( region_id number, region_name text ) CREATE TABLE departments ( department_id number, ...
SELECT first_name, last_name, salary FROM employees WHERE salary < 6000
spider
CREATE TABLE table_name_78 ( position VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the position for Jani Lajunen?
SELECT position FROM table_name_78 WHERE player = "jani lajunen"
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 ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%pune%' OR UPPER(Location) LIKE '%PUNE' ORDER BY Reputation DESC LIMIT 500
sede
CREATE TABLE table_name_75 ( losses INTEGER, season VARCHAR, draws VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Losses is the lowest one that has a Season smaller than 1920, and Draws larger than 0?
SELECT MIN(losses) FROM table_name_75 WHERE season < 1920 AND draws > 0
sql_create_context
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 OUT_DIAG_DOC_CD, OUT_DIAG_DOC_NM FROM t_kc21 WHERE PERSON_ID = '45512719' GROUP BY OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC
css
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 qtb.OUT_DIAG_DOC_CD, qtb.OUT_DIAG_DOC_NM FROM qtb WHERE qtb.PERSON_NM = '范博厚' GROUP BY qtb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC UNION SELECT gyb.OUT_DIAG_DOC_CD, gyb.OUT_DIAG_DOC_NM FROM gyb WHERE gyb.PERSON_NM = '范博厚' GROUP BY gyb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC UNION SELECT zyb.OUT_DIAG_DOC_CD, zyb.OU...
css
CREATE TABLE table_52784 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date did NY Rangers play at home?
SELECT "Date" FROM table_52784 WHERE "Home" = 'ny rangers'
wikisql
CREATE TABLE table_11961582_10 ( team VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which team was played on April 20?
SELECT team FROM table_11961582_10 WHERE date = "April 20"
sql_create_context
CREATE TABLE table_name_93 ( block_a VARCHAR, toshizo VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the block A for shuji kondo
SELECT block_a FROM table_name_93 WHERE toshizo = "shuji kondo"
sql_create_context
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 (SELECT qtb.MED_ORG_DEPT_CD FROM qtb WHERE qtb.MED_SER_ORG_NO = '5265726' GROUP BY qtb.MED_ORG_DEPT_CD HAVING MIN(qtb.IN_HOSP_DAYS) > 12 UNION SELECT gyb.MED_ORG_DEPT_CD FROM gyb WHERE gyb.MED_SER_ORG_NO = '5265726' GROUP BY gyb.MED_ORG_DEPT_CD HAVING MIN(gyb.IN_HOSP_DAYS) > 12 UNION SELECT zyb.MED...
css
CREATE TABLE table_28737 ( "School" text, "Nickname" text, "Location" text, "Colors" text, "Join Date" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the colors for north canton
SELECT "Colors" FROM table_28737 WHERE "Location" = 'North Canton'
wikisql
CREATE TABLE table_5000 ( "Rank" real, "Player" text, "Country" text, "Earnings ( $ )" real, "Events" real, "Wins" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- the sum of Events that has a Rank larger than 5 is 3
SELECT SUM("Events") FROM table_5000 WHERE "Rank" > '5'
wikisql
CREATE TABLE table_42106 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What i...
SELECT "Team" FROM table_42106 WHERE "High rebounds" = 'antonio davis (8)'
wikisql
CREATE TABLE table_1000181_1 ( notes VARCHAR, current_slogan VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me what the notes are for South Australia
SELECT notes FROM table_1000181_1 WHERE current_slogan = "SOUTH AUSTRALIA"
sql_create_context
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) -- Using valid SQLite, answer the following questions for the...
SELECT Founder, AVG(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder DESC
nvbench
CREATE TABLE table_204_630 ( id number, "no" number, "date" text, "race" text, "track" text, "winner" text, "reports" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- where was the last race listing frank kimmel held ?
SELECT "track" FROM table_204_630 WHERE "winner" = 'frank kimmel' ORDER BY "date" DESC LIMIT 1
squall
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 mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb JOIN person_info_hz_info JOIN person_info ON 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 person_info_hz_info.YLJGDM = hz_info.YLJGDM AND pers...
css
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code tex...
SELECT t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-77687') AND treatment.treatme...
eicu
CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate real ) CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight re...
SELECT Date_of_Birth, Weight FROM people ORDER BY Weight DESC
nvbench
CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostHistory ( Id number, ...
SELECT TIME_TO_STR(CreationDate, '%y') * 100 + TIME_TO_STR(CreationDate, '%M') AS yyyymm, COUNT(*) AS cnt FROM Posts AS p INNER JOIN PostTags AS pt ON pt.PostId = p.Id INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE t.TagName = 'systemc' GROUP BY TIME_TO_STR(CreationDate, '%y') * 100 + TIME_TO_STR(CreationDate, '%M') ORD...
sede
CREATE TABLE table_55048 ( "Name" text, "Model" text, "Park" text, "Opened" text, "Status" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the model for Thor's Hammer which is listed as operating?
SELECT "Model" FROM table_55048 WHERE "Status" = 'operating' AND "Name" = 'thor''s hammer'
wikisql
CREATE TABLE table_name_47 ( total_trips__am_pm_ VARCHAR, operated_by VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What trips are operated by Atlantic coast charters?
SELECT total_trips__am_pm_ FROM table_name_47 WHERE operated_by = "atlantic coast charters"
sql_create_context
CREATE TABLE table_72391 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many incumbents were for district georgia 6?
SELECT COUNT("Incumbent") FROM table_72391 WHERE "District" = 'Georgia 6'
wikisql
CREATE TABLE table_name_65 ( grid VARCHAR, manufacturer VARCHAR, time_retired VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the grid with a yamaha manufacturer and a +19.435 time/retired?
SELECT grid FROM table_name_65 WHERE manufacturer = "yamaha" AND time_retired = "+19.435"
sql_create_context
CREATE TABLE All_Documents ( Document_ID INTEGER, Date_Stored DATETIME, Document_Type_Code CHAR(15), Document_Name CHAR(255), Document_Description CHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Ref_Document_Types ( Document_Type_Code CHAR(15), Document_Type_Name VARCHAR(255), ...
SELECT Calendar_Date, Day_Number FROM Ref_Calendar ORDER BY Calendar_Date DESC
nvbench
CREATE TABLE table_75759 ( "Information" text, "Altade\u00f1a" text, "Aprende" text, "Centennial" text, "Kyrene MS" text, "del Pueblo" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Centennial has a del Pueblo of 1986?
SELECT "Centennial" FROM table_75759 WHERE "del Pueblo" = '1986'
wikisql
CREATE TABLE gwyjzb ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '魏梦凡' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLIN...
css
CREATE TABLE table_71822 ( "Date" text, "Visiting Team" text, "Final Score" text, "Host Team" text, "Stadium" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which visiting team wound up with a final score of 18-40?
SELECT "Visiting Team" FROM table_71822 WHERE "Final Score" = '18-40'
wikisql
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsysto...
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'stress ulcer pr...
eicu
CREATE TABLE table_70945 ( "Date enacted" text, "Normal total" text, "\u00a726 total" text, "Ont." text, "Que." text, "N.S." text, "N.B." text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the normal with que of 24
SELECT "Normal total" FROM table_70945 WHERE "Que." = '24'
wikisql
CREATE TABLE table_name_90 ( bronze VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who won the bronze medal in Hiroshima?
SELECT bronze FROM table_name_90 WHERE location = "hiroshima"
sql_create_context
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsysto...
SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-30273')) AND STRFTIME('%y-%m', medication.drugstarttime) = '210...
eicu
CREATE TABLE table_name_95 ( downhill VARCHAR, points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 1st run that is down hill less than 46, and 84.45 points?
SELECT 1 AS st_run FROM table_name_95 WHERE downhill < 46 AND points = "84.45"
sql_create_context
CREATE TABLE table_66760 ( "Rank" real, "Lane" real, "Name" text, "Nationality" text, "Time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the time of the person in lane 7?
SELECT "Time" FROM table_66760 WHERE "Lane" = '7'
wikisql
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE l...
SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'valve replacement or repair - routine')) AND...
eicu
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.discharge_location = "HOME" AND demographic.days_stay > "23"
mimicsql_data
CREATE TABLE table_name_70 ( date VARCHAR, sport VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which date had a sport of Academics?
SELECT date FROM table_name_70 WHERE sport = "academics"
sql_create_context
CREATE TABLE table_8507 ( "White" text, "Black" text, "Year" real, "Result" text, "Moves" real, "Tournament" text, "Opening" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What tournament had a black of Kramnik and an opening of B66 Sicilian...
SELECT "Tournament" FROM table_8507 WHERE "Black" = 'kramnik' AND "Opening" = 'b66 sicilian defence'
wikisql
CREATE TABLE table_1682026_3 ( profits__billion_$_ VARCHAR, market_value__billion_$_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the profits (in billions) of the company with a market value of 172.9 billion?
SELECT profits__billion_$_ FROM table_1682026_3 WHERE market_value__billion_$_ = "172.9"
sql_create_context
CREATE TABLE person_info_hz_info ( RYBH text, KH number, KLX number, YLJGDM number ) 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,...
SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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 mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZ...
css
CREATE TABLE table_203_440 ( id number, "rank" number, "player" text, "from" text, "to" text, "transfer fee\n(\u20ac million)" number, "year" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which team had the top transfer come in ?
SELECT "to" FROM table_203_440 ORDER BY "rank" LIMIT 1
squall
CREATE TABLE table_44993 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the to par score from Brad Faxon of the United States with a score of 73-68=141?
SELECT "To par" FROM table_44993 WHERE "Country" = 'united states' AND "Score" = '73-68=141' AND "Player" = 'brad faxon'
wikisql
CREATE TABLE table_name_18 ( against INTEGER, lost VARCHAR, played VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the maximum number of points against when the team has more than 0 losses and plays fewer than 6 games?
SELECT MAX(against) FROM table_name_18 WHERE lost > 0 AND played < 6
sql_create_context
CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE...
SELECT DISTINCT name, number FROM course WHERE credits = 18 AND department = 'EECS'
advising
CREATE TABLE table_19309079_2 ( qatari_female VARCHAR, qatari_male VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many numbers were recorded for Qatari female when Qatari male was 97?
SELECT COUNT(qatari_female) FROM table_19309079_2 WHERE qatari_male = 97
sql_create_context
CREATE TABLE table_57564 ( "D 41 \u221a" text, "D 42 \u221a" text, "D 43 \u221a" text, "D 44 \u221a" text, "D 45 O" text, "D 46 O" text, "D 47 +" text, "D 48 +" text, "D 49 +" text, "D 50 +" text ) -- Using valid SQLite, answer the following questions for the tables provided ab...
SELECT "D 50 +" FROM table_57564 WHERE "D 48 +" = 'd 53 +'
wikisql
CREATE TABLE table_25405 ( "Season" real, "Episodes" real, "Timeslot (ET)" text, "Season Premiere" text, "Season Finale" text, "TV Season" text, "Rank" text, "Viewers (in millions)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many...
SELECT COUNT("Episodes") FROM table_25405 WHERE "Season Premiere" = 'December 11, 2010'
wikisql
CREATE TABLE table_name_14 ( attendance INTEGER, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many people attended the green bay packers game?
SELECT SUM(attendance) FROM table_name_14 WHERE opponent = "green bay packers"
sql_create_context