instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_56231 (
"Yard Name" text,
"Location (City, State)" text,
"1st Ship Delivery Date" text,
"Ship Types Delivered" text,
"Total Number of Ways" text,
"Total Vessels Built for USMC" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- wh... | SELECT "Yard Name" FROM table_56231 WHERE "Ship Types Delivered" = 'n3 type, v4 type' AND "Total Vessels Built for USMC" = '13 ships for usmc' | wikisql |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'glucagon' AND STRFTIME('%y', medication.drugstartti... | eicu |
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 HOSP_DOC_CD, HOSP_DOC_NM FROM t_kc22 WHERE MED_CLINIC_ID = '43987098526' | css |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE lab (
labid numbe... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'blood product administration' AND DATETIME(treatment.treatmenttime, 'start of year') = DATETIME(CURRENT_TIME... | eicu |
CREATE TABLE table_name_27 (
date VARCHAR,
pos VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On which date was the position less than 4 at Piraeus?
| SELECT date FROM table_name_27 WHERE pos < 4 AND venue = "piraeus" | sql_create_context |
CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varchar(12),
EMP_INITIAL varchar(1),
EMP_JOBCODE varchar(5),
EMP_HIREDATE datetime,
EMP_DOB datetime
)
CREATE TABLE STUDENT (
STU_NUM int,
STU_LNAME varchar(15),
STU_FNAME varchar(15),
STU_INIT varchar(1),... | SELECT STU_FNAME, SUM(STU_GPA) FROM STUDENT WHERE STU_GPA < (SELECT AVG(STU_GPA) FROM STUDENT) GROUP BY STU_FNAME ORDER BY SUM(STU_GPA) DESC | nvbench |
CREATE TABLE table_204_217 (
id number,
"camp" text,
"div sec\ndivision" text,
"admin\ndistrict" text,
"9 feb" number,
"11 feb" number,
"16 feb" number,
"25 feb" number,
"27 feb" number,
"2 mar" number,
"4 mar" number,
"6 mar" number,
"11 mar" number,
"13 mar" num... | SELECT "camp" FROM table_204_217 WHERE "camp" IN ('gamini maha vidyalayam', 'nelukkulam kalaimahal maha vidyalayam') ORDER BY "9 feb" DESC LIMIT 1 | squall |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE patient (
uniquepid text,
... | SELECT t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'glucose - d50' AND DATETIME(treatment.treatmenttime,... | eicu |
CREATE TABLE table_1637981_7 (
detroit__dtw_ VARCHAR,
lansing__lan_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When Lansing's fare is $433.59, what is the Detroit fare?
| SELECT detroit__dtw_ FROM table_1637981_7 WHERE lansing__lan_ = "$433.59" | sql_create_context |
CREATE TABLE table_53391 (
"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 score for Collingwood as the home te... | SELECT "Home team score" FROM table_53391 WHERE "Home team" = 'collingwood' | wikisql |
CREATE TABLE table_77018 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In which year did he compete in the Universiade?
| SELECT "Year" FROM table_77018 WHERE "Competition" = 'universiade' | wikisql |
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE offering_instructor (
... | SELECT COUNT(*) > 0 FROM semester WHERE NOT semester IN (SELECT DISTINCT SEMESTERalias1.semester FROM course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, semester AS SEMESTERalias1 WHERE COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id AND COURSEalias0.department = 'SM' AND COURSEalias0.number = 2... | advising |
CREATE TABLE table_name_45 (
date VARCHAR,
competition VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Date of the 1999 fifa confederations cup?
| SELECT date FROM table_name_45 WHERE competition = "1999 fifa confederations cup" | sql_create_context |
CREATE TABLE table_2532 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Opponent in the final" text,
"Score in the final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Fred Stolle's final year of competing in a cham... | SELECT MAX("Year") FROM table_2532 | wikisql |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
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... | SELECT FIRST_NAME, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY FIRST_NAME DESC | nvbench |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
trea... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'acute respiratory failure' AND DATETIME(diagnosis.... | eicu |
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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.short_title = "Non-invasive mech vent" | mimicsql_data |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
... | SELECT treatment.treatmenttime FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-35481')) AND STRFTIME('%y', treatment.treatmenttime) >= '2104... | eicu |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedback (
Id nu... | SELECT u.Id AS "user_link", u.Reputation, b.Date FROM Badges AS b INNER JOIN Users AS u ON u.Id = b.UserId WHERE b.Name = 'Generalist' ORDER BY u.Reputation | sede |
CREATE TABLE table_28793672_1 (
golden_tickets VARCHAR,
callback_venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many times is there a golden tickets entry when the callback venue is rcti studio, jakarta?
| SELECT COUNT(golden_tickets) FROM table_28793672_1 WHERE callback_venue = "RCTI Studio, Jakarta" | sql_create_context |
CREATE TABLE table_name_97 (
region VARCHAR,
altitude__metres_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Say the region for 6854 altitudes
| SELECT region FROM table_name_97 WHERE altitude__metres_ = 6854 | sql_create_context |
CREATE TABLE table_name_67 (
player VARCHAR,
to_par VARCHAR,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which Player has a To par of 7, and a Country of spain?
| SELECT player FROM table_name_67 WHERE to_par = "–7" AND country = "spain" | sql_create_context |
CREATE TABLE table_60551 (
"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 2nd Member has a 1st Party of conservative, and a 1st Member of william edward dowdes... | SELECT "2nd Member" FROM table_60551 WHERE "1st Party" = 'conservative' AND "1st Member" = 'william edward dowdeswell' | wikisql |
CREATE TABLE table_name_6 (
number_of_electorates__2009_ INTEGER,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the electorates in 2009 for Modi Nagar?
| SELECT AVG(number_of_electorates__2009_) FROM table_name_6 WHERE name = "modi nagar" | 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 PER_SOL FROM t_kc24 WHERE MED_CLINIC_ID = '42962447104' | css |
CREATE TABLE table_68671 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the least points with chassis of kurtis kraft 3000 and year before 1951
| SELECT MIN("Points") FROM table_68671 WHERE "Chassis" = 'kurtis kraft 3000' AND "Year" < '1951' | 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 COUNT(*) FROM t_kc21 WHERE t_kc21.PERSON_NM = '郎晓燕' AND t_kc21.IN_HOSP_DATE BETWEEN '2002-03-03' AND '2014-06-18' AND t_kc21.CLINIC_TYPE = '住院' | css |
CREATE TABLE table_22904707_1 (
title VARCHAR,
us_viewers__million_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the name of the episode that had 14.52 viewers?
| SELECT title FROM table_22904707_1 WHERE us_viewers__million_ = "14.52" | sql_create_context |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number... | SELECT AVG(CAST(Score AS FLOAT)) AS VOTE FROM Posts WHERE Posts.OwnerUserId = @UserId AND Posts.PostTypeId = 2 | sede |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE vitalperiodic (
... | SELECT microlab.organism FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-19622' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient... | eicu |
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
... | SELECT COUNT(*) FROM Votes JOIN Posts ON Votes.PostId = Posts.Id WHERE Votes.VoteTypeId IN (3) AND Votes.CreationDate >= DATEADD(DAY, -30, GETDATE()) AND Posts.PostTypeId IN (2) | sede |
CREATE TABLE table_21123 (
"Rank" real,
"Company" text,
"Country" text,
"Industry" text,
"Sales (billion $)" text,
"Profits (billion $)" text,
"Assets (billion $)" text,
"Market Value (billion $)" text
)
-- Using valid SQLite, answer the following questions for the tables provided abov... | SELECT COUNT("Rank") FROM table_21123 WHERE "Profits (billion $)" = '9.52' | wikisql |
CREATE TABLE player (
Player_ID int,
Player text,
Years_Played text,
Total_WL text,
Singles_WL text,
Doubles_WL text,
Team int
)
CREATE TABLE country (
Country_id int,
Country_name text,
Capital text,
Official_native_language text
)
CREATE TABLE match_season (
Season re... | SELECT Position, COUNT(*) FROM match_season GROUP BY Position | nvbench |
CREATE TABLE table_train_185 (
"id" int,
"dyscrasia" bool,
"bleeding" int,
"panic_disorder" bool,
"renal_disease" bool,
"anxiety" bool,
"creatinine_clearance_cl" float,
"alcohol_abuse" bool,
"retinopathy" bool,
"NOUSE" float
)
-- Using valid SQLite, answer the following questio... | SELECT * FROM table_train_185 WHERE anxiety = 1 OR panic_disorder = 1 | criteria2sql |
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 zyjybgb (
BBCJBW text,
BBDM t... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb... | css |
CREATE TABLE table_name_58 (
game INTEGER,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest game number when the record was 26-24-9?
| SELECT MIN(game) FROM table_name_58 WHERE record = "26-24-9" | sql_create_context |
CREATE TABLE STUDENT (
STU_NUM int,
STU_LNAME varchar(15),
STU_FNAME varchar(15),
STU_INIT varchar(1),
STU_DOB datetime,
STU_HRS int,
STU_CLASS varchar(2),
STU_GPA float(8),
STU_TRANSFER numeric,
DEPT_CODE varchar(18),
STU_PHONE varchar(4),
PROF_NUM int
)
CREATE TABLE DE... | SELECT MAX(STU_GPA), AVG(STU_GPA) FROM STUDENT GROUP BY DEPT_CODE | nvbench |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_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,
H... | SELECT t_kc21.MED_ORG_DEPT_CD, t_kc21.MED_ORG_DEPT_NM, AVG(t_kc21.IN_HOSP_DAYS) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '8001316' GROUP BY t_kc21.MED_ORG_DEPT_CD ORDER BY AVG(t_kc21.IN_HOSP_DAYS) | css |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
... | SELECT num.TagName AS Tag, ROW_NUMBER() OVER (ORDER BY rate.Rate DESC) AS Rank, ROW_NUMBER() OVER (ORDER BY num.Num DESC) AS TotalRank, rate.Rate AS Questions, num.Num AS QuestionsTotal FROM (SELECT COUNT(PostId) AS Rate, TagName FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostId AND Posts.... | sede |
CREATE TABLE table_29569 (
"Game" real,
"March" real,
"Opponent" text,
"Score" text,
"Location/Attendance" text,
"Record" text,
"Points" real,
"Decision" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many games were numbered 69?
| SELECT COUNT("Opponent") FROM table_29569 WHERE "Game" = '69' | wikisql |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
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 job... | SELECT DISTINCT course_offering.end_time, course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.start_time, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM semester INNER JOIN course_offering ON semester.semester_id = course_o... | advising |
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 AVG(demographic.days_stay) FROM demographic WHERE demographic.ethnicity = "WHITE - RUSSIAN" | mimicsql_data |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT jybgb.BBCJBW FROM jybgb WHERE jybgb.BGDH = '14839053409' | css |
CREATE TABLE table_name_98 (
player VARCHAR,
to_par VARCHAR,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who has a To par of 2, and a Country of united states?
| SELECT player FROM table_name_98 WHERE to_par = "–2" AND country = "united states" | sql_create_context |
CREATE TABLE table_name_88 (
downstream VARCHAR,
upstream VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Downstream, when Upstream is '384 kbit'?
| SELECT downstream FROM table_name_88 WHERE upstream = "384 kbit" | sql_create_context |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE allergy (
... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT microlab.patientunitstayid FROM microlab WHERE microlab.culturesite = 'sputum, tracheal specimen' AND STRFTIME('%y', microlab.culturetakentime) <= '2104') | eicu |
CREATE TABLE table_name_25 (
margin_of_victory VARCHAR,
tournament VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the margin of victory for PGA Championship?
| SELECT margin_of_victory FROM table_name_25 WHERE tournament = "pga championship" | sql_create_context |
CREATE TABLE table_64947 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" text,
"Finish" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country is Larry Mize from?
| SELECT "Country" FROM table_64947 WHERE "Player" = 'larry mize' | wikisql |
CREATE TABLE table_11047 (
"Code" real,
"Type" text,
"Name" text,
"Area (km 2 )" real,
"Population" real,
"Regional County Municipality" text,
"Region" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the regional county municipality w... | SELECT "Regional County Municipality" FROM table_11047 WHERE "Type" = 'm' AND "Code" < '91015' | wikisql |
CREATE TABLE table_name_81 (
silver VARCHAR,
bronze VARCHAR,
gold VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is number of silver for the country with more than 0 gold, rank of 14, and more than 4 bronze?
| SELECT COUNT(silver) FROM table_name_81 WHERE gold > 0 AND rank = "14" AND bronze > 4 | sql_create_context |
CREATE TABLE table_42964 (
"Year" real,
"Result" real,
"World Rank" text,
"Location" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Year has a Result smaller than 20.31, and a World Rank of 5th?
| SELECT AVG("Year") FROM table_42964 WHERE "Result" < '20.31' AND "World Rank" = '5th' | wikisql |
CREATE TABLE table_24108789_4 (
after INTEGER,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the latest after when the player is Steve Stricker?
| SELECT MAX(after) FROM table_24108789_4 WHERE player = "Steve Stricker" | sql_create_context |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT COUNT(*) FROM treatment WHERE treatment.treatmentname = 'cultures - csf' AND DATETIME(treatment.treatmenttime) >= DATETIME(CURRENT_TIME(), '-5 year') | eicu |
CREATE TABLE table_65996 (
"Year" real,
"Formula" text,
"Driver" text,
"Constructor" text,
"Location" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which location was won by George Heath?
| SELECT "Location" FROM table_65996 WHERE "Driver" = 'george heath' | wikisql |
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 (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions... | SELECT prescriptions.drug_type, prescriptions.formulary_drug_cd FROM prescriptions WHERE prescriptions.drug = "BusPIRone" | mimicsql_data |
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND lab.itemid = "51269" | mimicsql_data |
CREATE TABLE table_63670 (
"School" text,
"City" text,
"Team Name" text,
"Enrollment 08-09" real,
"IHSAA Class" text,
"IHSAA Class Football" text,
"County" text,
"Year Joined (Or Joining)" real,
"Previous Conference" text
)
-- Using valid SQLite, answer the following questions for ... | SELECT "School" FROM table_63670 WHERE "Team Name" = 'pirates' | wikisql |
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)... | 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 = 'TAMPA' AND date_day.day_number = 4 AND date_day.month_number = 4 AND date... | atis |
CREATE TABLE person_info (
RYBH text,
XBDM number,
XBMC text,
XM text,
CSRQ time,
CSD text,
MZDM text,
MZMC text,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
XLDM text,
XLMC text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGD... | SELECT CYBQDM, CYBQMC, CYCWH FROM zyjzjlb WHERE JZLSH = '84889733276' | css |
CREATE TABLE table_44914 (
"Driver" text,
"Team" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the driver with 1 grid?
| SELECT "Driver" FROM table_44914 WHERE "Grid" = '1' | wikisql |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | SELECT AVG(MED_AMOUT) FROM t_kc24 WHERE MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_AGE >= 6) | css |
CREATE TABLE table_name_89 (
manuals VARCHAR,
kind VARCHAR,
opus VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the manuals with a kind of r, and an opus of 144?
| SELECT manuals FROM table_name_89 WHERE kind = "r" AND opus = "144" | sql_create_context |
CREATE TABLE table_204_291 (
id number,
"rank" number,
"name" text,
"nation" text,
"cp" number,
"fp" number,
"points" number,
"placings" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- name a competitor that scored more that 2600 points... | SELECT "name" FROM table_204_291 WHERE "points" > 2600 AND "nation" = 'canada' | squall |
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE airline (
airline_co... | SELECT DISTINCT flight_id FROM flight WHERE (((arrival_time <= 2100 AND arrival_time >= 2000) AND to_airport IN (SELECT AIRPORT_SERVICEalias0.airport_code FROM airport_service AS AIRPORT_SERVICEalias0 WHERE AIRPORT_SERVICEalias0.city_code IN (SELECT CITYalias0.city_code FROM city AS CITYalias0 WHERE CITYalias0.city_nam... | atis |
CREATE TABLE table_63129 (
"County" text,
"Per capita income" text,
"Median household income" text,
"Median family income" text,
"Population" real,
"Number of households" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the median family i... | SELECT "Median family income" FROM table_63129 WHERE "Per capita income" = '$24,114' | wikisql |
CREATE TABLE zzmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | SELECT person_info.XM FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE jybgb.BGDH = '8... | css |
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 employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL v... | SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 | nvbench |
CREATE TABLE table_name_49 (
conv VARCHAR,
pens VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many conversions did Severo Koroduadua Waqanibau have when he has 0 pens?
| SELECT conv FROM table_name_49 WHERE pens = "0" AND player = "severo koroduadua waqanibau" | sql_create_context |
CREATE TABLE table_42384 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the opponent for the game with 37,845 people in attendance?
| SELECT "Opponent" FROM table_42384 WHERE "Attendance" = '37,845' | 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 jobs (
JOB_ID varchar(10),
JOB_... | SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY HIRE_DATE | nvbench |
CREATE TABLE table_32524 (
"Year" real,
"Name" text,
"Date" text,
"Stages" text,
"Distance" text,
"Winner" text,
"Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What tour was cancelled?
| SELECT "Name" FROM table_32524 WHERE "Date" = 'cancelled' | wikisql |
CREATE TABLE roller_coaster (
Roller_Coaster_ID int,
Name text,
Park text,
Country_ID int,
Length real,
Height real,
Speed text,
Opened text,
Status text
)
CREATE TABLE country (
Country_ID int,
Name text,
Population int,
Area int,
Languages text
)
-- Using val... | SELECT T1.Name, AVG(T2.Speed) FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name ORDER BY T1.Name DESC | nvbench |
CREATE TABLE table_22383603_1 (
start__reg_season_ VARCHAR,
top_record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When did the season start that ended with the top record of Lindenwood (20 0 0)?
| SELECT start__reg_season_ FROM table_22383603_1 WHERE top_record = "Lindenwood (20–0–0)" | sql_create_context |
CREATE TABLE table_203_742 (
id number,
"rnd" number,
"date" text,
"race name" text,
"circuit" text,
"city/location" text,
"pole position" text,
"fastest lap" text,
"winning driver" text,
"winning team" text,
"report" text
)
-- Using valid SQLite, answer the following quest... | SELECT "city/location" FROM table_203_742 WHERE "date" > (SELECT "date" FROM table_203_742 WHERE "date" = 'march 5') ORDER BY "date" LIMIT 1 | squall |
CREATE TABLE table_80223 (
"Year" real,
"Alabama" text,
"Arkansas" text,
"Auburn" text,
"Ole Miss" text,
"Mississippi St." text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the Arkansas player associated with Ken Stabler?
| SELECT "Arkansas" FROM table_80223 WHERE "Alabama" = 'ken stabler' | wikisql |
CREATE TABLE table_46635 (
"Model Number" text,
"Frequency" text,
"L2-Cache" text,
"Front Side Bus" text,
"Multiplier" text,
"Voltage" text,
"Socket" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Front Side Bus for Model Number ... | SELECT "Front Side Bus" FROM table_46635 WHERE "Model Number" = 'c3 850' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "SDH" AND lab.fluid = "Pleural" | mimicsql_data |
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_fro... | SELECT DISTINCT airline.airline_code FROM airline, 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_na... | atis |
CREATE TABLE asset_parts (
asset_id number,
part_id number
)
CREATE TABLE maintenance_engineers (
engineer_id number,
company_id number,
first_name text,
last_name text,
other_details text
)
CREATE TABLE fault_log_parts (
fault_log_entry_id number,
part_fault_id number,
fault_s... | SELECT COUNT(*), T1.fault_log_entry_id FROM fault_log AS T1 JOIN engineer_visits AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY COUNT(*) DESC LIMIT 1 | spider |
CREATE TABLE table_name_75 (
date_of_vacancy VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the vacancy date of Dundee?
| SELECT date_of_vacancy FROM table_name_75 WHERE team = "dundee" | 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_of_notes, COUNT(date_of_notes) FROM Assessment_Notes ORDER BY date_of_notes | nvbench |
CREATE TABLE table_60886 (
"Team" text,
"Club home city" text,
"2006\u201307 Season" text,
"Stadium" text,
"Stadium capacity" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is 2006-07 Season, when Team is 'KF Fush Kosova'?
| SELECT "2006\u201307 Season" FROM table_60886 WHERE "Team" = 'kf fushë kosova' | wikisql |
CREATE TABLE table_72114 (
"Rnd" text,
"Race Name" text,
"Circuit" text,
"City/Location" text,
"Date" text,
"Pole position" text,
"Winning driver" text,
"Winning team" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wha... | SELECT "Rnd" FROM table_72114 WHERE "Circuit" = 'Phoenix International Raceway' | wikisql |
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId ... | SELECT * FROM Users WHERE AboutMe LIKE '%Valued Associate%' OR AboutMe LIKE '%Stack Exchange%' OR WebsiteUrl LIKE '%//stackexchange.com' OR WebsiteUrl LIKE '%//stackexchange.com/' | sede |
CREATE TABLE table_76747 (
"Pick #" real,
"NFL Team" text,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which college has a nose tackle position?
| SELECT "College" FROM table_76747 WHERE "Position" = 'nose tackle' | wikisql |
CREATE TABLE gyb (
CLINIC_ID 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,
INSU_TYPE text,
IN... | 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_name_80 (
up_for_reelection INTEGER,
took_office VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the earliest year a Chairman who took office after 2011 is up for reelection?
| SELECT MIN(up_for_reelection) FROM table_name_80 WHERE took_office > 2011 AND position = "chairman" | sql_create_context |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName te... | SELECT COUNT(*) FROM Votes | sede |
CREATE TABLE table_204_642 (
id number,
"team" text,
"domestic tournament" text,
"position" text,
"appearance" text,
"qualified" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which team came in after the titans in the miway t20 challenge ?
| SELECT "team" FROM table_204_642 WHERE "appearance" > (SELECT "appearance" FROM table_204_642 WHERE "team" = 'titans' AND "domestic tournament" = '2011-12 miway t20 challenge') AND "domestic tournament" = '2011-12 miway t20 challenge' ORDER BY "appearance" LIMIT 1 | squall |
CREATE TABLE table_name_80 (
date VARCHAR,
round VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the date when the round is qf?
| SELECT date FROM table_name_80 WHERE round = "qf" | sql_create_context |
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConce... | WITH USER_BY_TAG AS (SELECT ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) AS Rank, u.Id AS "user_link", COUNT(*) AS UpVotes FROM Tags AS t INNER JOIN PostTags AS pt ON pt.TagId = t.Id INNER JOIN Posts AS p ON p.ParentId = pt.PostId INNER JOIN Votes AS v ON v.PostId = p.Id AND VoteTypeId = 2 INNER JOIN Users AS u ON u.Id =... | sede |
CREATE TABLE table_47368 (
"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 "Location Attendance" FROM table_47368 WHERE "High assists" = 'ramon sessions (8)' AND "Date" = 'march 30' | wikisql |
CREATE TABLE fgwyjzb (
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 MIN(t_kc24.MED_AMOUT), MAX(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '5848543' AND gwyjzb.IN_DIAG_DIS_CD = 'A46.X63' UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '5848543' AND fgwyjzb.IN_DIA... | css |
CREATE TABLE table_22683369_8 (
league INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the lowest number of points scored in the league cup?
| SELECT MIN(league) AS Cup FROM table_22683369_8 | sql_create_context |
CREATE TABLE table_name_23 (
country VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Country has a Rank of 5?
| SELECT country FROM table_name_23 WHERE rank = 5 | sql_create_context |
CREATE TABLE hz_info_zyjzjlb (
JZLSH number,
YLJGDM number,
zyjzjlb_id number
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
... | SELECT * FROM person_info JOIN hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjz... | css |
CREATE TABLE table_49024 (
"School Year" text,
"Volleyball" text,
"Cross Country" text,
"Soccer" text,
"Tennis" text,
"Golf" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Tennis, when School Year is 2004-05?
| SELECT "Tennis" FROM table_49024 WHERE "School Year" = '2004-05' | wikisql |
CREATE TABLE table_36614 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what Round was a Defensive Tackle Pick # less than 19?
| SELECT COUNT("Round") FROM table_36614 WHERE "Position" = 'defensive tackle' AND "Pick #" < '19' | wikisql |
CREATE TABLE Claims (
Claim_ID INTEGER,
Policy_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER
)
CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amoun... | SELECT Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa' ORDER BY Amount_Payment DESC | nvbench |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
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 labevents (
ro... | SELECT MAX(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 19412) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'base excess') AND DATETIME(labevents.charttime, 'start of month') = DATETIM... | mimic_iii |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.