instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_26 (
round INTEGER,
player VARCHAR,
pick VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the earliest round with Neil Colzie and a pick smaller than 24?
| SELECT MIN(round) FROM table_name_26 WHERE player = "neil colzie" AND pick < 24 | sql_create_context |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE patient (
uniquepid text,
... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', lab.labresulttime)) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-34744' AND patient.hospi... | eicu |
CREATE TABLE table_18942 (
"Asset Acquired" text,
"Acquired From" text,
"Date Announced" text,
"Date Completed" text,
"Reported Cost" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date was it announced that an asset was acquired for US$9 Mi... | SELECT "Date Announced" FROM table_18942 WHERE "Reported Cost" = 'US$9 million' | wikisql |
CREATE TABLE table_28846 (
"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 times did the incumbent was first elected and then lost re-elec... | SELECT COUNT("First elected") FROM table_28846 WHERE "Result" = 'Lost re-election Anti-Masonic gain' | wikisql |
CREATE TABLE table_25352318_1 (
position VARCHAR,
season VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When racing engineering is the team and 2012 is the team what is the position?
| SELECT position FROM table_25352318_1 WHERE season = 2012 AND team = "Racing Engineering" | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CELO-VESSICLE FISTULA" AND demographic.age < "45" | mimicsql_data |
CREATE TABLE table_50359 (
"Team" text,
"Head Coach" text,
"Team Captain" text,
"Kitmaker" text,
"Shirt sponsor" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For the team whose shirt sponsor is Krombacher, who is the team captain?
| SELECT "Team Captain" FROM table_50359 WHERE "Shirt sponsor" = 'krombacher' | wikisql |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid num... | SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-9636')) AND intakeoutput.cellpath LIKE '%intake%' AND DA... | eicu |
CREATE TABLE people (
People_ID int,
District text,
Name text,
Party text,
Age int
)
CREATE TABLE debate (
Debate_ID int,
Date text,
Venue text,
Num_of_Audience int
)
CREATE TABLE debate_people (
Debate_ID int,
Affirmative int,
Negative int,
If_Affirmative_Win bool
... | SELECT Party, COUNT(*) FROM people GROUP BY Party ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_name_69 (
season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What 20-29 was in season 2008?
| SELECT 20 AS _29 FROM table_name_69 WHERE season = "2008" | sql_create_context |
CREATE TABLE table_name_85 (
round INTEGER,
overall VARCHAR,
pick__number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Round is the highest one that has an Overall of 32, and a Pick # smaller than 4?
| SELECT MAX(round) FROM table_name_85 WHERE overall = 32 AND pick__number < 4 | sql_create_context |
CREATE TABLE table_1942683_1 (
house_mascot VARCHAR,
house_colour VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many house mascots are associated with yellow house colours?
| SELECT COUNT(house_mascot) FROM table_1942683_1 WHERE house_colour = "Yellow" | sql_create_context |
CREATE TABLE table_name_2 (
crowd VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the crowd size for the game at Footscray?
| SELECT COUNT(crowd) FROM table_name_2 WHERE away_team = "footscray" | sql_create_context |
CREATE TABLE table_40175 (
"Candidate" text,
"Votes" real,
"Percentage" text,
"Counties" real,
"Delegates" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of votes when Ron Paul is the candidate with less than 0 counties?
| SELECT COUNT("Votes") FROM table_40175 WHERE "Candidate" = 'ron paul' AND "Counties" < '0' | wikisql |
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.
-- what is the total amount of times porsche is a... | SELECT COUNT(DISTINCT "entrant") FROM table_203_406 WHERE "constructor" = 'porsche' | squall |
CREATE TABLE table_20726262_2 (
title VARCHAR,
directedby VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What title episode did Paris Barclay direct?
| SELECT title FROM table_20726262_2 WHERE directedby = "Paris Barclay" | sql_create_context |
CREATE TABLE Students (
student_id INTEGER,
address_id INTEGER,
first_name VARCHAR(80),
middle_name VARCHAR(40),
last_name VARCHAR(40),
cell_mobile_number VARCHAR(40),
email_address VARCHAR(40),
date_first_rental DATETIME,
date_left_university DATETIME,
other_student_details VARC... | SELECT date_address_to, SUM(monthly_rental) FROM Student_Addresses ORDER BY monthly_rental DESC | nvbench |
CREATE TABLE table_23734 (
"Season" text,
"Games" real,
"Tries" real,
"Conversions" real,
"Penalties" real,
"Drop Goals" real,
"Total Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many seasons featured 29 conversions?
| SELECT COUNT("Penalties") FROM table_23734 WHERE "Conversions" = '29' | wikisql |
CREATE TABLE table_25896 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many episodes were directed by S... | SELECT COUNT("Title") FROM table_25896 WHERE "Directed by" = 'Sarah Pia Anderson' | wikisql |
CREATE TABLE Ref_Calendar (
Calendar_Date DATETIME,
Day_Number INTEGER
)
CREATE TABLE Documents_to_be_Destroyed (
Document_ID INTEGER,
Destruction_Authorised_by_Employee_ID INTEGER,
Destroyed_by_Employee_ID INTEGER,
Planned_Destruction_Date DATETIME,
Actual_Destruction_Date DATETIME,
Ot... | SELECT Date_in_Location_From, COUNT(Date_in_Location_From) FROM Document_Locations GROUP BY Date_in_Location_From ORDER BY Date_in_Location_From | nvbench |
CREATE TABLE table_13762472_3 (
high_points VARCHAR,
game VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many players scored the most points on game 4?
| SELECT COUNT(high_points) FROM table_13762472_3 WHERE game = 4 | sql_create_context |
CREATE TABLE table_76759 (
"Player" text,
"Pos." text,
"Nationality" text,
"Team" text,
"Previous team" text,
"Years of NBA experience [a ]" real,
"Career with the franchise [b ]" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many years... | SELECT "Years of NBA experience [a ]" FROM table_76759 WHERE "Pos." = 'g' AND "Team" = 'portland trail blazers' | wikisql |
CREATE TABLE customer (
state VARCHAR,
acc_bal INTEGER,
credit_score INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For each state, find the total account balance of customers whose credit score is above 100.
| SELECT SUM(acc_bal), state FROM customer WHERE credit_score > 100 GROUP BY state | sql_create_context |
CREATE TABLE table_3806 (
"Team #1" text,
"Points" text,
"Team #2" text,
"1st leg" text,
"2nd leg" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the 2nd leg score if the team 1 is Deportivo Pasto?
| SELECT "2nd leg" FROM table_3806 WHERE "Team #1" = 'Deportivo Pasto' | wikisql |
CREATE TABLE table_name_63 (
elevator VARCHAR,
elector VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When Giovanni Gaetano Orsini was the elector who was the elevator?
| SELECT elevator FROM table_name_63 WHERE elector = "giovanni gaetano orsini" | sql_create_context |
CREATE TABLE table_name_53 (
bronze INTEGER,
gold VARCHAR,
nation VARCHAR,
silver VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Bronze has a Silver larger than 1, a Total larger than 3, a Nation of turkey, and a Gold smaller... | SELECT SUM(bronze) FROM table_name_53 WHERE silver > 1 AND total > 3 AND nation = "turkey" AND gold < 2 | sql_create_context |
CREATE TABLE table_31590 (
"Member" text,
"Electorate" text,
"Province" text,
"MP's term" text,
"Election date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Election date for Member william richmond category:articles with hcards?
| SELECT "Election date" FROM table_31590 WHERE "Member" = 'william richmond category:articles with hcards' | wikisql |
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE paper (
paperid int,
title... | SELECT DISTINCT paperkeyphrase.paperid FROM keyphrase, paperkeyphrase WHERE keyphrase.keyphrasename IN ('Neural', 'Relation Extraction') GROUP BY paperkeyphrase.paperid HAVING COUNT(DISTINCT keyphrase.keyphraseid) = 1 | scholar |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
... | SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY HIRE_DATE DESC | nvbench |
CREATE TABLE table_33085 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total crowd size when the away team ... | SELECT SUM("Crowd") FROM table_33085 WHERE "Away team score" = '14.6 (90)' | wikisql |
CREATE TABLE table_name_62 (
loss VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score of the game for April 16?
| SELECT loss FROM table_name_62 WHERE date = "april 16" | sql_create_context |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Code, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder | nvbench |
CREATE TABLE genres (
id number,
name text
)
CREATE TABLE media_types (
id number,
name text
)
CREATE TABLE customers (
id number,
first_name text,
last_name text,
company text,
address text,
city text,
state text,
country text,
postal_code text,
phone text,
... | SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = "Movies" | spider |
CREATE TABLE party (
region_id VARCHAR,
party_id VARCHAR
)
CREATE TABLE party_events (
party_id VARCHAR,
Event_Name VARCHAR
)
CREATE TABLE region (
region_id VARCHAR,
region_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Annua... | SELECT COUNT(*) FROM region AS t1 JOIN party AS t2 ON t1.region_id = t2.region_id JOIN party_events AS t3 ON t2.party_id = t3.party_id WHERE t1.region_name = "United Kingdom" AND t3.Event_Name = "Annaual Meeting" | sql_create_context |
CREATE TABLE table_14327 (
"Rank" real,
"Year" real,
"Name" text,
"Moving from" text,
"Moving to" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the earliest year that kakha kaladze moved to milan with a rank above 9?
| SELECT MIN("Year") FROM table_14327 WHERE "Moving to" = 'milan' AND "Name" = 'kakha kaladze' AND "Rank" < '9' | wikisql |
CREATE TABLE table_59515 (
"Opposing Teams" text,
"Against" real,
"Date" text,
"Venue" text,
"Status" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average against of Murrayfield, Edinburgh?
| SELECT AVG("Against") FROM table_59515 WHERE "Venue" = 'murrayfield, edinburgh' | wikisql |
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE T... | 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, state WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'WASHINGTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_nam... | atis |
CREATE TABLE table_12221 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Date, when Record is '1-1'?
| SELECT "Date" FROM table_12221 WHERE "Record" = '1-1' | wikisql |
CREATE TABLE table_name_17 (
gamecenter VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the gamecenter that has attendance of 65,212
| SELECT gamecenter FROM table_name_17 WHERE attendance = "65,212" | sql_create_context |
CREATE TABLE people (
People_ID int,
Age int,
Name text,
Nationality text,
Graduation_College text
)
CREATE TABLE employment (
Company_ID int,
People_ID int,
Year_working int
)
CREATE TABLE company (
Company_ID real,
Name text,
Headquarters text,
Industry text,
Sale... | SELECT Headquarters, COUNT(*) FROM company GROUP BY Headquarters ORDER BY COUNT(*) | nvbench |
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 t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '喻星海' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC | css |
CREATE TABLE table_204_180 (
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.
-- how many games did they play total ?
| SELECT COUNT(*) FROM table_204_180 | squall |
CREATE TABLE table_name_9 (
score VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score at North Shore Events Centre?
| SELECT score FROM table_name_9 WHERE venue = "north shore events centre" | 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 demographic.diagnosis, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Ida Cook" | mimicsql_data |
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
)
CREATE TABLE Reviewer (
rID int,
name text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show ... | SELECT title, stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID | nvbench |
CREATE TABLE table_15608800_2 (
number_at_march VARCHAR,
class VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number at march when class is j66
| SELECT number_at_march FROM table_15608800_2 WHERE class = "J66" | 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 t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '92050718697' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY SUM(t_kc22.SELF_PAY_AMO) DES... | css |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,... | SELECT DISTINCT course.department, course.name, course.number FROM course, program, program_course WHERE program_course.category LIKE '%PreMajor%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.program_id = program_course.program_id | advising |
CREATE TABLE table_52391 (
"Season" text,
"Competition" text,
"Round" text,
"Club" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In which season was there a competition in the Champions League?
| SELECT "Season" FROM table_52391 WHERE "Competition" = 'champions league' | wikisql |
CREATE TABLE rating (
rid number,
mid number,
stars number,
ratingdate time
)
CREATE TABLE movie (
mid number,
title text,
year number,
director text
)
CREATE TABLE reviewer (
rid number,
name text
)
-- Using valid SQLite, answer the following questions for the tables provide... | SELECT rid FROM reviewer WHERE name LIKE "%Mike%" | spider |
CREATE TABLE table_name_98 (
nickname VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the nickname of the school located in Fairfax, VA?
| SELECT nickname FROM table_name_98 WHERE location = "fairfax, va" | sql_create_context |
CREATE TABLE table_name_31 (
location VARCHAR,
altitude__metres_ INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the location for altitude being less thaan 6102
| SELECT location FROM table_name_31 WHERE altitude__metres_ < 6102 | sql_create_context |
CREATE TABLE table_17769 (
"Day: (see Irregularities )" text,
"Sunday S\u014dl (Sun)" text,
"Monday Luna (Moon)" text,
"Tuesday Mars (Mars)" text,
"Wednesday Mercurius (Mercury)" text,
"Thursday Iuppiter (Jupiter)" text,
"Friday Venus (Venus)" text,
"Saturday Saturnus ( Saturn)" text
)
... | SELECT "Thursday Iuppiter (Jupiter)" FROM table_17769 WHERE "Friday Venus (Venus)" = 'vendredi' | wikisql |
CREATE TABLE table_25810656_3 (
no_in_series VARCHAR,
production_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number in series for production code being 204
| SELECT no_in_series FROM table_25810656_3 WHERE production_code = 204 | sql_create_context |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jybgb (
BBCJBW text,
BBDM tex... | SELECT * 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_11054 (
"Date" text,
"Tournament" text,
"Winning score" text,
"To par" text,
"Margin of victory" text,
"Runner(s)-up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the runner-up in the Michelob Light Open at Kingsmill... | SELECT "Runner(s)-up" FROM table_11054 WHERE "Tournament" = 'michelob light open at kingsmill' | wikisql |
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 text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | SELECT demographic.diagnosis FROM demographic WHERE demographic.name = "Stephanie Suchan" | mimicsql_data |
CREATE TABLE table_6986 (
"Year" text,
"Film title used in nomination" text,
"Original title" text,
"Main Language(s)" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the nomination title used for the original film, Zwartboek?
| SELECT "Film title used in nomination" FROM table_6986 WHERE "Original title" = 'zwartboek' | wikisql |
CREATE TABLE table_16061 (
"Round" real,
"Choice" real,
"Overall" real,
"Player name" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which overall pick number went to college at Youngstown State?
| SELECT MIN("Overall") FROM table_16061 WHERE "College" = 'Youngstown State' | wikisql |
CREATE TABLE table_19648 (
"Position" real,
"Team" text,
"Played" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Scored" real,
"Conceded" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number of draws for wh... | SELECT COUNT("Draws") FROM table_19648 WHERE "Conceded" = '25' | wikisql |
CREATE TABLE table_name_85 (
score VARCHAR,
surface VARCHAR,
outcome VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the score when the surface is hard and outcome is runner-up?
| SELECT score FROM table_name_85 WHERE surface = "hard" AND outcome = "runner-up" | sql_create_context |
CREATE TABLE table_28243 (
"Metropolitan ring" text,
"Localities" real,
"Total" real,
"Jews and others 1" real,
"Thereof: Jews" real,
"Arabs" real,
"Population density (per km\u00b2)" text,
"Annual Population growth rate" text
)
-- Using valid SQLite, answer the following questions for... | SELECT MAX("Localities") FROM table_28243 | wikisql |
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 SUM(t_kc24.PER_ACC_PAY) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '花新梅' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2005-06-16' AND '2021-08-24' | css |
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 gwyjzb.OUT_DIAG_DIS_CD, gwyjzb.OUT_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.PERSON_ID = '55299978' AND gwyjzb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 6461.54) UNION SELECT fgwyjzb.OUT_DIAG_DIS_CD, fgwyjzb.OUT_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '55299978' AN... | css |
CREATE TABLE table_204_778 (
id number,
"code" number,
"county" text,
"former province" text,
"area (km2)" number,
"population\ncensus 2009" number,
"capital" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which county is the only one to hav... | SELECT "county" FROM table_204_778 WHERE "area (km2)" < 1000 | squall |
CREATE TABLE table_name_24 (
week INTEGER,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What week of the season had a date of october 5, 1975?
| SELECT MIN(week) FROM table_name_24 WHERE date = "october 5, 1975" | sql_create_context |
CREATE TABLE table_52250 (
"Team" text,
"Location" text,
"Joined" real,
"Conference" text,
"Division" text,
"Previous Conference" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team is located in Westland and was previously in the Western ... | SELECT "Team" FROM table_52250 WHERE "Previous Conference" = 'western lakes activities association' AND "Location" = 'westland' | wikisql |
CREATE TABLE table_34526 (
"Club" text,
"Wins" text,
"Last win" text,
"Runners-up" text,
"Last final lost" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the last win of Celtic?
| SELECT "Last win" FROM table_34526 WHERE "Club" = 'celtic' | wikisql |
CREATE TABLE table_40058 (
"Club" text,
"Wins" real,
"Loses" real,
"Points For" real,
"Points Against" real,
"Percentage" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many losses have points against greater than 592, wit... | SELECT COUNT("Loses") FROM table_40058 WHERE "Points Against" > '592' AND "Club" = 'high park demons' AND "Points For" > '631' | wikisql |
CREATE TABLE party (
Party_ID int,
Year real,
Party text,
Governor text,
Lieutenant_Governor text,
Comptroller text,
Attorney_General text,
US_Senate text
)
CREATE TABLE election (
Election_ID int,
Counties_Represented text,
District int,
Delegate text,
Party int,
... | SELECT Comptroller, COUNT(Comptroller) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2 GROUP BY Comptroller ORDER BY COUNT(Comptroller) DESC | nvbench |
CREATE TABLE table_51863 (
"Name" text,
"Country" text,
"Status" text,
"Moving to" text,
"Transfer window" text,
"Transfer fee" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the country moving to chelsea
| SELECT "Country" FROM table_51863 WHERE "Moving to" = 'chelsea' | wikisql |
CREATE TABLE table_name_14 (
points INTEGER,
driver VARCHAR,
top_10 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the highest points for Justin Lofton when his top 10 is lower than 5?
| SELECT MAX(points) FROM table_name_14 WHERE driver = "justin lofton" AND top_10 < 5 | sql_create_context |
CREATE TABLE Students (
student_id INTEGER,
date_of_registration DATETIME,
date_of_latest_logon DATETIME,
login_name VARCHAR(40),
password VARCHAR(10),
personal_name VARCHAR(40),
middle_name VARCHAR(40),
family_name VARCHAR(40)
)
CREATE TABLE Subjects (
subject_id INTEGER,
subje... | SELECT family_name, author_id FROM Course_Authors_and_Tutors ORDER BY personal_name | nvbench |
CREATE TABLE table_203_187 (
id number,
"conference" text,
"bids" number,
"record" text,
"win %" number,
"quarterfinals" number,
"semifinals" number,
"final" number,
"champions" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- did at... | SELECT (SELECT "bids" FROM table_203_187 WHERE "conference" = 'atlantic coast conference') > (SELECT "bids" FROM table_203_187 WHERE "conference" = 'colonial athletic association') | squall |
CREATE TABLE Complaints (
complaint_id INTEGER,
product_id INTEGER,
customer_id INTEGER,
complaint_outcome_code VARCHAR(20),
complaint_status_code VARCHAR(20),
complaint_type_code VARCHAR(20),
date_complaint_raised DATETIME,
date_complaint_closed DATETIME,
staff_id INTEGER
)
CREATE ... | SELECT product_category_code, AVG(product_price) FROM Products GROUP BY product_category_code | nvbench |
CREATE TABLE table_name_33 (
against INTEGER,
wins VARCHAR,
wimmera_fl VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest against of the wimmera fl warrack eagles, which have less than 16 wins?
| SELECT MIN(against) FROM table_name_33 WHERE wins < 16 AND wimmera_fl = "warrack eagles" | sql_create_context |
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.gender = "M" AND demographic.admityear < "2127" | mimicsql_data |
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 TABLE Accounts (
account_id INTEGER,
customer_id INTEGER,
date_account_opened DATETIME,
account_name VARCHAR(50),
... | SELECT other_account_details, COUNT(other_account_details) FROM Accounts GROUP BY other_account_details ORDER BY other_account_details | nvbench |
CREATE TABLE table_10274 (
"Tie no" text,
"Home team" text,
"Score 1" text,
"Away team" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score of the match in which Portsmouth was the Away team?
| SELECT "Score 1" FROM table_10274 WHERE "Away team" = 'portsmouth' | wikisql |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,... | SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-4471')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutput... | eicu |
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_NM = '麻醉科' AND t_kc22.STA_DATE BETWEEN '2007-12-19' AND '2019-08-10' AND t_kc22.SOC_SRT_DIRE_CD = '7623' | css |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE cost (
row_id nu... | SELECT microbiologyevents.org_name FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 5849) AND microbiologyevents.spec_type_desc = 'urine' AND NOT microbiologyevents.org_name IS NULL AND STRFTIME('%y-%m', microbiologyevents.charttime) >=... | mimic_iii |
CREATE TABLE table_19854 (
"Category" text,
"Type" text,
"Attribute" text,
"Description" text,
"Bubbles" text,
"Cancelable" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the type is 'reset' what is the description?
| SELECT "Description" FROM table_19854 WHERE "Type" = 'reset' | wikisql |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TA... | SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-65715')) AND intakeoutput.cellpath LIKE '%in... | eicu |
CREATE TABLE table_24667 (
"Team" text,
"Truck(s)" text,
"#" real,
"Driver(s)" text,
"Primary Sponsor(s)" text,
"Listed Owner(s)" text,
"Crew Chief" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the crew chief for ricky craven
| SELECT "Crew Chief" FROM table_24667 WHERE "Driver(s)" = 'Ricky Craven' | wikisql |
CREATE TABLE table_name_30 (
winner VARCHAR,
surface VARCHAR,
week VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the winner on a hard surface on the week of November 13?
| SELECT winner FROM table_name_30 WHERE surface = "hard" AND week = "november 13" | sql_create_context |
CREATE TABLE table_13259009_2 (
game_site VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where did they play the San Diego Chargers?
| SELECT game_site FROM table_13259009_2 WHERE opponent = "San Diego Chargers" | sql_create_context |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostNoticeTypes (
Id... | SELECT Id AS "post_link", Title, CreationDate, Score FROM Posts WHERE OwnerUserId = '##user?36688##' AND PostTypeId = 1 ORDER BY CreationDate DESC | sede |
CREATE TABLE zyjzjlb_jybgb (
YLJGDM_ZYJZJLB 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.BGRGH, jybgb.BGRXM FROM jybgb WHERE jybgb.JZLSH = '20704005189' GROUP BY jybgb.BGRGH HAVING COUNT(*) > 4 | css |
CREATE TABLE table_18804 (
"Year" real,
"Mens singles" text,
"Womens singles" text,
"Mens doubles" text,
"Womens doubles" text,
"Mixed doubles" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who are the mens singles and womens singles with sun y... | SELECT "Mens singles" FROM table_18804 WHERE "Womens singles" = 'Sun Yu' | 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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "MARRIED" AND procedures.icd9_code = "4611" | mimicsql_data |
CREATE TABLE table_name_46 (
year VARCHAR,
formula VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many years had a formula of Grand Prix?
| SELECT COUNT(year) FROM table_name_46 WHERE formula = "grand prix" | sql_create_context |
CREATE TABLE table_20353 (
"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.
-- How ma... | SELECT COUNT("Team") FROM table_20353 WHERE "Date" = 'February 18' | wikisql |
CREATE TABLE table_name_29 (
bronze INTEGER,
total VARCHAR,
silver VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average Bronze, when Silver is 0, when Rank is 19, and when Total is greater than 2?
| SELECT AVG(bronze) FROM table_name_29 WHERE silver = 0 AND rank = "19" AND total > 2 | sql_create_context |
CREATE TABLE table_14976504_2 (
location VARCHAR,
institution VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where is California Lutheran University located?
| SELECT COUNT(location) FROM table_14976504_2 WHERE institution = "California Lutheran University" | sql_create_context |
CREATE TABLE table_19819 (
"Ido" text,
"English" text,
"Italian" text,
"French" text,
"German" text,
"Russian" text,
"Spanish" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the French word for the Italian word nazione?
| SELECT "French" FROM table_19819 WHERE "Italian" = 'nazione' | wikisql |
CREATE TABLE table_204_577 (
id number,
"name" text,
"first operational" text,
"numeral system" text,
"computing mechanism" text,
"programming" text,
"turing complete" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what name is above may 194... | SELECT "name" FROM table_204_577 WHERE "first operational" < (SELECT "first operational" FROM table_204_577 WHERE "first operational" = 'may 1944') ORDER BY "first operational" DESC LIMIT 1 | squall |
CREATE TABLE table_204_184 (
id number,
"#" number,
"title" text,
"producer(s)" text,
"featured guest(s)" text,
"length" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- is dem boyz or felonies have the featured guest p. diddy ?
| SELECT "title" FROM table_204_184 WHERE "title" IN ('"dem boyz"', '"felonies"') AND "featured guest(s)" = 'p. diddy' | squall |
CREATE TABLE table_38768 (
"Entrants" real,
"Winner" text,
"Prize" text,
"Runner-up" text,
"Results" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many entrants did the events won by Frank Gary average?
| SELECT AVG("Entrants") FROM table_38768 WHERE "Winner" = 'frank gary' | wikisql |
CREATE TABLE table_204_513 (
id number,
"date" text,
"time" text,
"opponent#" text,
"site" text,
"tv" text,
"result" text,
"attendance" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which game has the least attendance ?
| SELECT "opponent#" FROM table_204_513 ORDER BY "attendance" LIMIT 1 | squall |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.