instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
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_HOSP_DAYS FROM t_kc21 WHERE MED_CLINIC_ID = '80300861713' | css |
CREATE TABLE table_74408 (
"Institution" text,
"Location" text,
"Mascot" text,
"Colors" text,
"Affiliation" text,
"9\u201312 enrollment" real,
"School website" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the team colors from Tolo... | SELECT "Colors" FROM table_74408 WHERE "Location" = 'Tolono, Illinois' | wikisql |
CREATE TABLE table_name_58 (
driver VARCHAR,
grid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which driver had a grid of 18?
| SELECT driver FROM table_name_58 WHERE grid = "18" | sql_create_context |
CREATE TABLE table_70861 (
"School" text,
"Team" text,
"Division Record" text,
"Overall Record" text,
"Season Outcome" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the school, when the Team is Senators?
| SELECT "School" FROM table_70861 WHERE "Team" = 'senators' | wikisql |
CREATE TABLE table_name_56 (
record VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the team's record on May 17?
| SELECT record FROM table_name_56 WHERE date = "may 17" | sql_create_context |
CREATE TABLE table_15368 (
"Category" text,
"Film" text,
"Director(s)" text,
"Country" text,
"Nominating Festival" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which director made Mi-temps?
| SELECT "Director(s)" FROM table_15368 WHERE "Film" = 'mi-temps' | wikisql |
CREATE TABLE table_11451 (
"Date" text,
"Opponents" text,
"Result" text,
"Score" text,
"Competition" text,
"Venue" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the result is d, who are the opponents?
| SELECT "Opponents" FROM table_11451 WHERE "Result" = 'd' | wikisql |
CREATE TABLE table_203_548 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many nations received at least two gold metals ?
| SELECT COUNT("nation") FROM table_203_548 WHERE "gold" >= 2 | squall |
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text... | SELECT BGDH FROM jyjgzbb WHERE JYZBLSH = '56375477846' | css |
CREATE TABLE table_34352 (
"Season" text,
"Player" text,
"Position" text,
"Nationality" text,
"Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What position did the 2010-11 USA r player have?
| SELECT "Position" FROM table_34352 WHERE "Nationality" = 'usa' AND "Team" = 'ír' AND "Season" = '2010-11' | wikisql |
CREATE TABLE table_name_50 (
lost INTEGER,
goals_against VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the most losses for positions under 15 and 66 goals against?
| SELECT MAX(lost) FROM table_name_50 WHERE goals_against = 66 AND position < 15 | sql_create_context |
CREATE TABLE table_name_95 (
second_party VARCHAR,
first_party VARCHAR,
second_member VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the second party that has a conservative first party and second member John Cotes?
| SELECT second_party FROM table_name_95 WHERE first_party = "conservative" AND second_member = "john cotes" | sql_create_context |
CREATE TABLE table_62230 (
"Round" real,
"Player" text,
"Position" text,
"Nationality" text,
"College/Junior/Club Team (League)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the college/junior/club team (league) when the round is higher th... | SELECT "College/Junior/Club Team (League)" FROM table_62230 WHERE "Round" > '1' AND "Nationality" = 'canada' AND "Position" = '(d)' | wikisql |
CREATE TABLE table_name_71 (
date_of_inauguration VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the date of the inauguration in the row with an entry of lifespan in the lifespan column?
| SELECT date_of_inauguration FROM table_name_71 WHERE "lifespan" = "lifespan" | sql_create_context |
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
... | SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'OAKLAND' AND ground_service.city_code = city.city_code | atis |
CREATE TABLE table_24887326_7 (
attendance INTEGER,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the attendance of the game where Stoke city was the away team?
| SELECT MIN(attendance) FROM table_24887326_7 WHERE away_team = "Stoke City" | sql_create_context |
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 roomName, COUNT(roomName) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE FirstName LIKE '%ROY%' GROUP BY roomName ORDER BY roomName DESC | nvbench |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hypotension / pressor dependent' AND DATETIME(diagnosis.diagnosistime) <=... | eicu |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "79" AND lab.fluid = "Pleural" | mimicsql_data |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Name DESC | nvbench |
CREATE TABLE table_name_96 (
score INTEGER,
opposition VARCHAR,
city VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score when the opposition was sussex in liverpool?
| SELECT SUM(score) FROM table_name_96 WHERE opposition = "sussex" AND city = "liverpool" | sql_create_context |
CREATE TABLE table_28949 (
"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 were in district virginia 6?
| SELECT COUNT("Candidates") FROM table_28949 WHERE "District" = 'Virginia 6' | 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 fzzmzjzjlb (
HXPLC number,
HZ... | SELECT COUNT(*) FROM zzmzjzjlb WHERE zzmzjzjlb.YLJGDM = '4874036' AND zzmzjzjlb.JZKSRQ BETWEEN '2014-02-21' AND '2017-10-12' AND zzmzjzjlb.TXBZ > 0 UNION SELECT COUNT(*) FROM fzzmzjzjlb WHERE fzzmzjzjlb.YLJGDM = '4874036' AND fzzmzjzjlb.JZKSRQ BETWEEN '2014-02-21' AND '2017-10-12' AND fzzmzjzjlb.TXBZ > 0 | css |
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 jyjgzbb.JCRGH, jyjgzbb.JCRXM 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.... | css |
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 demographic.diagnosis, demographic.admittime FROM demographic WHERE demographic.subject_id = "53707" | mimicsql_data |
CREATE TABLE loan (
loan_ID varchar(3),
loan_type varchar(15),
cust_ID varchar(3),
branch_ID varchar(3),
amount int
)
CREATE TABLE customer (
cust_ID varchar(3),
cust_name varchar(20),
acc_type char(1),
acc_bal int,
no_of_loans int,
credit_score int,
branch_ID int,
s... | SELECT cust_name, acc_bal FROM customer WHERE cust_name LIKE '%a%' ORDER BY cust_name | nvbench |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Code, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code | nvbench |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (
medication... | SELECT COUNT(*) > 0 FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-44495')) AND microlab.culturesite = 'sputum, expectorated' AND STRFTIME('%... | eicu |
CREATE TABLE table_71907 (
"Year" real,
"Men's singles" text,
"Women's singles" text,
"Men's doubles" text,
"Women's doubles" text,
"Mixed doubles" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was on the Men's Doubles Team in 2002?
| SELECT "Men's doubles" FROM table_71907 WHERE "Year" = '2002' | wikisql |
CREATE TABLE Maintenance_Engineers (
engineer_id INTEGER,
company_id INTEGER,
first_name VARCHAR(50),
last_name VARCHAR(50),
other_details VARCHAR(255)
)
CREATE TABLE Maintenance_Contracts (
maintenance_contract_id INTEGER,
maintenance_contract_company_id INTEGER,
contract_start_date DA... | SELECT T1.part_name, T1.part_id FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id ORDER BY T1.part_name | nvbench |
CREATE TABLE table_36487 (
"Name v t e" text,
"Pos." text,
"Height" text,
"Weight" text,
"Club" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the player from club pro recco?
| SELECT "Name v t e" FROM table_36487 WHERE "Club" = 'pro recco' | wikisql |
CREATE TABLE table_79411 (
"Rank" real,
"Rowers" text,
"Country" text,
"Time" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the time for the rowers representing great britain?
| SELECT "Time" FROM table_79411 WHERE "Country" = 'great britain' | wikisql |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE v... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', intakeoutput.intakeoutputtime)) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid ... | eicu |
CREATE TABLE table_52902 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the home score with an Away team score o... | SELECT "Home team score" FROM table_52902 WHERE "Away team score" = '10.14 (74)' | wikisql |
CREATE TABLE table_66131 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"TV Time" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent for the game that had 90,287 in attendance?
| SELECT "Opponent" FROM table_66131 WHERE "Attendance" = '90,287' | wikisql |
CREATE TABLE table_42500 (
"Year" real,
"Winner" text,
"School" text,
"Position" text,
"Points" text,
"% of Points Possible" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the position of the winner with 792 points?
| SELECT "Position" FROM table_42500 WHERE "Points" = '792' | wikisql |
CREATE TABLE table_name_27 (
location_attendance VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Location Attendance has a Record of 11 34?
| SELECT location_attendance FROM table_name_27 WHERE record = "11–34" | sql_create_context |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE TagSynonyms (
Id number... | SELECT COUNT(*) AS Volume, SUM(ViewCount) AS PageViews, COUNT(DISTINCT OwnerUserId) AS UniqueOPs, TIME_TO_STR(P.CreationDate, '%Y') AS "year", TIME_TO_STR(P.CreationDate, '%m') AS Month FROM Posts AS P WHERE (Tags LIKE '%<google-app-engine>%' OR Tags LIKE '%<google-app-engine-patch>%') AND PostTypeId = 1 AND CommunityO... | sede |
CREATE TABLE fgwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT SUM(t_kc24.PER_ACC_PAY) FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '邹学博' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2010-04-09' AND '2014-05-05' UNION SELECT SUM(t_kc24.PER_ACC_PAY) FROM fgwyjzb JOIN t_kc24 ON fgwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE fgwyjz... | 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 * FROM qtb WHERE qtb.MED_SER_ORG_NO = '4141380' AND qtb.IN_HOSP_DATE BETWEEN '2016-11-09' AND '2019-04-09' UNION SELECT * FROM gyb WHERE gyb.MED_SER_ORG_NO = '4141380' AND gyb.IN_HOSP_DATE BETWEEN '2016-11-09' AND '2019-04-09' UNION SELECT * FROM zyb WHERE zyb.MED_SER_ORG_NO = '4141380' AND zyb.IN_HOSP_DATE BETW... | css |
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_c... | 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 = 'PHILADELPHIA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = '... | atis |
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 diagnosis (
diagnosisid number,
... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'metabolic acidosis - lactic acidosis' AND DATETIME(diagnosis.diagnosistim... | eicu |
CREATE TABLE table_name_16 (
attendance INTEGER,
visitor VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Visitor of dallas, and a Date of june 12 had what highest attendance?
| SELECT MAX(attendance) FROM table_name_16 WHERE visitor = "dallas" AND date = "june 12" | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,
... | SELECT COUNT(*) FROM person_info JOIN hz_info JOIN mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE person_info.XM = '褚丽姿' AND mzjzjlb.JZKSRQ BETWEEN '2008-08-18' AND '2020-08-18' AND mzjzjlb.YLJGDM = '3680245' | css |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,... | SELECT 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 = '027-3046')) AND NOT vitalperiodic.sao2 IS NULL ORDE... | eicu |
CREATE TABLE table_name_97 (
pure_tamil VARCHAR,
how_other_iyers_say_it VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the pure tamil for enga athilae
| SELECT pure_tamil FROM table_name_97 WHERE how_other_iyers_say_it = "enga athilae" | sql_create_context |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
v... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 5828 AND admissions.dischtime IS NULL) AND transfers.careunit = 'sicu' ORDER BY transfers.intime DESC LIMIT 1 | mimic_iii |
CREATE TABLE table_16388439_3 (
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the home team score for brisbane lions
| SELECT home_team AS score FROM table_16388439_3 WHERE home_team = "Brisbane Lions" | sql_create_context |
CREATE TABLE table_2664 (
"Ticket / Office" text,
"Secretary of State" text,
"Comptroller" text,
"Attorney General" text,
"Treasurer" text,
"State Engineer" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the comptroller for office of prohib... | SELECT "Comptroller" FROM table_2664 WHERE "Ticket / Office" = 'Prohibition' | wikisql |
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 jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decima... | SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY AVG(MANAGER_ID) | nvbench |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE d_items (
row_id number,
... | SELECT microbiologyevents.org_name FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 16904) AND microbiologyevents.spec_type_desc = 'abscess' AND NOT microbiologyevents.org_name IS NULL AND STRFTIME('%y-%m', microbiologyevents.charttime)... | mimic_iii |
CREATE TABLE table_18530 (
"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.
-- What year was incumbent barratt o'hara first elected?
| SELECT "First elected" FROM table_18530 WHERE "Incumbent" = 'Barratt O''Hara' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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... | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) 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 = '4... | css |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM t... | SELECT JLSJ FROM mzjzjlb WHERE JZLSH = '61436514102' | css |
CREATE TABLE table_13411 (
"Overall points" text,
"100 m" text,
"400 m" text,
"110 m H" text,
"1500 m" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 110 m H when the 1500 m time is 693 4:37.96 min?
| SELECT "110 m H" FROM table_13411 WHERE "1500 m" = '693 4:37.96 min' | wikisql |
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 jybgb.BGJGDM, jybgb.BGJGMC FROM jybgb WHERE jybgb.BGDH = '38516022248' | css |
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 DISTINCT course.department, course.name, course.number, instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.name LIKE '%A History of the Economy%' AND NOT instructor.name LIKE '%Messer%' AND offering_instructor.instructor_id ... | advising |
CREATE TABLE table_name_41 (
home_team VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points did Carlton score?
| SELECT home_team AS score FROM table_name_41 WHERE away_team = "carlton" | sql_create_context |
CREATE TABLE table_name_51 (
icao VARCHAR,
city VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- I want the ICAO for city of xi'an
| SELECT icao FROM table_name_51 WHERE city = "xi'an" | sql_create_context |
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE area.area LIKE '%intelligent systems%' AND program_course.workload < (SELECT MIN(PROGRAM_... | advising |
CREATE TABLE table_40213 (
"Event" text,
"2007\u201308" text,
"2008\u201309" text,
"2009\u201310" text,
"2010\u201311" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 2010 11 when the Event is colonial square ladies classic?
| SELECT "2010\u201311" FROM table_40213 WHERE "Event" = 'colonial square ladies classic' | wikisql |
CREATE TABLE table_name_17 (
drawn INTEGER,
position VARCHAR,
goals_for VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the largest drawn number when 14 is the position, and goals for is more than 66?
| SELECT MAX(drawn) FROM table_name_17 WHERE position = 14 AND goals_for > 66 | sql_create_context |
CREATE TABLE table_name_90 (
time VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the time for martin kampmann
| SELECT time FROM table_name_90 WHERE opponent = "martin kampmann" | sql_create_context |
CREATE TABLE table_10319 (
"Class" text,
"Wheel arrangement" text,
"LCDR number(s)" text,
"SECR numbers" text,
"Manufacturer" text,
"Year made" text,
"Quantity made" text,
"Quantity preserved" text,
"Year(s) withdrawn" text
)
-- Using valid SQLite, answer the following questions fo... | SELECT "Year(s) withdrawn" FROM table_10319 WHERE "Year made" = '1876' | 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 jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE countries (
COUNTRY... | SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY AVG(DEPARTMENT_ID) DESC | nvbench |
CREATE TABLE table_2765 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real,
"U.S. viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- H... | SELECT COUNT("Directed by") FROM table_2765 WHERE "Season #" = '3' | wikisql |
CREATE TABLE table_name_62 (
model VARCHAR,
seats VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Model had 37-78 seats?
| SELECT model FROM table_name_62 WHERE seats = "37-78" | sql_create_context |
CREATE TABLE table_name_25 (
division INTEGER,
playoffs VARCHAR,
regular_season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest Division when the playoffs were the quarter finals, with a Regular Season of 5th?
| SELECT MAX(division) FROM table_name_25 WHERE playoffs = "quarter finals" AND regular_season = "5th" | sql_create_context |
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId nu... | SELECT Posts.Id AS "post_link", Posts.Score FROM Posts INNER JOIN PostTags ON PostTags.PostId = Posts.Id INNER JOIN Tags ON Tags.Id = PostTags.TagId WHERE Posts.PostTypeId = 1 AND Posts.CreationDate >= DATEADD(MONTH, -6, GETDATE()) AND Posts.CreationDate <= GETDATE() AND Tags.TagName = @TagName ORDER BY Score DESC | sede |
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.diagnosis = "SIGMOID DIVERTICULITIS, COLOVESTICAL FISTULA/SDA" AND demographic.days_stay > "2" | mimicsql_data |
CREATE TABLE airports (
apid integer,
name text,
city text,
country text,
x real,
y real,
elevation bigint,
iata character varchar(3),
icao character varchar(4)
)
CREATE TABLE routes (
rid integer,
dst_apid integer,
dst_ap varchar(4),
src_apid bigint,
src_ap varc... | SELECT name, elevation FROM airports WHERE city = 'New York' | nvbench |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM tex... | (SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM 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... | css |
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%iran%' OR UPPER(Location) LIKE '%iran%' OR Location LIKE '%Iran%' AND Reputation >= 1000 ORDER BY Reputation DESC | sede |
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 SUM(t_kc22.AMOUNT) FROM t_kc22 JOIN mzb ON mzb.MED_ORG_DEPT_CD = t_kc22.MED_CLINIC_ID WHERE mzb.PERSON_SEX = '陶依美' AND t_kc22.STA_DATE BETWEEN '2017-05-19' AND '2021-11-23' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' | css |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT AVG(t_kc21.MED_AMOUT) FROM t_kc21 WHERE t_kc21.MED_ORG_DEPT_CD = '72329' AND t_kc21.IN_HOSP_DATE BETWEEN '2001-04-03' AND '2005-06-30' AND t_kc21.IN_DIAG_DIS_CD = 'J47.822' AND t_kc21.CLINIC_TYPE = '住院' | css |
CREATE TABLE table_56676 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the lowest total when the rank is less than 2 and bronze is more than 0?
| SELECT MIN("Total") FROM table_56676 WHERE "Rank" < '2' AND "Bronze" > '0' | wikisql |
CREATE TABLE table_15977768_1 (
del_pueblo VARCHAR,
centennial VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the del pueblo for centennial 1988
| SELECT del_pueblo FROM table_15977768_1 WHERE centennial = "1988" | sql_create_context |
CREATE TABLE table_name_79 (
venue VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the venue of North Melbourne?
| SELECT venue FROM table_name_79 WHERE home_team = "north melbourne" | 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, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name DESC | nvbench |
CREATE TABLE table_69366 (
"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.
-- What was the final score when the New York Jets were the Visiting Team?
| SELECT "Final Score" FROM table_69366 WHERE "Visiting Team" = 'new york jets' | wikisql |
CREATE TABLE table_name_41 (
gold INTEGER,
bronze INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many golds for nations with under 1 bronze?
| SELECT SUM(gold) FROM table_name_41 WHERE bronze < 1 | sql_create_context |
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 allergy (
allergy... | SELECT AVG(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-94542')) AND intakeoutput.celllabel = 'enter... | eicu |
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 procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
... | SELECT COUNT(*) > 0 FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 10431)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'gu irrigant/ur... | mimic_iii |
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE paperda... | SELECT DISTINCT writes.paperid FROM author, paper, writes WHERE author.authorname = 'oren etzioni' AND writes.authorid = author.authorid AND writes.paperid = paper.paperid ORDER BY paper.year DESC | scholar |
CREATE TABLE table_name_70 (
record VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Jimmy Smith's opponent's record?
| SELECT record FROM table_name_70 WHERE opponent = "jimmy smith" | sql_create_context |
CREATE TABLE table_name_71 (
player VARCHAR,
position VARCHAR,
college VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Player, when Position is DB, and when College is Saint Mary's?
| SELECT player FROM table_name_71 WHERE position = "db" AND college = "saint mary's" | sql_create_context |
CREATE TABLE table_2306 (
"County" text,
"Obama%" text,
"Obama#" real,
"McCain%" text,
"McCain#" real,
"Others%" text,
"Others#" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When McCain% was 64.8%, what is the Others#?
| SELECT "Others#" FROM table_2306 WHERE "McCain%" = '64.8%' | wikisql |
CREATE TABLE table_name_29 (
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the 2nd leg for 2004?
| SELECT 2 AS nd_leg FROM table_name_29 WHERE year = 2004 | sql_create_context |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM ... | SELECT jybgb.BBCJBW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN mzjzjlb_jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb_jybgb.BGD... | css |
CREATE TABLE table_14649522_1 (
nfl_team VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team does Robert Brooks play with?
| SELECT nfl_team FROM table_14649522_1 WHERE player = "Robert Brooks" | sql_create_context |
CREATE TABLE table_name_71 (
written_by VARCHAR,
original_air_date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the writer for the episode with an Original air date of october 9, 2000?
| SELECT written_by FROM table_name_71 WHERE original_air_date = "october 9, 2000" | sql_create_context |
CREATE TABLE table_47099 (
"Round" real,
"Pick #" real,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average value for Pick #, when Position is Linebacker, when Player is Bob Bruenig, and when ... | SELECT AVG("Pick #") FROM table_47099 WHERE "Position" = 'linebacker' AND "Player" = 'bob bruenig' AND "Round" < '3' | wikisql |
CREATE TABLE table_name_32 (
length VARCHAR,
version VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is listed for the Lengtht that has a Version of Single Version?
| SELECT length FROM table_name_32 WHERE version = "single version" | sql_create_context |
CREATE TABLE table_1820752_1 (
distance___ly__ VARCHAR,
spectral_type VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the spectral type is g1v, what is the total distance amount?
| SELECT COUNT(distance___ly__) FROM table_1820752_1 WHERE spectral_type = "G1V" | sql_create_context |
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.JZKSBM, zzmzjzjlb.JZKSMC FROM zzmzjzjlb WHERE zzmzjzjlb.JZLSH = '86971332521' UNION SELECT fzzmzjzjlb.JZKSBM, fzzmzjzjlb.JZKSMC FROM fzzmzjzjlb WHERE fzzmzjzjlb.JZLSH = '86971332521' | css |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_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 HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY AVG(MANAGER_ID) | nvbench |
CREATE TABLE table_7544 (
"Name" text,
"Date of Birth" text,
"Height" real,
"Weight" real,
"Spike" real,
"Block" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of Weight(s), when Block is 300?
| SELECT COUNT("Weight") FROM table_7544 WHERE "Block" = '300' | wikisql |
CREATE TABLE table_75240 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score in the tournament against Ekaterina Makarova?
| SELECT "Score" FROM table_75240 WHERE "Opponent" = 'ekaterina makarova' | wikisql |
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Ac posthemorrhag anemia" AND lab.fluid = "Joint Fluid" | mimicsql_data |
CREATE TABLE gwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT SUM(t_kc22.AMOUNT) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_ID = '40751656' AND gwyjzb.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2000-02-19' AND '2009-09-05' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' UNION SELECT SUM(t_kc22.AMOUNT) FROM fgwyjzb JOIN t_kc22 ON fg... | css |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.