instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_48621 (
"Team 1" text,
"Agg." text,
"Team 2" text,
"1st leg" text,
"2nd leg" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the team 2 for the match with a team 1 of Panathinaikos?
| SELECT "Team 2" FROM table_48621 WHERE "Team 1" = 'panathinaikos' | wikisql |
CREATE TABLE table_name_23 (
total_matches INTEGER,
draw VARCHAR,
swansea_win VARCHAR,
competition VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many average total matches have a swansea win less than 3, fa cup as the competition, with a draw le... | SELECT AVG(total_matches) FROM table_name_23 WHERE swansea_win < 3 AND competition = "fa cup" AND draw < 0 | sql_create_context |
CREATE TABLE table_name_25 (
set_5 VARCHAR,
set_2 VARCHAR,
set_1 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the set 5 of the match with a set 2 of 26-24 and a set 1 of 27-25?
| SELECT set_5 FROM table_name_25 WHERE set_2 = "26-24" AND set_1 = "27-25" | sql_create_context |
CREATE TABLE table_203_815 (
id number,
"pick #" number,
"nfl team" text,
"player" text,
"position" text,
"college" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what players was drafted after al guepe ?
| SELECT "player" FROM table_203_815 WHERE "pick #" = (SELECT "pick #" FROM table_203_815 WHERE "player" = 'al guepe') + 1 | squall |
CREATE TABLE table_203_783 (
id number,
"season" text,
"tier" number,
"division" text,
"place" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which division has the largest number of ranks ?
| SELECT "division" FROM table_203_783 GROUP BY "division" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_p... | SELECT DISTINCT program.name FROM course INNER JOIN program_course ON program_course.course_id = course.course_id INNER JOIN program ON program.program_id = program_course.program_id WHERE course.department = 'YIDDISH' AND course.number = 101 | advising |
CREATE TABLE table_8917 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which money is the highest one that has a To par of 1, and a Score of 73-70-73-71=28... | SELECT MAX("Money ( $ )") FROM table_8917 WHERE "To par" = '–1' AND "Score" = '73-70-73-71=287' | wikisql |
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 treatment.treatmentname FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-56390' AND NOT patient.hospitaldischargetime IS NULL ORDER BY... | eicu |
CREATE TABLE Reviewer (
rID int,
name text
)
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Give ... | SELECT stars, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY title | 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 intakeoutput (
in... | SELECT microlab.culturetakentime FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-16123')) AND microlab.culturesite = 'sputum, tracheal specime... | eicu |
CREATE TABLE table_1174162_1 (
date_first_settled_as_a_suburb INTEGER,
suburb VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest date settled for chifley?
| SELECT MIN(date_first_settled_as_a_suburb) FROM table_1174162_1 WHERE suburb = "Chifley" | sql_create_context |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | 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 = '严光辉' AND t_kc22.MED_INV_ITEM_TYPE = '治疗费' | css |
CREATE TABLE table_7800 (
"Company Name" text,
"Product Name" text,
"Hardware Model" text,
"Accreditation type" text,
"Accreditation level" text,
"Accreditation status" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Accreditation Sta... | SELECT "Accreditation status" FROM table_7800 WHERE "Product Name" = 'lg rcs-e client' | wikisql |
CREATE TABLE table_2668378_18 (
incumbent VARCHAR,
first_elected VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the incumbent in the district that first elected someone in 1807?
| SELECT incumbent FROM table_2668378_18 WHERE first_elected = "1807" | sql_create_context |
CREATE TABLE table_name_58 (
original_title VARCHAR,
winner_and_nominees VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the original title for the king's speech?
| SELECT original_title FROM table_name_58 WHERE winner_and_nominees = "the king's speech" | sql_create_context |
CREATE TABLE table_1140074_2 (
report VARCHAR,
rnd VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what's the report with rnd being 4
| SELECT report FROM table_1140074_2 WHERE rnd = 4 | sql_create_context |
CREATE TABLE tracklists (
albumid number,
position number,
songid number
)
CREATE TABLE band (
id number,
firstname text,
lastname text
)
CREATE TABLE vocals (
songid number,
bandmate number,
type text
)
CREATE TABLE performance (
songid number,
bandmate number,
stagep... | SELECT COUNT(*) FROM band | spider |
CREATE TABLE table_23723 (
"Player" text,
"Played" real,
"Legs Won" real,
"Legs Lost" real,
"100+" real,
"140+" real,
"180s" real,
"High Checkout" real,
"3-dart Average" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Phil Tay... | SELECT "3-dart Average" FROM table_23723 WHERE "Player" = 'Phil Taylor' | wikisql |
CREATE TABLE table_12936521_2 (
classification VARCHAR,
nickname VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the classification of the institution nicknamed Dolphins?
| SELECT classification FROM table_12936521_2 WHERE nickname = "Dolphins" | sql_create_context |
CREATE TABLE table_name_99 (
founded VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Founded year of the school located in Paul Smiths, New York?
| SELECT founded FROM table_name_99 WHERE location = "paul smiths, new york" | sql_create_context |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABL... | SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 25814 AND STRFTIME('%y', admissions.admittime) >= '2101' ORDER BY admissions.admittime LIMIT 1 | mimic_iii |
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm... | SELECT COUNT(*) FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'cont inv mec ven 96+ hrs') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 12572) AND DATETIME(proced... | mimic_iii |
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "86" AND diagnoses.icd9_code = "45829" | mimicsql_data |
CREATE TABLE zyjybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH number,
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,
... | SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDSM = '口齿病(龋齿病)' AND jyjgzbb.JCZBDM = '559847' UNION SELECT jyjgzbb.CKZ... | css |
CREATE TABLE table_name_37 (
location VARCHAR,
years_in_gfl VARCHAR,
nickname VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the location of the Saints having 1979- as Years in GFL?
| SELECT location FROM table_name_37 WHERE years_in_gfl = "1979-" AND nickname = "saints" | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT procedures.icd9_code FROM procedures WHERE procedures.subject_id = "6983" | mimicsql_data |
CREATE TABLE table_name_83 (
colonized VARCHAR,
chartered VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the colonized year for the chartered year 1958?
| SELECT colonized FROM table_name_83 WHERE chartered = "1958" | sql_create_context |
CREATE TABLE table_30058355_5 (
rank INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the best rank possible?
| SELECT MIN(rank) FROM table_30058355_5 | sql_create_context |
CREATE TABLE table_2668378_18 (
first_elected VARCHAR,
incumbent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was someone first elected in the district with incumbent john smith?
| SELECT first_elected FROM table_2668378_18 WHERE incumbent = "John Smith" | sql_create_context |
CREATE TABLE table_40029 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points on average had a position small... | SELECT AVG("Points") FROM table_40029 WHERE "Position" < '8' AND "Played" = '16' AND "Lost" > '9' | wikisql |
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 medication (
medi... | SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-3496')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutput.cel... | eicu |
CREATE TABLE People (
person_id INTEGER,
first_name VARCHAR(255),
middle_name VARCHAR(255),
last_name VARCHAR(255),
cell_mobile_number VARCHAR(40),
email_address VARCHAR(40),
login_name VARCHAR(40),
password VARCHAR(40)
)
CREATE TABLE People_Addresses (
person_address_id INTEGER,
... | SELECT course_name, COUNT(*) FROM Students AS T1 JOIN Student_Course_Registrations AS T2 ON T1.student_id = T2.student_id JOIN Courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id ORDER BY course_name | nvbench |
CREATE TABLE table_16562 (
"#" real,
"Episode" text,
"Air Date" text,
"Time slot (EST)" text,
"Rating" text,
"Share" real,
"18-49 (Rating/Share)" text,
"Viewers (m)" text,
"Rank (Overall)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
... | SELECT "Air Date" FROM table_16562 WHERE "Share" = '11' | wikisql |
CREATE TABLE coach (
Coach_ID VARCHAR,
Rank VARCHAR
)
CREATE TABLE player_coach (
Coach_ID VARCHAR,
Player_ID VARCHAR
)
CREATE TABLE player (
Player_name VARCHAR,
Player_ID VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show the names of pl... | SELECT T3.Player_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T2.Rank = 1 | sql_create_context |
CREATE TABLE table_21686 (
"Athlete" text,
"Event" text,
"Round of 32" text,
"Round of 16" text,
"Quarterfinals" text,
"Semifinals" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the event for redouane bouchtouk
| SELECT "Event" FROM table_21686 WHERE "Athlete" = 'Redouane Bouchtouk' | wikisql |
CREATE TABLE table_name_51 (
album VARCHAR,
number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 1st week sales for the album finding forever before the number 6?
| SELECT SUM(1 AS st_week_sales) FROM table_name_51 WHERE album = "finding forever" AND number < 6 | sql_create_context |
CREATE TABLE table_name_36 (
score VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Score has a Record of 5-4?
| SELECT score FROM table_name_36 WHERE record = "5-4" | sql_create_context |
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_... | SELECT DISTINCT ground_service.transport_type FROM airport, airport_service, city, ground_service WHERE airport.airport_code = airport_service.airport_code AND city.city_code = airport_service.city_code AND city.city_name = 'SALT LAKE CITY' AND ground_service.airport_code = airport.airport_code | atis |
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE paperdataset (
... | SELECT DISTINCT COUNT(paper.paperid), writes.authorid FROM keyphrase, paper, paperkeyphrase, writes WHERE keyphrase.keyphrasename = 'syntactic parsing' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.paperid = paper.paperid GROUP BY writes.authorid ORDER BY C... | scholar |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,... | SELECT * FROM (SELECT DENSE_RANK() OVER (ORDER BY q.Score DESC) AS Ranking, q.Id AS "post_link", q.Id AS PostId, q.Score AS PostScore FROM Posts AS q JOIN PostTags AS pt ON q.Id = pt.PostId JOIN Tags AS t ON pt.TagId = t.Id WHERE t.TagName = '##TagName##') AS TopQ WHERE Ranking < 50 AND NOT EXISTS(SELECT 1 FROM Posts A... | sede |
CREATE TABLE table_63646 (
"Title" text,
"Localized Title" text,
"Creator" text,
"Years" text,
"Origin" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the title in English for , aejangpan hongchawangja?
| SELECT "Title" FROM table_63646 WHERE "Localized Title" = '애장판 홍차왕자, aejangpan hongchawangja' | wikisql |
CREATE TABLE table_13574 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the To par for the player that won in 2003, with a total larger than 145?
| SELECT COUNT("To par") FROM table_13574 WHERE "Year(s) won" = '2003' AND "Total" > '145' | wikisql |
CREATE TABLE table_61274 (
"Position" real,
"Club" text,
"Played" real,
"Points" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Goal Difference" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.... | SELECT AVG("Played") FROM table_61274 WHERE "Position" < '4' AND "Wins" > '16' AND "Points" = '38' AND "Goals against" > '35' | wikisql |
CREATE TABLE table_203_512 (
id number,
"release date" text,
"album" text,
"catalog number" text,
"chart position" number,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- the album whatever came before what album ?
| SELECT "album" FROM table_203_512 WHERE "release date" > (SELECT "release date" FROM table_203_512 WHERE "album" = 'whatever') ORDER BY "release date" LIMIT 1 | squall |
CREATE TABLE table_name_31 (
game_site VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was the game played when 71,060 people attended?
| SELECT game_site FROM table_name_31 WHERE attendance = "71,060" | sql_create_context |
CREATE TABLE table_21094 (
"Name" text,
"Latitude" text,
"Longitude" text,
"Diameter (km)" text,
"Year named" real,
"Name origin" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many schools are named otafuku tholi?
| SELECT COUNT("Year named") FROM table_21094 WHERE "Name" = 'Otafuku Tholi' | wikisql |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'mv-oth veh coll-ped cycl') AND STRFTIME('%y', diagnoses_ic... | mimic_iii |
CREATE TABLE hz_info_mzjzjlb (
JZLSH number,
YLJGDM number,
mzjzjlb_id number
)
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
... | SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND 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 ... | css |
CREATE TABLE table_45424 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the method of resolution when Katsuhisa Fujii's record was ... | SELECT "Method" FROM table_45424 WHERE "Record" = '0-1' | wikisql |
CREATE TABLE table_203_476 (
id number,
"no." number,
"title (latin)" text,
"title (english translation)" text,
"subject" text,
"date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the only subject on 23 may 1920 ?
| SELECT "subject" FROM table_203_476 WHERE "date" = '23 may 1920' | squall |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT MIN(demographic.days_stay) FROM demographic WHERE demographic.diagnosis = "LEFT COLON CANCER" | mimicsql_data |
CREATE TABLE table_63723 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the date of the game for the HartlePool United team?
| SELECT "Date" FROM table_63723 WHERE "Home team" = 'hartlepool united' | 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 jyjgzbb (
BGDH text,
BGRQ tim... | SELECT * 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 = jyjgzbb.YLJGDM AND jybgb.BGDH ... | css |
CREATE TABLE table_57359 (
"Player" text,
"Car." real,
"Yards" text,
"Avg." text,
"TD's" real,
"Long" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the average for 1 yards
| SELECT "Avg." FROM table_57359 WHERE "Yards" = '1' | wikisql |
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text... | SELECT * FROM Posts WHERE (LENGTH(Body) <= '##bodylen##' AND PostTypeId = 2) | sede |
CREATE TABLE table_1875157_2 (
starts INTEGER,
avg_finish VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the maximum starts that result in an average finish of 16.5?
| SELECT MAX(starts) FROM table_1875157_2 WHERE avg_finish = "16.5" | sql_create_context |
CREATE TABLE table_62723 (
"Name" text,
"Premier League" real,
"League Cup" real,
"FA Cup" real,
"UEFA Cup" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many totals have a Premier League smaller than 6, and a League Cup large... | SELECT SUM("Total") FROM table_62723 WHERE "Premier League" < '6' AND "League Cup" > '0' | wikisql |
CREATE TABLE table_19391 (
"Country" text,
"Total" real,
"4000ft+" real,
"3500\u20134000ft" real,
"3000\u20133500ft" real,
"2500\u20133000ft" real,
"2000\u20132500ft" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the minimum total for ... | SELECT MIN("Total") FROM table_19391 WHERE "Country" = 'Ireland' | wikisql |
CREATE TABLE mzb (
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.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '45700133' AND qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT >= 9202.16) UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '45700133' AND gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMO... | css |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_NM = '尤飞双' AND qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 7155.47) UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_NM = '尤飞双' AND gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 7155.... | css |
CREATE TABLE table_204_689 (
id number,
"year" number,
"title" text,
"album" text,
"uk" number,
"b-sides" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the b side on the only non album single ?
| SELECT "b-sides" FROM table_204_689 WHERE "album" = 'non-album single' | squall |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
... | SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-21970' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1) AND NOT patient.admissionweight IS NULL ORDER... | eicu |
CREATE TABLE table_66345 (
"Model" text,
"Year Introduced" real,
"Number of CPUs" text,
"Performance (MIPS)" text,
"Memory (GB)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Model has a Number of CPUs of 1 10, and a Performance (MIPS) of 49 ... | SELECT "Model" FROM table_66345 WHERE "Number of CPUs" = '1–10' AND "Performance (MIPS)" = '49–447' | wikisql |
CREATE TABLE table_14247 (
"Elector" text,
"Place of birth" text,
"Cardinalatial title" text,
"Elevated" text,
"Elevator" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is listed for the Elevator, that also has the Cardinalatial title of Deacon... | SELECT "Elevator" FROM table_14247 WHERE "Cardinalatial title" = 'deacon of s. maria in portico' | 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 zzmzjzjlb (
HXPLC number,
HZX... | SELECT COUNT(*) FROM zzmzjzjlb WHERE zzmzjzjlb.JZKSMC = '小儿肿瘤科' AND zzmzjzjlb.JZKSRQ BETWEEN '2014-10-06' AND '2018-12-28' UNION SELECT COUNT(*) FROM fzzmzjzjlb WHERE fzzmzjzjlb.JZKSMC = '小儿肿瘤科' AND fzzmzjzjlb.JZKSRQ BETWEEN '2014-10-06' AND '2018-12-28' | css |
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 jyjgzbb.JYZBLSH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_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 = jybgb_jyjgzbb.YLJGDM AND jybgb.BGD... | css |
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT JOB_ID, SUM(DEPARTMENT_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID | nvbench |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | SELECT COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '9320875' AND IN_HOSP_DATE BETWEEN '2006-03-27' AND '2018-07-19' AND CLINIC_TYPE = '购药' | css |
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 employees (
EMPLOYEE_ID decimal(6,0... | SELECT JOB_ID, SUM(MANAGER_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID | nvbench |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
... | SELECT DISTINCT num_enrolled FROM course WHERE department = 'EECS' AND number = 515 | advising |
CREATE TABLE table_2101 (
"Pick #" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which College did the Buffalo Sabres' pick play for?
| SELECT "College/junior/club team" FROM table_2101 WHERE "NHL team" = 'Buffalo Sabres' | wikisql |
CREATE TABLE table_18033 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Record" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what week was November 27, 1977?
| SELECT MAX("Week") FROM table_18033 WHERE "Date" = 'November 27, 1977' | wikisql |
CREATE TABLE table_56998 (
"Episode" text,
"Air date" text,
"Rating" real,
"Share" real,
"18-49 (Rating/Share)" text,
"Viewers (m)" real,
"Rank (timeslot)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the average rating when the ai... | SELECT AVG("Rating") FROM table_56998 WHERE "Air date" = 'november 23, 2007' | wikisql |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE cost (
costid number,
uniquepi... | SELECT MAX(lab.labresult) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-1629')) AND lab.labname = 'gentamicin - random' AND STRFTIME('%y', lab.labresu... | eicu |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.long_title = "Unspecified essential hypertension" | mimicsql_data |
CREATE TABLE table_name_18 (
high_points VARCHAR,
game VARCHAR,
high_assists VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is High Points, when Game is less than 10, and when High Assists is 'Chauncey Billups (8)'?
| SELECT high_points FROM table_name_18 WHERE game < 10 AND high_assists = "chauncey billups (8)" | sql_create_context |
CREATE TABLE table_name_90 (
year INTEGER,
points INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the highest year with points more than 0
| SELECT MAX(year) FROM table_name_90 WHERE points > 0 | sql_create_context |
CREATE TABLE member (
member_id number,
card_number text,
name text,
hometown text,
level number
)
CREATE TABLE branch (
branch_id number,
name text,
open_year text,
address_road text,
city text,
membership_amount text
)
CREATE TABLE membership_register_branch (
member_... | SELECT COUNT(DISTINCT level) FROM member | spider |
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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "DIVORCED" AND lab.label = "Other Cells" | mimicsql_data |
CREATE TABLE table_name_60 (
bronze VARCHAR,
notes VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who won Bronze with notes of 2.5km, 14controls?
| SELECT bronze FROM table_name_60 WHERE notes = "2.5km, 14controls" | sql_create_context |
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 icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | SELECT DISTINCT t1.c1 FROM (SELECT labevents.valuenum, PERCENT_RANK() OVER (ORDER BY labevents.valuenum) AS c1 FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'phosphate') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age... | mimic_iii |
CREATE TABLE table_78776 (
"Edition" text,
"Date" text,
"Winner" text,
"Country" text,
"Time ( h : m : s )" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date did Lee Bong-Ju win in 2:10:48?
| SELECT "Date" FROM table_78776 WHERE "Time ( h : m : s )" = '2:10:48' AND "Winner" = 'lee bong-ju' | wikisql |
CREATE TABLE table_name_83 (
team VARCHAR,
kit_manufacturer VARCHAR,
captain VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team is the kit manufacturer Umbro, and the captain Gary Mabbutt?
| SELECT team FROM table_name_83 WHERE kit_manufacturer = "umbro" AND captain = "gary mabbutt" | sql_create_context |
CREATE TABLE table_name_28 (
venue VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where did Collingwood play as the home team?
| SELECT venue FROM table_name_28 WHERE home_team = "collingwood" | sql_create_context |
CREATE TABLE table_name_89 (
date VARCHAR,
winning_score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the winning score 9 (72-68-64-67=271)?
| SELECT date FROM table_name_89 WHERE winning_score = −9(72 - 68 - 64 - 67 = 271) | sql_create_context |
CREATE TABLE table_75417 (
"Rank" text,
"City" text,
"Population" real,
"Area (km 2 )" real,
"Density (inhabitants/km 2 )" real,
"Altitude (mslm)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Population has an Altitude (mslm) larger than... | SELECT SUM("Population") FROM table_75417 WHERE "Altitude (mslm)" > '98' AND "Density (inhabitants/km 2 )" > '5869' AND "Rank" = '1st' | wikisql |
CREATE TABLE table_191591_5 (
region_2 VARCHAR,
number_of_episodes VARCHAR,
dvd_title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where are there 25 episodes in Catfights and Brawls?
| SELECT region_2 FROM table_191591_5 WHERE number_of_episodes = "25" AND dvd_title = "Catfights and Brawls" | sql_create_context |
CREATE TABLE customer_events (
customer_event_id number,
customer_id number,
date_moved_in time,
property_id number,
resident_id number,
thing_id number
)
CREATE TABLE organizations (
organization_id number,
parent_organization_id number,
organization_details text
)
CREATE TABLE re... | SELECT COUNT(DISTINCT T2.location_code) FROM things AS T1 JOIN timed_locations_of_things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.service_details = 'Unsatisfied' | spider |
CREATE TABLE College (
cName varchar(20),
state varchar(2),
enr numeric(5,0)
)
CREATE TABLE Tryout (
pID numeric(5,0),
cName varchar(20),
pPos varchar(8),
decision varchar(3)
)
CREATE TABLE Player (
pID numeric(5,0),
pName varchar(20),
yCard varchar(3),
HS numeric(5,0)
)
... | SELECT pName, HS FROM Player WHERE HS < 1500 | nvbench |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
d... | SELECT COUNT(DISTINCT patient.patientunitstayid) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '003-34282') AND STRFTIME('%y', patient.unitadmittime) >= '2105' | eicu |
CREATE TABLE stadium (
id number,
name text,
home_games number,
average_attendance number,
total_attendance number,
capacity_percentage number
)
CREATE TABLE injury_accident (
game_id number,
id number,
player text,
injury text,
number_of_matches text,
source text
)
CRE... | SELECT name, average_attendance, total_attendance FROM stadium EXCEPT SELECT T2.name, T2.average_attendance, T2.total_attendance FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id | spider |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic ... | SELECT prescriptions.formulary_drug_cd FROM prescriptions WHERE prescriptions.drug = "Caphosol" | mimicsql_data |
CREATE TABLE table_1830 (
"Year" real,
"Tournaments played" real,
"Cuts made*" real,
"Wins" real,
"2nd" real,
"3rd" real,
"Top 10s" real,
"Best finish" text,
"Earnings ( $ )" text,
"Money list rank" text,
"Scoring average" text,
"Scoring rank" text
)
-- Using valid SQLi... | SELECT "Cuts made*" FROM table_1830 WHERE "Scoring rank" = '3' | wikisql |
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 patient (
uniquep... | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-13494')) AND NOT vitalperiodic.systemicsystolic... | eicu |
CREATE TABLE Dorm (
dormid INTEGER,
dorm_name VARCHAR(20),
student_capacity INTEGER,
gender VARCHAR(1)
)
CREATE TABLE Has_amenity (
dormid INTEGER,
amenid INTEGER
)
CREATE TABLE Dorm_amenity (
amenid INTEGER,
amenity_name VARCHAR(25)
)
CREATE TABLE Lives_in (
stuid INTEGER,
do... | SELECT Fname, COUNT(Fname) FROM Student AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' GROUP BY Fname | nvbench |
CREATE TABLE table_name_29 (
league_cup INTEGER,
position VARCHAR,
UEfa_cup VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of the appearances at the league cup for the defender who had less than 10 appearances at the UEFA cup?
| SELECT SUM(league_cup) FROM table_name_29 WHERE position = "defender" AND UEfa_cup < 10 | sql_create_context |
CREATE TABLE table_7930 (
"Tournament" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
)
-- Using vali... | SELECT "1999" FROM table_7930 WHERE "1998" = 'grand slam tournaments' | wikisql |
CREATE TABLE table_12496904_1 (
_2012 VARCHAR,
rank_in_nyagatare_sectors INTEGER,
population_change_2002_2012___percentage_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the population change 2002-2012 (%) is 35.5 what is the rank in nyagatare sect... | SELECT MAX(rank_in_nyagatare_sectors), _2012 FROM table_12496904_1 WHERE population_change_2002_2012___percentage_ = "35.5" | sql_create_context |
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description... | SELECT p.CreationDate, p.AnswerCount, p.Id AS "post_link" FROM Posts AS p INNER JOIN Users AS u ON p.OwnerUserId = u.Id WHERE (p.PostTypeId = 1 AND u.Reputation <= '##ReputationLimit##' AND LENGTH(p.Body) <= '##LengthLimit##' AND p.ClosedDate IS NULL AND p.Score = 0 AND p.AnswerCount = 0) ORDER BY p.CreationDate DESC | sede |
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 demographic.expire_flag = "1" AND prescriptions.drug = "Propafenone HCl" | mimicsql_data |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.