instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_83 (
city VARCHAR,
stadium VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the city where the Telstra Dome is?
| SELECT city FROM table_name_83 WHERE stadium = "telstra dome" | sql_create_context |
CREATE TABLE table_77262 (
"Rank" real,
"Surname" text,
"Number of bearers 2008" real,
"Type" text,
"Etymology" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Highest Number of Bearers 2008, when Surname is Jacobsen?
| SELECT MAX("Number of bearers 2008") FROM table_77262 WHERE "Surname" = 'jacobsen' | wikisql |
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 t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '6951170' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM fgwyjzb JOIN t_kc22 ON fgwy... | css |
CREATE TABLE table_204_342 (
id number,
"#" number,
"player" text,
"span" text,
"caps" number,
"total caps" number,
"win %" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many caps did jean pierre rives and michel crauste accrue ?
| SELECT SUM("total caps") FROM table_204_342 WHERE "player" IN ('jean-pierre rives', 'michel crauste') | squall |
CREATE TABLE member (
Member_ID int,
Member_Name text,
Party_ID text,
In_office text
)
CREATE TABLE party_events (
Event_ID int,
Event_Name text,
Party_ID int,
Member_in_charge_ID int
)
CREATE TABLE party (
Party_ID int,
Minister text,
Took_office text,
Left_office text... | SELECT Minister, COUNT(Minister) FROM party GROUP BY Minister ORDER BY COUNT(Minister) | nvbench |
CREATE TABLE table_2013618_1 (
traditional VARCHAR,
simplified VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the traditional for
| SELECT traditional FROM table_2013618_1 WHERE simplified = "屏南县" | sql_create_context |
CREATE TABLE table_20906175_3 (
touchdowns VARCHAR,
qb_rating VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many touchdowns were there with QB rating of 66.6?
| SELECT touchdowns FROM table_20906175_3 WHERE qb_rating = "66.6" | sql_create_context |
CREATE TABLE railway_manage (
Railway_ID int,
Manager_ID int,
From_Year text
)
CREATE TABLE railway (
Railway_ID int,
Railway text,
Builder text,
Built text,
Wheels text,
Location text,
ObjectNumber text
)
CREATE TABLE train (
Train_ID int,
Train_Num text,
Name text... | SELECT Country, COUNT(Country) FROM manager WHERE Age > 50 OR Age < 46 GROUP BY Country ORDER BY Country DESC | nvbench |
CREATE TABLE table_22433 (
"Position" real,
"Sail Number" text,
"Yacht" text,
"State/Country" text,
"Yacht Type" text,
"LOA (Metres)" text,
"Skipper" text,
"Corrected Time d:hh:mm:ss" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who wa... | SELECT "Skipper" FROM table_22433 WHERE "Corrected Time d:hh:mm:ss" = '2:18:31:49' | wikisql |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restr... | 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, fare, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'TACOMA' AND fare.round_trip_required = 'NO' AND flight_fare.fare_id = ... | atis |
CREATE TABLE debate_people (
Debate_ID int,
Affirmative int,
Negative int,
If_Affirmative_Win bool
)
CREATE TABLE people (
People_ID int,
District text,
Name text,
Party text,
Age int
)
CREATE TABLE debate (
Debate_ID int,
Date text,
Venue text,
Num_of_Audience int
... | SELECT Name, COUNT(Name) FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID GROUP BY Name | nvbench |
CREATE TABLE table_21808535_1 (
runner_up VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the runner-up on September 11?
| SELECT runner_up FROM table_21808535_1 WHERE date = "September 11" | sql_create_context |
CREATE TABLE table_1341690_18 (
incumbent VARCHAR,
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many incumbents are there in district Louisiana 5?
| SELECT COUNT(incumbent) FROM table_1341690_18 WHERE district = "Louisiana 5" | sql_create_context |
CREATE TABLE table_name_18 (
play VARCHAR,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What play is from the country Belgium?
| SELECT play FROM table_name_18 WHERE country = "belgium" | sql_create_context |
CREATE TABLE station_company (
Station_ID int,
Company_ID int,
Rank_of_the_Year int
)
CREATE TABLE gas_station (
Station_ID int,
Open_Year int,
Location text,
Manager_Name text,
Vice_Manager_Name text,
Representative_Name text
)
CREATE TABLE company (
Company_ID int,
Rank i... | SELECT Company, COUNT(*) FROM station_company AS T1 JOIN company AS T2 ON T1.Company_ID = T2.Company_ID GROUP BY T1.Company_ID ORDER BY COUNT(*) DESC | 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 instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE cour... | SELECT (SELECT SUM(CASE WHEN DERIVED_TABLEalias0.FRIDAY = 'Y' THEN 1 ELSE 0 END) + SUM(CASE WHEN DERIVED_TABLEalias0.MONDAY = 'Y' THEN 1 ELSE 0 END) + SUM(CASE WHEN DERIVED_TABLEalias0.SATURDAY = 'Y' THEN 1 ELSE 0 END) + SUM(CASE WHEN DERIVED_TABLEalias0.SUNDAY = 'Y' THEN 1 ELSE 0 END) + SUM(CASE WHEN DERIVED_TABLEalia... | advising |
CREATE TABLE table_name_73 (
round VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What round had a record of 8-2?
| SELECT round FROM table_name_73 WHERE record = "8-2" | sql_create_context |
CREATE TABLE table_27893 (
"Settlement" text,
"Cyrillic Name Other Names" text,
"Type" text,
"Population (2011)" real,
"Largest ethnic group (2002)" text,
"Dominant religion (2002)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What type of set... | SELECT "Type" FROM table_27893 WHERE "Settlement" = 'Jazak' | wikisql |
CREATE TABLE table_27555 (
"No. in series" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (million)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many millions of viewers did the episode ... | SELECT "U.S. viewers (million)" FROM table_27555 WHERE "Directed by" = 'Jeffrey Blitz' | wikisql |
CREATE TABLE table_name_14 (
against INTEGER,
difference VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Against is the highest one that has a Difference of 12?
| SELECT MAX(against) FROM table_name_14 WHERE difference = "12" | sql_create_context |
CREATE TABLE artist (
artist_name text,
country text,
gender text,
preferred_genre text
)
CREATE TABLE files (
f_id number,
artist_name text,
file_size text,
duration text,
formats text
)
CREATE TABLE genre (
g_name text,
rating text,
most_popular_in text
)
CREATE TABL... | SELECT f_id FROM song WHERE resolution > (SELECT AVG(resolution) FROM song WHERE genre_is = "modern") | spider |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instruc... | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT... | advising |
CREATE TABLE table_name_86 (
points INTEGER,
entrant VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest amount of points for parmalat forti ford entrant later than 1995?
| SELECT MIN(points) FROM table_name_86 WHERE entrant = "parmalat forti ford" AND year > 1995 | sql_create_context |
CREATE TABLE table_52825 (
"Player" text,
"Nationality" text,
"Position" text,
"Years for Jazz" text,
"School/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Nationality is Jeff Hornacek?
| SELECT "Nationality" FROM table_52825 WHERE "Player" = 'jeff hornacek' | wikisql |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDa... | SELECT q.Id AS "post_link", a.Id AS "post_link", q.Score, a.Score, a.Score - q.Score AS gap FROM Posts AS q INNER JOIN (SELECT Id, ParentId, Score, PostTypeId, OwnerUserId FROM Posts WHERE PostTypeId = 2) AS a ON q.Id = a.ParentId INNER JOIN Users AS u ON u.Id = a.OwnerUserId WHERE q.PostTypeId = 1 AND (a.Score > q.Sco... | sede |
CREATE TABLE table_13605170_2 (
retired VARCHAR,
aircraft_type VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Airspeed Fleet Shadower aircraft are retired?
| SELECT retired FROM table_13605170_2 WHERE aircraft_type = "Airspeed Fleet Shadower" | sql_create_context |
CREATE TABLE table_1341884_19 (
district VARCHAR,
incumbent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What district is incumbent frank chelf from?
| SELECT district FROM table_1341884_19 WHERE incumbent = "Frank Chelf" | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "SENN187" | mimicsql_data |
CREATE TABLE table_58852 (
"Drug" text,
"Mean" real,
"Pleasure" real,
"Psychological dependence" real,
"Physical dependence" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average Mean, when Drug is 'Alcohol', and when Psychological Depe... | SELECT AVG("Mean") FROM table_58852 WHERE "Drug" = 'alcohol' AND "Psychological dependence" > '1.9' | wikisql |
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
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
)
... | SELECT Nationality, SUM(meter_100) FROM swimmer GROUP BY Nationality ORDER BY Nationality DESC | nvbench |
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 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_NM = '孙宏儒' AND t_kc22.STA_DATE BETWEEN '2001-05-01' AND '2016-04-05' AND t_kc22.SELF_PAY_AMO > 4787.85 | css |
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 All_Home, COUNT(All_Home) FROM basketball_match GROUP BY All_Home ORDER BY All_Home DESC | nvbench |
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_ID = '01374197' AND qtb.MED_SER_ORG_NO = '5447381' AND NOT qtb.IN_DIAG_DIS_NM LIKE '%紫癜%' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '01374197' AND gyb.MED_SER_ORG_NO = '5447381' AND NOT gyb.IN_DIAG_DIS_NM LIKE '%紫癜%' UNION SELECT zyb.MED_CLINIC_ID F... | css |
CREATE TABLE table_26223 (
"Year" real,
"Division" real,
"League" text,
"Regular Season" text,
"Playoffs" text,
"Open Cup" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the open cup for usl pdl for did not qualify
| SELECT "Open Cup" FROM table_26223 WHERE "League" = 'USL PDL' AND "Playoffs" = 'Did not qualify' | wikisql |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE Comments (
Id number,
PostId num... | SELECT CreationDate, Id AS "comment_link" FROM Comments WHERE LOWER(Text) LIKE '%fixed%' AND CreationDate >= '2018-01-01' ORDER BY LENGTH(Text) LIMIT 1000 | sede |
CREATE TABLE table_1181375_1 (
engine VARCHAR,
number_range VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what's the engine where number range is 8 9, 13 16
| SELECT engine FROM table_1181375_1 WHERE number_range = "8–9, 13–16" | sql_create_context |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id ... | SELECT t2.drug FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 65582 AND procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = ... | mimic_iii |
CREATE TABLE hz_info_zyjzjlb (
JZLSH number,
YLJGDM number,
zyjzjlb_id number
)
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,
... | SELECT jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb 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 WHERE hz_info.RYBH = '03628207' AND jybgb.BGRQ BETWEEN '2005-02-07' AND '2015-09-07' UNION... | css |
CREATE TABLE table_name_98 (
japanese VARCHAR,
number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Japanese name of the station with a number 3?
| SELECT japanese FROM table_name_98 WHERE number = 3 | sql_create_context |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age te... | SELECT (SELECT vitalperiodic.heartrate FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-50213') AND patient.unitdischargetime IS NULL... | eicu |
CREATE TABLE table_name_27 (
longitude VARCHAR,
latitude VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the latitude is 77 28 n, what is the longitude?
| SELECT longitude FROM table_name_27 WHERE latitude = "77°28′n" | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
... | SELECT COUNT(*) FROM zzmzjzjlb WHERE zzmzjzjlb.YLJGDM = '4755541' AND zzmzjzjlb.JZKSRQ BETWEEN '2006-02-16' AND '2010-03-24' AND zzmzjzjlb.WDBZ > 0 UNION SELECT COUNT(*) FROM fzzmzjzjlb WHERE fzzmzjzjlb.YLJGDM = '4755541' AND fzzmzjzjlb.JZKSRQ BETWEEN '2006-02-16' AND '2010-03-24' AND fzzmzjzjlb.WDBZ > 0 | css |
CREATE TABLE club (
club_id number,
name text,
region text,
start_year text
)
CREATE TABLE competition (
competition_id number,
year number,
competition_type text,
country text
)
CREATE TABLE player (
player_id number,
name text,
position text,
club_id number,
apps ... | SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.club_id = T2.club_id WHERE T2.position = "Right Wing" | spider |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "STERNAL WOUND INFECTION" AND demographic.dob_year < "2120" | mimicsql_data |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
-- Using valid SQLite, answer the following questions for the... | SELECT Founder, SUM(Manufacturer) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY SUM(Manufacturer) | nvbench |
CREATE TABLE table_21064 (
"Team" text,
"P" real,
"W" real,
"D" real,
"L" real,
"Tries for" real,
"Tries against" real,
"Try diff" text,
"Points for" real,
"Points against" real,
"Points diff" text,
"Pts" real
)
-- Using valid SQLite, answer the following questions for ... | SELECT MAX("Tries against") FROM table_21064 WHERE "Team" = 'Bridgend' | wikisql |
CREATE TABLE table_56025 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" text,
"Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the result with a Round of 3, and an Opponent of keith wisniewsk... | SELECT "Res." FROM table_56025 WHERE "Round" = '3' AND "Opponent" = 'keith wisniewski' | 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.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_NM = '朱安翔' AND NOT qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT <= 6593.0) UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_NM = '朱安翔' AND NOT gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT... | css |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
i... | SELECT 24 * (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 = '006-123134' AND patient.hos... | eicu |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Price DESC | nvbench |
CREATE TABLE Faculty (
sex VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show the number of male and female assistant professors.
| SELECT sex, COUNT(*) FROM Faculty WHERE rank = "AsstProf" GROUP BY sex | sql_create_context |
CREATE TABLE table_name_70 (
score_in_the_final VARCHAR,
surface VARCHAR,
tournament VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Played on Clay Surface, what was the Score of the Dortmund Tournament?
| SELECT score_in_the_final FROM table_name_70 WHERE surface = "clay" AND tournament = "dortmund" | sql_create_context |
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time... | SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'ATLANTA' AND ground_service.city_code = city.city_code | atis |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code te... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_... | mimic_iii |
CREATE TABLE table_17519 (
"Year" real,
"Mens singles" text,
"Womens singles" text,
"Mens doubles" text,
"Womens doubles" text,
"Mixed doubles" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is themens doubles when the mens singles is flemmi... | SELECT "Mens doubles" FROM table_17519 WHERE "Mens singles" = 'Flemming Delfs' | wikisql |
CREATE TABLE table_29284 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the outgoing manager when the te... | SELECT "Outgoing manager" FROM table_29284 WHERE "Team" = 'Simurq PFC' | wikisql |
CREATE TABLE table_204_49 (
id number,
"city" text,
"country" text,
"iata" text,
"icao" text,
"airport" text,
"commenced" number,
"ended" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what are the number of times 2013 appears under the ... | SELECT COUNT(*) FROM table_204_49 WHERE "commenced" = 2013 | squall |
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_graduation_semester int,
degree varchar,
minor varchar,
internship varch... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN student_record ON student_record.course_id = course.course_id INNER JOIN area ON student_record.course_id = area.course_id WHERE area.area LIKE '%computing infrastructure%' AND student_record.student_id = 1 | advising |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugsto... | 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 = '006-149778')) AND DATETIME(treatment.treatmenttime) >= DATETIME(C... | eicu |
CREATE TABLE table_71054 (
"Date" text,
"City" text,
"Event" text,
"Winner" text,
"Prize" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Event in the city of copenhagen?
| SELECT "Event" FROM table_71054 WHERE "City" = 'copenhagen' | wikisql |
CREATE TABLE Customer_Address_History (
customer_id INTEGER,
address_id INTEGER,
date_from DATETIME,
date_to DATETIME
)
CREATE TABLE Addresses (
address_id INTEGER,
line_1_number_building VARCHAR(80),
city VARCHAR(50),
zip_postcode VARCHAR(20),
state_province_county VARCHAR(50),
... | SELECT T1.product_name, SUM(SUM(T2.order_quantity)) FROM Products AS T1 JOIN Order_Items AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name | nvbench |
CREATE TABLE table_203_231 (
id number,
"season" text,
"tier" number,
"division" text,
"place" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what were the number of times second place was earned ?
| SELECT COUNT(*) FROM table_203_231 WHERE "place" = 2 | squall |
CREATE TABLE table_68542 (
"2001" text,
"2004" text,
"2009" text,
"2013" text,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which 2009 year has a total of 1, and 2004 year of 7th?
| SELECT "2009" FROM table_68542 WHERE "Total" = '1' AND "2004" = '7th' | wikisql |
CREATE TABLE table_67520 (
"Driver" text,
"Constructor" text,
"Laps" text,
"Time/Retired" text,
"Grid" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many laps were there when the Time/Retired was +1:00.003?
| SELECT "Laps" FROM table_67520 WHERE "Time/Retired" = '+1:00.003' | wikisql |
CREATE TABLE table_13778 (
"Japanese Title" text,
"Romaji Title" text,
"TV Station" text,
"Episodes" text,
"Average Ratings" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Japanese title had average ratings of 9.2% on the NHK station?
| SELECT "Japanese Title" FROM table_13778 WHERE "Average Ratings" = '9.2%' AND "TV Station" = 'nhk' | wikisql |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25... | SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY HIRE_DATE | nvbench |
CREATE TABLE table_23138 (
"Institution" text,
"Nickname" text,
"Location" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Joined" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the college that has 10000 enrolled
| SELECT "Institution" FROM table_23138 WHERE "Enrollment" = '10000' | wikisql |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE icustays (
row_id number,
s... | SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8016 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1)) AND cha... | mimic_iii |
CREATE TABLE table_21434618_1 (
team__number1 VARCHAR,
team__number2 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which team #1 played again chalkida
| SELECT team__number1 FROM table_21434618_1 WHERE team__number2 = "Chalkida" | sql_create_context |
CREATE TABLE table_name_53 (
class VARCHAR,
year INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For a year that is later than 2002 what is the class position?
| SELECT class AS pos FROM table_name_53 WHERE year > 2002 | sql_create_context |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
-- Using valid SQLite, answer the following questions for the... | SELECT T2.Name, COUNT(T2.Name) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY COUNT(T2.Name) | nvbench |
CREATE TABLE table_29379 (
"Season" real,
"Series" text,
"Team" text,
"Starts" real,
"Wins" real,
"Podiums" real,
"Poles" real,
"Fastest Laps" real,
"Points" text,
"Place" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the l... | SELECT MIN("Podiums") FROM table_29379 WHERE "Season" = '2009' | wikisql |
CREATE TABLE table_48947 (
"Heat" real,
"Lane" real,
"Name" text,
"Country" text,
"Mark" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total Lane with a Mark of 47.02, and a Heat higher than 5?
| SELECT SUM("Lane") FROM table_48947 WHERE "Mark" = '47.02' AND "Heat" > '5' | wikisql |
CREATE TABLE table_name_54 (
number INTEGER,
pieces VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number for Chauchilla Cemetery Battle with less than 511 pieces?
| SELECT AVG(number) FROM table_name_54 WHERE pieces < 511 AND name = "chauchilla cemetery battle" | sql_create_context |
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE Rev... | SELECT q.Id AS "post_link", q.Score, u.Id AS "user_link", u.Reputation FROM Posts AS q INNER JOIN Users AS u ON q.OwnerUserId = u.Id WHERE q.PostTypeId = 1 AND q.AcceptedAnswerId IS NULL AND q.ClosedDate IS NULL AND (SELECT COUNT(*) FROM PostHistory AS h WHERE h.PostId = q.Id AND h.PostHistoryTypeId = 14) > (SELECT COU... | sede |
CREATE TABLE table_47603 (
"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 is the Tie Number when Barnsley was the away team?
| SELECT "Tie no" FROM table_47603 WHERE "Away team" = 'barnsley' | wikisql |
CREATE TABLE table_34838 (
"Locomotive" text,
"Pre-conversion" text,
"Entered service (T)" text,
"Re-entered service (P)" text,
"Owner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which of V/Line Passenger's pre-conversions re-entered service on ... | SELECT "Pre-conversion" FROM table_34838 WHERE "Owner" = 'v/line passenger' AND "Re-entered service (P)" = '23 november 1984' | wikisql |
CREATE TABLE table_58732 (
"Name" text,
"Total" real,
"First" text,
"Last" text,
"Highest rank" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the total when the first was November 1966?
| SELECT SUM("Total") FROM table_58732 WHERE "First" = 'november 1966' | wikisql |
CREATE TABLE table_27666856_3 (
outgoing_manager VARCHAR,
replaced_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the outgoing manager for esteban vigo
| SELECT COUNT(outgoing_manager) FROM table_27666856_3 WHERE replaced_by = "Esteban Vigo" | sql_create_context |
CREATE TABLE table_25609 (
"Season" text,
"Name" text,
"Teams" real,
"Relegated to League" text,
"Promoted to League" text,
"Promoted from League" text,
"Relegated from League" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number o... | SELECT COUNT("Name") FROM table_25609 WHERE "Promoted from League" = 'Exeter Chiefs' | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "1" AND procedures.short_title = "Endosc remove bile stone" | mimicsql_data |
CREATE TABLE table_name_2 (
total INTEGER,
player VARCHAR,
scottish_cup VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average total of player Simon Donnelly, with a Scottish Cup greater than 0?
| SELECT AVG(total) FROM table_name_2 WHERE player = "simon donnelly" AND scottish_cup > 0 | sql_create_context |
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3273 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label =... | mimic_iii |
CREATE TABLE table_27782699_3 (
date_of_vacancy VARCHAR,
outgoing_manager VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the vacancy date for Thomas Thomasberg?
| SELECT date_of_vacancy FROM table_27782699_3 WHERE outgoing_manager = "Thomas Thomasberg" | sql_create_context |
CREATE TABLE table_name_28 (
team_classification VARCHAR,
combination_classification VARCHAR,
winner VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Team classification has a Combination classification of egoi mart nez, and a Winner of tom boonen?
| SELECT team_classification FROM table_name_28 WHERE combination_classification = "egoi martínez" AND winner = "tom boonen" | sql_create_context |
CREATE TABLE table_22879323_10 (
date VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date was the record 11-67?
| SELECT date FROM table_22879323_10 WHERE record = "11-67" | sql_create_context |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT t_kc21.OUT_DIAG_DOC_CD, t_kc21.OUT_DIAG_DOC_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '58160776' GROUP BY t_kc21.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC | css |
CREATE TABLE table_name_56 (
elevator VARCHAR,
order_and_title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the elevator when the Cardinal-Deacon of S. Nicola in Carcere Tulliano was the order and title?
| SELECT elevator FROM table_name_56 WHERE order_and_title = "cardinal-deacon of s. nicola in carcere tulliano" | sql_create_context |
CREATE TABLE table_22368322_2 (
_€_million VARCHAR,
tier_1_capital VARCHAR,
institution VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number of tier 1 capital for allied irish banks
| SELECT COUNT(tier_1_capital), _€_million FROM table_22368322_2 WHERE institution = "Allied Irish Banks" | 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 = 'CHICAGO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SEATTL... | atis |
CREATE TABLE table_78513 (
"Date" text,
"Visiting Team" text,
"Final Score" text,
"Host Team" text,
"Stadium" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the final score for january 9 for cincinnati bengals
| SELECT "Final Score" FROM table_78513 WHERE "Date" = 'january 9' AND "Host Team" = 'cincinnati bengals' | wikisql |
CREATE TABLE swimmer (
id number,
name text,
nationality text,
meter_100 number,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
time text
)
CREATE TABLE record (
id number,
result text,
swimmer_id number,
event... | SELECT t4.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id JOIN event AS t3 ON t2.event_id = t3.id JOIN stadium AS t4 ON t4.id = t3.stadium_id WHERE t1.nationality = 'Australia' | spider |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT Founder, AVG(Revenue) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder | nvbench |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "MARRIED" AND demographic.admityear < "2198" | mimicsql_data |
CREATE TABLE table_25802689_14 (
stage INTEGER,
mountains_classification VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the earliest stage where mountains classifications was awarded to Peter Stetina?
| SELECT MIN(stage) FROM table_25802689_14 WHERE mountains_classification = "Peter Stetina" | sql_create_context |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.MED_CLINIC_ID IN (SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_NM = '凤德容' AND qtb.MED_SER_ORG_NO = '8078105' AND qtb.IN_HOSP_DATE BETWEEN '2008-02-04' AND '2014-05-24' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_NM = '凤德容'... | css |
CREATE TABLE table_name_62 (
hometown VARCHAR,
height VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the hometown of Devon Bookert who is 6-3 tall?
| SELECT hometown FROM table_name_62 WHERE height = "6-3" AND name = "devon bookert" | sql_create_context |
CREATE TABLE table_40717 (
"Draw" real,
"Song" text,
"Performer" text,
"Points" real,
"Rank" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of Points, when the Performer is fe-mail?
| SELECT SUM("Points") FROM table_40717 WHERE "Performer" = 'fe-mail' | wikisql |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
chart... | SELECT COUNT(*) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 18159 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND prescriptions.drug = 'adefovir dipivoxil' | mimic_iii |
CREATE TABLE table_name_39 (
country VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is jos mar a olaz bal's country?
| SELECT country FROM table_name_39 WHERE player = "josé maría olazábal" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.