instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_59 (
played INTEGER,
points VARCHAR,
against VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of games played for the team with 12 points and an against smaller than 52?
| SELECT AVG(played) FROM table_name_59 WHERE points = 12 AND against < 52 | sql_create_context |
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 (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT procedures.short_title FROM procedures WHERE procedures.icd9_code = "598" | mimicsql_data |
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Coun... | SELECT meter_200, SUM(ID) FROM swimmer GROUP BY meter_200 ORDER BY meter_200 DESC | nvbench |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE medication (
medicatio... | 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 = 'bladder ca' AND STRFTIME('%y', diagnosis.diagnosis... | eicu |
CREATE TABLE table_6276 (
"Tournament" text,
"Wins" real,
"Top-5" real,
"Top-10" real,
"Top-25" real,
"Events" real,
"Cuts made" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Events is the highest one that has a Top-5 larger than 5, a... | SELECT MAX("Events") FROM table_6276 WHERE "Top-5" > '5' AND "Top-10" > '28' | wikisql |
CREATE TABLE film_market_estimation (
market_id VARCHAR
)
CREATE TABLE film (
title VARCHAR,
director VARCHAR,
film_id VARCHAR,
country VARCHAR
)
CREATE TABLE market (
Market_ID VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the ti... | SELECT title, director FROM film WHERE NOT film_id IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.market_id WHERE country = 'China') | sql_create_context |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDi... | SELECT pf.PostId AS "post_link", COUNT(*) AS CVs, p.ViewCount AS Views, p.Score, p.AnswerCount AS Answers, p.CreationDate AS Date, (COUNT(*) * 5 - p.Score - (p.ViewCount / 100)) AS Hatedness, AVG(pf.Id) AS ids FROM PendingFlags AS pf INNER JOIN Posts AS p ON p.Id = pf.PostId WHERE p.Tags LIKE '%regex%' AND ClosedDate I... | sede |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,... | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM txmzjzjlb JOIN jybgb JOIN jyjgzbb ON txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE txmzjzjlb.JZZDBM = 'W44.704' AND jyjgzbb.JCZBMC = '... | css |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_gradu... | SELECT DISTINCT instructor.name FROM instructor, course, course_offering, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course_offering.offering_id = offering_instructor.offering_id AND instructor.instructor_id = offering_instructor.instructor_id AND NOT instr... | advising |
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 AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc21_t_kc24.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_AGE <= 19) | css |
CREATE TABLE table_27449 (
"June 10-11" text,
"March 27-29" text,
"January 15-16" text,
"November 3" text,
"August 21-22" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the data on November 3, if the data on January 15-16 is January 15, 201... | SELECT "November 3" FROM table_27449 WHERE "January 15-16" = 'January 15, 2010' | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT lab.itemid FROM lab WHERE lab.subject_id = "6983" | mimicsql_data |
CREATE TABLE table_52091 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the high grid for osella - alfa romeo, and a Laps larger than 61?
| SELECT MAX("Grid") FROM table_52091 WHERE "Constructor" = 'osella - alfa romeo' AND "Laps" > '61' | 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.admission_type = "URGENT" AND procedures.short_title = "Abdomen artery incision" | mimicsql_data |
CREATE TABLE table_name_61 (
attempts VARCHAR,
touchdowns VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of Attempts, when Touchdowns is 6?
| SELECT COUNT(attempts) FROM table_name_61 WHERE touchdowns = 6 | sql_create_context |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE PostHistory (
Id number,
Po... | WITH Questions AS (SELECT Id, OwnerUserId, Score, CreationDate FROM Posts WHERE OwnerUserId IN (SELECT VALUE FROM STRING_SPLIT('##UserIDs:string##', ','))) SELECT q.Id AS "post_link", q.OwnerUserId AS "user_link", q.Score, q.CreationDate, COUNT(*) AS "# of Qs in 30 days" FROM Questions AS q INNER JOIN Questions AS q2 O... | sede |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT jybgb.JYLX FROM jybgb WHERE jybgb.BGDH = '15477952642' | css |
CREATE TABLE table_2509505_1 (
games VARCHAR,
goals_against VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number of games for goals against being 352
| SELECT COUNT(games) FROM table_2509505_1 WHERE goals_against = 352 | sql_create_context |
CREATE TABLE table_name_7 (
game VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of Game, when Attendance is '18,568'?
| SELECT COUNT(game) FROM table_name_7 WHERE attendance = 18 OFFSET 568 | sql_create_context |
CREATE TABLE table_7081 (
"Team" text,
"Match" real,
"Points" real,
"Draw" real,
"Lost" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many match values have points under 14 and 0 draws?
| SELECT COUNT("Match") FROM table_7081 WHERE "Points" < '14' AND "Draw" < '0' | wikisql |
CREATE TABLE table_name_20 (
lost VARCHAR,
tied VARCHAR,
drawn VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the lost with tie of 0 and drawn of 47
| SELECT lost FROM table_name_20 WHERE tied = "0" AND drawn = "47" | sql_create_context |
CREATE TABLE table_43946 (
"Round" real,
"Pick" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Overall has a College of michigan state, a Position of fb, and a Round larger than... | SELECT SUM("Overall") FROM table_43946 WHERE "College" = 'michigan state' AND "Position" = 'fb' AND "Round" > '8' | wikisql |
CREATE TABLE table_1850282_7 (
other VARCHAR,
species VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the other for chironius multiventris septentrionalis
| SELECT other FROM table_1850282_7 WHERE species = "Chironius multiventris septentrionalis" | sql_create_context |
CREATE TABLE table_25118 (
"Details" text,
"Host Nation(s)" text,
"Final Venue" text,
"Winner" text,
"Result" text,
"Runner-up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the runner-up is [[|]] 151/8 (50.0 overs), what were the results?
| SELECT "Result" FROM table_25118 WHERE "Runner-up" = '[[|]] 151/8 (50.0 overs)' | wikisql |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE hz_info (
KH text,
KLX number... | SELECT mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '27160966' AND NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2007-10-30') | css |
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
baseP... | SELECT bedType, COUNT(*) FROM Rooms GROUP BY bedType | nvbench |
CREATE TABLE table_name_74 (
record VARCHAR,
visitor VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Record of the game on January 31 with Visitors Detroit Red Wings?
| SELECT record FROM table_name_74 WHERE visitor = "detroit red wings" AND date = "january 31" | sql_create_context |
CREATE TABLE table_37174 (
"Date" text,
"Time ( CEST )" real,
"Team #1" text,
"Res." text,
"Team #2" text,
"Round" text,
"Spectators" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is team 1 in group h?
| SELECT "Team #1" FROM table_37174 WHERE "Round" = 'group h' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "29" AND prescriptions.drug = "Esmolol" | mimicsql_data |
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
countr... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE program_course.catego... | advising |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
Pos... | SELECT TOP(100) AS Title, Score, DisplayName, Reputation FROM Posts AS p JOIN Users AS u ON p.OwnerUserId = u.Id WHERE PostTypeId = 1 ORDER BY Score DESC | sede |
CREATE TABLE teachers (
firstname VARCHAR,
classroom VARCHAR
)
CREATE TABLE list (
classroom VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the first names of the teachers that teach first grade.
| SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1 | sql_create_context |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Sertraline" | mimicsql_data |
CREATE TABLE table_75293 (
"Medal" text,
"Name" text,
"Games" text,
"Sport" text,
"Event" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What wrestling event was participated in during the 2008 Beijing games?
| SELECT "Event" FROM table_75293 WHERE "Games" = '2008 beijing' AND "Sport" = 'wrestling' | wikisql |
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 zzmzjzjlb.MZZYZDZZBM, zzmzjzjlb.MZZYZDZZMC FROM zzmzjzjlb WHERE zzmzjzjlb.JZLSH = '47300136969' UNION SELECT fzzmzjzjlb.MZZYZDZZBM, fzzmzjzjlb.MZZYZDZZMC FROM fzzmzjzjlb WHERE fzzmzjzjlb.JZLSH = '47300136969' | css |
CREATE TABLE table_5385 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Before round 7, what is the greatest Pick # for a player that plays defensive tackle?
| SELECT MAX("Pick #") FROM table_5385 WHERE "Position" = 'defensive tackle' AND "Round" < '7' | wikisql |
CREATE TABLE device (
Device_ID int,
Device text,
Carrier text,
Package_Version text,
Applications text,
Software_Platform text
)
CREATE TABLE shop (
Shop_ID int,
Shop_Name text,
Location text,
Open_Date text,
Open_Year int
)
CREATE TABLE stock (
Shop_ID int,
Device... | SELECT Carrier, COUNT(Carrier) FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID GROUP BY Carrier ORDER BY COUNT(Carrier) DESC | nvbench |
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,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_info.person_i... | css |
CREATE TABLE INVOICES (
payment_method_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the distinct payment method codes in all the invoices?
| SELECT DISTINCT payment_method_code FROM INVOICES | sql_create_context |
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate t... | SELECT Id, Reputation FROM Users WHERE Id IN (SELECT UserId FROM Comments WHERE CreationDate < '2014-10-10' AND PostId IN (SELECT Id FROM Posts WHERE ParentId IN (SELECT Id FROM Posts WHERE Tags LIKE '%<php>%') UNION SELECT Id FROM Posts WHERE Tags LIKE '%<php>%')) AND Reputation <= 3 ORDER BY Reputation DESC | sede |
CREATE TABLE table_name_25 (
date VARCHAR,
week VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When does week 11 start?
| SELECT date FROM table_name_25 WHERE week = "11" | sql_create_context |
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 p... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'nasogastric tube - insertion' AND STRFTIME('%y', treatment.treatmenttime) >= '2102') AS t1 JOIN (SELECT pati... | eicu |
CREATE TABLE table_60307 (
"Shooter" text,
"Event" text,
"Rank points" text,
"Score points" text,
"Total" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Score points has an Event of og beijing, and Rank points of olympic gold medalist?
| SELECT "Score points" FROM table_60307 WHERE "Event" = 'og beijing' AND "Rank points" = 'olympic gold medalist' | 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 IN_DIAG_DIS_CD, IN_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_ID = '32981516' | css |
CREATE TABLE table_name_75 (
crowd INTEGER,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When melbourne was the away team, what was the lowest crowd turnout they had?
| SELECT MIN(crowd) FROM table_name_75 WHERE away_team = "melbourne" | sql_create_context |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE PostHistory (
Id num... | SELECT CreationDate, Tags, ViewCount, Score, CommentCount FROM Posts WHERE Tags LIKE '<terraform>' OR Tags LIKE '<ansible>' OR Tags LIKE '<chef>' OR Tags LIKE '<puppet>' | sede |
CREATE TABLE table_11964263_13 (
score VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the score for april 29?
| SELECT score FROM table_11964263_13 WHERE date = "April 29" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.long_title = "Other shock without mention of trauma" | mimicsql_data |
CREATE TABLE table_10584 (
"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.
-- Hawthorn played as an Away team in which venue?
| SELECT "Venue" FROM table_10584 WHERE "Away team" = 'hawthorn' | wikisql |
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... | SELECT COUNT(DISTINCT course.course_id) FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 14 AND program_course.category LIKE 'ULCS' | advising |
CREATE TABLE table_name_6 (
grid INTEGER,
time_retired VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest grid with collision as the Time/Retired for pedro diniz?
| SELECT MIN(grid) FROM table_name_6 WHERE time_retired = "collision" AND driver = "pedro diniz" | sql_create_context |
CREATE TABLE table_18477 (
"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 candidates ran in the race where the incumbent is J. L. Pilcher... | SELECT COUNT("Candidates") FROM table_18477 WHERE "Incumbent" = 'J. L. Pilcher' | wikisql |
CREATE TABLE table_54249 (
"Player" text,
"No.(s)" text,
"Height in Ft." text,
"Position" text,
"Years for Rockets" text,
"School/Club Team/Country" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Height for Years of Rockets of 2005-0... | SELECT "Height in Ft." FROM table_54249 WHERE "Years for Rockets" = '2005-06' | wikisql |
CREATE TABLE teaches (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0)
)
CREATE TABLE time_slot (
time_slot_id varchar(4),
day varchar(1),
start_hr numeric(2),
start_min numeric(2),
end_hr numeric(2),
end_min numeric(2)
)
CREAT... | SELECT ID, salary FROM instructor ORDER BY salary | nvbench |
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 microlab (
microl... | SELECT DISTINCT t1.c1 FROM (SELECT lab.labresult, PERCENT_RANK() OVER (ORDER BY lab.labresult) AS c1 FROM lab WHERE lab.labname = 'hgb' AND lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age = (SELECT patient.age FROM patient WHERE patient.uniquepid = '011-20295' AND NOT patient.h... | eicu |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
... | SELECT STRFTIME('%j', patient.unitdischargetime) - STRFTIME('%j', patient.unitadmittime) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-86645') AND NOT patient.unitadmittime IS NULL ORDER BY patient.unitadmittime LIMIT 1 | eicu |
CREATE TABLE companies (
id number,
name text,
headquarters text,
industry text,
sales_billion number,
profits_billion number,
assets_billion number,
market_value_billion text
)
CREATE TABLE office_locations (
building_id number,
company_id number,
move_in_year number
)
CRE... | SELECT COUNT(*) FROM companies WHERE industry = "Banking" OR industry = "Conglomerate" | spider |
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 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 = '027-142451' AND patient.hosp... | eicu |
CREATE TABLE table_3493 (
"Institution" text,
"Nickname" text,
"Location (all in Minnesota)" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Joined" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the enrollment for Augsburg co... | SELECT MIN("Enrollment") FROM table_3493 WHERE "Institution" = 'Augsburg College' | wikisql |
CREATE TABLE table_21321 (
"Rank" real,
"1-year peak" text,
"5-year peak" text,
"10-year peak" text,
"15-year peak" text,
"20-year peak" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is every 5-year peek with a when Anatoly Karpov, 2820 is... | SELECT "5-year peak" FROM table_21321 WHERE "15-year peak" = 'Anatoly Karpov, 2820' | wikisql |
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 zyjzjlb.JZLSH FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '28349097' AND NOT zyjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2015-04-17') | css |
CREATE TABLE table_15910 (
"Year" text,
"Typhus" real,
"Typhoid fever" real,
"Relapsing fever" real,
"Smallpox" real,
"Malaria" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the typhoid fever number for the year 1934
| SELECT "Typhoid fever" FROM table_15910 WHERE "Year" = '1934' | wikisql |
CREATE TABLE zyb (
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 COUNT(*) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_NM = '秦霞雰' AND t_kc22.STA_DATE BETWEEN '2002-06-24' AND '2015-12-19' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gyb.PERSON_NM = '秦霞雰' A... | css |
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 Activity (
actid INTEGER,
activity_name varchar(25)
)
CREATE TABLE Participates_in (
stuid INTEG... | SELECT Rank, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.Advisor GROUP BY T1.Rank | nvbench |
CREATE TABLE table_name_36 (
award VARCHAR,
category VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the award for the Choice TV: Breakout Star Female category?
| SELECT award FROM table_name_36 WHERE category = "choice tv: breakout star female" | sql_create_context |
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost 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, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'HOUSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS... | atis |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT ACC_Regular_Season, ACC_Percent FROM basketball_match ORDER BY ACC_Percent DESC | nvbench |
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 wdmzjzjlb.JZLSH FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE hz_info.RYBH = '69886935' AND NOT wdmzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2014-06-18') UNION SELECT bdmzjzjlb.JZLSH FROM hz_info JOIN... | css |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.short_title = "Radiotherapeut proc NEC" | mimicsql_data |
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 procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2135" AND diagnoses.short_title = "Lower extremity embolism" | mimicsql_data |
CREATE TABLE table_name_57 (
position VARCHAR,
years VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What position was played by the player during 1986 1991 1997 1999?
| SELECT position FROM table_name_57 WHERE years = "1986 – 1991 1997 – 1999" | sql_create_context |
CREATE TABLE table_name_30 (
score VARCHAR,
player VARCHAR,
country VARCHAR,
to_par VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score for United States when the player was Mike Reid and the To par was e?
| SELECT score FROM table_name_30 WHERE country = "united states" AND to_par = "e" AND player = "mike reid" | sql_create_context |
CREATE TABLE table_63428 (
"Rank" real,
"Player" text,
"Goals" real,
"Apps" real,
"Rate" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When rank is more than 10, what is the total rate?
| SELECT SUM("Rate") FROM table_63428 WHERE "Rank" > '10' | wikisql |
CREATE TABLE artist (
artist_id number,
name text,
country text,
year_join number,
age number
)
CREATE TABLE exhibition (
exhibition_id number,
year number,
theme text,
artist_id number,
ticket_price number
)
CREATE TABLE exhibition_record (
exhibition_id number,
date t... | SELECT AVG(age), MIN(age) FROM artist WHERE country = 'United States' | spider |
CREATE TABLE table_17311783_9 (
high_points VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who had the high point total against cleveland?
| SELECT high_points FROM table_17311783_9 WHERE team = "Cleveland" | 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 MAX(demographic.age) FROM demographic WHERE demographic.days_stay = "11" AND demographic.dod_year < "2148.0" | mimicsql_data |
CREATE TABLE table_204_521 (
id number,
"rank" number,
"name" text,
"nationality" text,
"time (hand)" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many ranks are there ?
| SELECT COUNT("rank") FROM table_204_521 | squall |
CREATE TABLE table_69018 (
"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 is the date when Joseph is the decision and San Jose is the h... | SELECT "Date" FROM table_69018 WHERE "Decision" = 'joseph' AND "Home" = 'san jose' | wikisql |
CREATE TABLE table_45103 (
"Name" text,
"Latitude" text,
"Longitude" text,
"Diameter (km)" real,
"Year named" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the year that nahete colles was named?
| SELECT MAX("Year named") FROM table_45103 WHERE "Name" = 'nahete colles' | wikisql |
CREATE TABLE table_14055 (
"Ship name" text,
"Year built" real,
"Last refurbished" real,
"Length" text,
"Crew" real,
"Guests" real,
"Staterooms" real,
"Comments" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the earliest year bu... | SELECT MIN("Year built") FROM table_14055 WHERE "Last refurbished" < '2013' | wikisql |
CREATE TABLE table_22916979_5 (
metropolitan_area VARCHAR,
densest_incorporated_place VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the area for north bay village
| SELECT metropolitan_area FROM table_22916979_5 WHERE densest_incorporated_place = "North Bay Village" | sql_create_context |
CREATE TABLE table_18776 (
"Serial & Branch" real,
"Seaman" text,
"Mechanical" text,
"Secretariat" text,
"Supply" text,
"Electrical" text,
"Radio Electrical" text,
"Regulating" text,
"Medical" text
)
-- Using valid SQLite, answer the following questions for the tables provided abov... | SELECT "Regulating" FROM table_18776 WHERE "Radio Electrical" = 'LREN' | wikisql |
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 COUNT(Id), YEAR(CreationDate) FROM Posts WHERE PostTypeId = 1 GROUP BY YEAR(CreationDate) | sede |
CREATE TABLE table_name_8 (
date VARCHAR,
crowd INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what Date is the Crowd larger than 17,000?
| SELECT date FROM table_name_8 WHERE crowd > 17 OFFSET 000 | sql_create_context |
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 countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0... | SELECT HIRE_DATE, SALARY FROM employees | nvbench |
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 '%india%' OR UPPER(Location) LIKE '%IND' ORDER BY Reputation DESC LIMIT 200 | sede |
CREATE TABLE table_name_14 (
game INTEGER,
points INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Game is the lowest one that has Points smaller than 92?
| SELECT MIN(game) FROM table_name_14 WHERE points < 92 | sql_create_context |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
sy... | 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 = '027-154299')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutp... | eicu |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
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,
... | SELECT DISTINCT program_course.workload FROM course, program_course WHERE course.department = 'EECS' AND course.number = 559 AND program_course.course_id = course.course_id | advising |
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 regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE jobs (
JOB_ID varchar(... | SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY AVG(EMPLOYEE_ID) DESC | nvbench |
CREATE TABLE table_name_12 (
code_name VARCHAR,
fsb___ht__mhz_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the code name when the FSB / HT (MHz) is 100 (fsb)?
| SELECT code_name FROM table_name_12 WHERE fsb___ht__mhz_ = "100 (fsb)" | sql_create_context |
CREATE TABLE table_13643320_2 (
gtp_winning_team VARCHAR,
circuit VARCHAR,
gtu_winning_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the GTP winning team in the round in Portland during which Jack Baldwin become part of the GTU winning tea... | SELECT gtp_winning_team FROM table_13643320_2 WHERE circuit = "Portland" AND gtu_winning_team = "Jack Baldwin" | sql_create_context |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM... | css |
CREATE TABLE table_22511 (
"Year" real,
"1st Place Team" text,
"2nd Place Team" text,
"3rd Place Team" text,
"4th Place Team" text,
"Host Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 3rd place team for the year of 1955?
| SELECT "3rd Place Team" FROM table_22511 WHERE "Year" = '1955' | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Hx surgery to organs NEC" AND prescriptions.route = "IV DRIP" | mimicsql_data |
CREATE TABLE table_56247 (
"Locomotive" text,
"Name" text,
"Serial No" text,
"Entered service" text,
"Owner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name for the locomotive n464?
| SELECT "Name" FROM table_56247 WHERE "Locomotive" = 'n464' | wikisql |
CREATE TABLE table_46029 (
"Type" text,
"Name" text,
"Title" text,
"Royal house" text,
"From" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the title of the one who ruled from 2007 BC?
| SELECT "Title" FROM table_46029 WHERE "From" = '2007 bc' | wikisql |
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance... | SELECT COUNT(u.Id), u.Id FROM Badges AS b LEFT JOIN Users AS u ON u.Id = b.UserId WHERE b.Name = 'Constituent' GROUP BY u.Id | sede |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "70" AND lab.label = "Iron Binding Capacity, Total" | mimicsql_data |
CREATE TABLE table_name_31 (
position VARCHAR,
pick VARCHAR,
school_club_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which position has a pick less than 41 from Ohio State?
| SELECT position FROM table_name_31 WHERE pick < 41 AND school_club_team = "ohio state" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.