instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_57756 (
"Tournament" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 2007 value with 1r in 2011 and 1r in 2010?
| SELECT "2007" FROM table_57756 WHERE "2011" = '1r' AND "2010" = '1r' | wikisql |
CREATE TABLE table_1341453_37 (
district VARCHAR,
incumbent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In which district is the incumbent Marcia C. Kaptur?
| SELECT district FROM table_1341453_37 WHERE incumbent = "Marcia C. Kaptur" | sql_create_context |
CREATE TABLE table_52139 (
"Athlete" text,
"Nationality" text,
"3.60" text,
"3.80" text,
"3.95" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the athlete with a final result of 4.30?
| SELECT "Athlete" FROM table_52139 WHERE "Result" = '4.30' | wikisql |
CREATE TABLE table_name_13 (
distance VARCHAR,
stage VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the distance of the course for stage 4?
| SELECT distance FROM table_name_13 WHERE stage = "4" | sql_create_context |
CREATE TABLE table_name_56 (
venue VARCHAR,
year VARCHAR,
competition VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the venue when the year is after 2001 for the summer olympics?
| SELECT venue FROM table_name_56 WHERE year > 2001 AND competition = "summer olympics" | sql_create_context |
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 COUNT(DISTINCT course_offering.course_id) FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'CHE' AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016 | advising |
CREATE TABLE Documents (
project_id VARCHAR
)
CREATE TABLE projects (
project_id VARCHAR,
project_details VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show the document name and the document date for all documents on project with details 'Graph Databa... | SELECT document_name, document_date FROM Documents AS T1 JOIN projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'Graph Database project' | sql_create_context |
CREATE TABLE table_name_38 (
driver VARCHAR,
grid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who drove the car with a grid of 7?
| SELECT driver FROM table_name_38 WHERE grid = 7 | sql_create_context |
CREATE TABLE table_name_61 (
home_team VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What did the home team score against Fitzroy?
| SELECT home_team AS score FROM table_name_61 WHERE away_team = "fitzroy" | sql_create_context |
CREATE TABLE table_21781578_2 (
season_no VARCHAR,
production_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the season number for production code E2110?
| SELECT season_no FROM table_21781578_2 WHERE production_code = "E2110" | sql_create_context |
CREATE TABLE table_26996293_2 (
player VARCHAR,
college VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- where college is british columbia what are all the player
| SELECT player FROM table_26996293_2 WHERE college = "British Columbia" | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.dob_year < "2053" | mimicsql_data |
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 zyjzjlb (
CYBQDM text,
CYBQMC... | SELECT zyjybgb.SHRGH, zyjybgb.SHRXM FROM zyjybgb WHERE zyjybgb.JZLSH = '75568480479' GROUP BY zyjybgb.SHRGH HAVING COUNT(*) > 29 UNION SELECT mzjybgb.SHRGH, mzjybgb.SHRXM FROM mzjybgb WHERE mzjybgb.JZLSH = '75568480479' GROUP BY mzjybgb.SHRGH HAVING COUNT(*) > 29 | css |
CREATE TABLE table_name_91 (
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date was the score 'score'?
| SELECT date FROM table_name_91 WHERE "score" = "score" | sql_create_context |
CREATE TABLE table_39538 (
"Rank" real,
"Name" text,
"Nationality" text,
"1st (m)" real,
"2nd (m)" real,
"Points" real,
"Overall WC points (Rank)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Name has a 2nd (m) larger than 128.5, and... | SELECT "Name" FROM table_39538 WHERE "2nd (m)" > '128.5' AND "Points" = '260.8' | wikisql |
CREATE TABLE table_name_34 (
in_de_creased_by INTEGER,
percentage_in_de_crease VARCHAR,
seats_2010 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the highest In/de-creased which has a Percentage in/de-crease of 100%, and Seats 2010 larger than 8?
| SELECT MAX(in_de_creased_by) FROM table_name_34 WHERE percentage_in_de_crease = "100%" AND seats_2010 > 8 | sql_create_context |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT School_ID, All_Games_Percent FROM basketball_match GROUP BY Team_Name | nvbench |
CREATE TABLE txmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | SELECT txmzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN txmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE person_info.XM = '王清妍' AND NOT txmzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2004-06-1... | css |
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 OUT_DIAG_DIS_NM, AVG(PERSON_AGE) FROM t_kc21 WHERE MED_SER_ORG_NO = '6465348' GROUP BY OUT_DIAG_DIS_NM | css |
CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER,
Customer_Policy_ID INTEGER
)
CREATE TABLE Customers (
Customer_ID INTEGER,
Customer_Details VARCHAR(255)
)
CREATE TABLE... | SELECT T1.Claim_ID, COUNT(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_ID = T2.Claim_ID GROUP BY T1.Claim_ID | 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 T2.Headquarter, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Headquarter ORDER BY T2.Headquarter DESC | nvbench |
CREATE TABLE table_18509 (
"Channel" real,
"Center Frequency" text,
"Frequency delta" text,
"Channel Width" text,
"Overlaps Channels" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the channel width that overlaps channels 1,3-6?
| SELECT "Channel Width" FROM table_18509 WHERE "Overlaps Channels" = '1,3-6' | wikisql |
CREATE TABLE table_name_80 (
score VARCHAR,
place VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What score did Ted Kroll get to come in at T2?
| SELECT score FROM table_name_80 WHERE place = "t2" AND player = "ted kroll" | sql_create_context |
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 t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '褚勇男' AND t_kc21.MED_SER_ORG_NO = '2498476' AND t_kc21.IN_HOSP_DATE BETWEEN '2017-01-25' AND '2019-12-02') | css |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb 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 AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = j... | css |
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 d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t1.itemid FROM (SELECT labevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN 50 AND 59) AND STRFTIME('%y', labevents.c... | mimic_iii |
CREATE TABLE table_name_9 (
took_office INTEGER,
deputy_prime_minister VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year did deputy prime minister Mariano Rajoy Brey take office?
| SELECT SUM(took_office) FROM table_name_9 WHERE deputy_prime_minister = "mariano rajoy brey" | sql_create_context |
CREATE TABLE table_43197 (
"Year" real,
"Winner" text,
"Jockey" text,
"Trainer" text,
"Owner" text,
"Distance (Miles)" text,
"Time" text,
"Purse" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what Year was the Purse $150,000 with a T... | SELECT MIN("Year") FROM table_43197 WHERE "Purse" = '$150,000' AND "Time" = '1:49.00' | wikisql |
CREATE TABLE table_6687 (
"Year (Ceremony)" text,
"Film title used in nomination" text,
"Original title" text,
"Director" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what year did naga bonar take place
| SELECT "Year (Ceremony)" FROM table_6687 WHERE "Original title" = 'naga bonar' | wikisql |
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 flight.departure_time FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND days.day_name = 'SATURDAY' AND flight.flight_days = days.days_cod... | atis |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT ACC_Regular_Season, ACC_Percent FROM basketball_match ORDER BY ACC_Regular_Season | nvbench |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_NM = '袁古韵' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE AMOUNT >= 3093.83) | css |
CREATE TABLE table_name_7 (
company VARCHAR,
principal_activities VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What company focuses on Engine Overhaul for their principal activity?
| SELECT company FROM table_name_7 WHERE principal_activities = "engine overhaul" | sql_create_context |
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)... | SELECT COUNT(*), Name FROM PostFeedback JOIN VoteTypes AS vt ON vt.Id = VoteTypeId WHERE PostId IN (55884514, 55885729) GROUP BY Name | sede |
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 COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 511 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016 | advising |
CREATE TABLE table_204_41 (
id number,
"rank" number,
"name" text,
"nationality" text,
"time" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how long was the longest time ?
| SELECT "time" FROM table_204_41 ORDER BY "time" DESC LIMIT 1 | squall |
CREATE TABLE table_name_79 (
points INTEGER,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the sum of points for 1991
| SELECT SUM(points) FROM table_name_79 WHERE year = 1991 | sql_create_context |
CREATE TABLE table_46977 (
"Year" real,
"Date" text,
"Winner" text,
"Result" text,
"Loser" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Year had a Result of 34-25?
| SELECT AVG("Year") FROM table_46977 WHERE "Result" = '34-25' | wikisql |
CREATE TABLE person_info_hz_info (
RYBH text,
KH number,
KLX number,
YLJGDM number
)
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text
)
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH tex... | SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN person_info_hz_info JOIN person_info 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 = ... | css |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE charte... | SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'diagnoses_icd' AND cost.event_id IN (SELECT diagnoses_icd.row_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 = 'bleed esoph var oth dis')) | mimic_iii |
CREATE TABLE table_19159 (
"Year" real,
"1st District" text,
"2nd District" text,
"3rd District" text,
"4th District" text,
"5th District" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List all the years with Cecil M. Featherly in the 1st distr... | SELECT "Year" FROM table_19159 WHERE "2nd District" = 'David L. Baker' AND "1st District" = 'Cecil M. Featherly' | wikisql |
CREATE TABLE Customers (
customer_id INTEGER,
payment_method_code VARCHAR(15),
customer_number VARCHAR(20),
customer_name VARCHAR(80),
customer_address VARCHAR(255),
customer_phone VARCHAR(80),
customer_email VARCHAR(80)
)
CREATE TABLE Order_Items (
order_item_id INTEGER,
order_id I... | SELECT T3.city, COUNT(T3.city) FROM Customer_Address_History AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id JOIN Addresses AS T3 ON T1.address_id = T3.address_id GROUP BY T3.city ORDER BY T3.city DESC | nvbench |
CREATE TABLE table_18854 (
"Distribution" text,
"Compile time buffer checks" text,
"Mandatory access control" text,
"Software executable space protection" text,
"grsecurity" text,
"RSBAC" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what's the... | SELECT "Distribution" FROM table_18854 WHERE "grsecurity" = 'Optional' AND "Compile time buffer checks" = 'Yes' | wikisql |
CREATE TABLE table_21034801_1 (
game VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What number was the game against Kansas State?
| SELECT game FROM table_21034801_1 WHERE opponent = "Kansas State" | sql_create_context |
CREATE TABLE table_name_64 (
league VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the League with a Year that is 1990/91?
| SELECT league FROM table_name_64 WHERE year = "1990/91" | sql_create_context |
CREATE TABLE table_31304 (
"Season" text,
"Ave. Attendance" real,
"+/- ave. on prev. season" text,
"Competition" text,
"Occupier" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is every value for average on previous season if the competition is... | SELECT "+/- ave. on prev. season" FROM table_31304 WHERE "Competition" = 'League Two' | wikisql |
CREATE TABLE table_29891 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What t... | SELECT "Team" FROM table_29891 WHERE "Score" = 'W 110–87 (OT)' | wikisql |
CREATE TABLE table_name_13 (
location VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the location for 2012?
| SELECT location FROM table_name_13 WHERE year = 2012 | sql_create_context |
CREATE TABLE resultsdata15 (
sample_pk number,
commod text,
commtype text,
lab text,
pestcode text,
testclass text,
concen number,
lod number,
conunit text,
confmethod text,
confmethod2 text,
annotate text,
quantitate text,
mean text,
extract text,
determi... | SELECT site FROM sampledata15 WHERE sample_pk = 3763 | pesticide |
CREATE TABLE table_17919 (
"Position" real,
"Club" text,
"Played" real,
"Won" real,
"Drawn" real,
"Lost" real,
"Pts For" real,
"Pts Agst" real,
"B.P." real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the most... | SELECT MAX("Pts For") FROM table_17919 WHERE "Won" = '9' | wikisql |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE procedures_icd (
row_id number,
su... | 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_24306 (
"Episode number" real,
"Total episodes" real,
"Title" text,
"Original UK broadcast by" text,
"Original UK airdate" text,
"DVD reference" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many have the name, 'The Fire ... | SELECT COUNT("Total episodes") FROM table_24306 WHERE "Title" = 'The Fire Engine' | 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 jyjgzbb.YQBH, jyjgzbb.YQMC 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.BG... | css |
CREATE TABLE table_name_51 (
winning_driver VARCHAR,
race_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the winning drive of iv grand prix de caen?
| SELECT winning_driver FROM table_name_51 WHERE race_name = "iv grand prix de caen" | sql_create_context |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
g... | SELECT DISTINCT COURSE_1.department, COURSE_1.name, COURSE_1.number FROM course AS COURSE_0 INNER JOIN course_prerequisite ON COURSE_0.course_id = course_prerequisite.course_id INNER JOIN course AS COURSE_1 ON COURSE_1.course_id = course_prerequisite.pre_course_id WHERE COURSE_0.department = 'SI' AND COURSE_0.number = ... | advising |
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 = '0641182' AND IN_HOSP_DATE BETWEEN '2000-01-18' AND '2003-06-12' AND SERVANT_FLG = '公务员' | css |
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | SELECT OwnerUserId AS "user_link", COUNT(Id) AS "number_of_answers" FROM Posts WHERE PostTypeId = 2 AND Score = 0 AND CommentCount IS NULL GROUP BY OwnerUserId ORDER BY 'number_of_answers' DESC LIMIT 100 | sede |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Suggeste... | SELECT Tags, COUNT(p.Id) AS cnt FROM Posts AS p INNER JOIN PostTags AS pt ON p.Id = pt.PostId INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE PostTypeId = 1 AND p.CreationDate BETWEEN '2015/01/01' AND '2015/12/31' AND Tags LIKE '%java%' AND NOT Tags LIKE '%javascript%' AND NOT Tags LIKE '%javafx%' GROUP BY Tags ORDER BY ... | sede |
CREATE TABLE table_23840623_4 (
clean_electric_grid_california__san_francisco_ VARCHAR,
vehicle VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many clean electric grid california (san francisco) figures are given for the Nissan Leaf?
| SELECT COUNT(clean_electric_grid_california__san_francisco_) FROM table_23840623_4 WHERE vehicle = "Nissan Leaf" | sql_create_context |
CREATE TABLE table_name_49 (
prothrombin_time VARCHAR,
condition VARCHAR,
partial_thromboplastin_time VARCHAR,
bleeding_time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- I want the prothrombin time with a partial thromboplastin time of prolonged an... | SELECT prothrombin_time FROM table_name_49 WHERE partial_thromboplastin_time = "prolonged" AND bleeding_time = "unaffected" AND condition = "factor xii deficiency" | sql_create_context |
CREATE TABLE table_name_38 (
score VARCHAR,
attendance VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The game with home team Crowborough Athletic, with an attendance less than 848 had what as the score?
| SELECT score FROM table_name_38 WHERE attendance < 848 AND home_team = "crowborough athletic" | sql_create_context |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wa... | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT lab.patientunitstayid FROM lab WHERE lab.labname = 'ptt')) AND STRFTIME('%y', cost.chargetime) <= '2104' GROUP BY cost.p... | eicu |
CREATE TABLE theme_parks (
theme_park_id number,
theme_park_details text
)
CREATE TABLE features (
feature_id number,
feature_details text
)
CREATE TABLE locations (
location_id number,
location_name text,
address text,
other_details text
)
CREATE TABLE royal_family (
royal_family... | SELECT T1.royal_family_details, T2.how_to_get_there FROM royal_family AS T1 JOIN tourist_attractions AS T2 ON T1.royal_family_id = T2.tourist_attraction_id | spider |
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 demographic.admission_location, demographic.discharge_location FROM demographic WHERE demographic.subject_id = "25543" | mimicsql_data |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE 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 WHERE demographic.insurance = "Private" AND demographic.dob_year < "2150" | mimicsql_data |
CREATE TABLE table_8668 (
"Province" text,
"Capital" text,
"Population at 2010 Census" real,
"Area (km\u00b2)" real,
"Density (2010)" real,
"Geographical unit" text,
"Number of Cities (kota)" real,
"Number of Regencies (kabupaten)" real,
"Number of Districts (kecamatan)" real,
"V... | SELECT MIN("Number of Cities (kota)") FROM table_8668 WHERE "Number of Districts (kecamatan)" < '65' AND "Population at 2010 Census" < '3,890,757' AND "Area (km\u00b2)" = '16,424' | 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 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "0" AND diagnoses.long_title = "Atrial fibrillation" | mimicsql_data |
CREATE TABLE table_36478 (
"Position" real,
"Sail number" text,
"Yacht" text,
"State/country" text,
"Yacht type" text,
"LOA (Metres)" real,
"Skipper" text,
"Corrected time d:hh:mm:ss" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHICH ... | SELECT "Corrected time d:hh:mm:ss" FROM table_36478 WHERE "Position" < '7' AND "Yacht type" = 'cookson 50' | wikisql |
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId ... | SELECT TagsWOWikiExcerpt.Id AS TagId, TagsWOWikiExcerpt.TagName, TagsWOWikiExcerpt.Count, TagsWOWikiExcerpt.ExcerptBody, Posts.Body AS WikiBody, TagsWOWikiExcerpt.PostTypeId, TagsWOWikiExcerpt.CreationDate, TagsWOWikiExcerpt.DeletionDate, TagsWOWikiExcerpt.LastEditDate, TagsWOWikiExcerpt.LastActivityDate FROM (SELECT T... | sede |
CREATE TABLE table_24837750_1 (
turbine_manufacturer VARCHAR,
county VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the turbine manufacturer for the Wheatland county?
| SELECT turbine_manufacturer FROM table_24837750_1 WHERE county = "Wheatland" | sql_create_context |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'benicar' AND DATETIME(prescriptions.startdate) >= DATETIME(CURREN... | mimic_iii |
CREATE TABLE table_2802 (
"Club" text,
"Location" text,
"Manager" text,
"Stadium" text,
"Capacity" real,
"Team captain" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many people can attend games in the stadium of the team whose captain is V... | SELECT "Capacity" FROM table_2802 WHERE "Team captain" = 'Vasil Vasilev' | wikisql |
CREATE TABLE table_26689 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text,
"Position in table" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is t... | SELECT "Manner of departure" FROM table_26689 WHERE "Team" = 'Racing Santander' | wikisql |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE i... | 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 = 14154) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1) AND chartevents... | mimic_iii |
CREATE TABLE transactions_lots (
transaction_id number,
lot_id number
)
CREATE TABLE transactions (
transaction_id number,
investor_id number,
transaction_type_code text,
date_of_transaction time,
amount_of_transaction number,
share_count text,
other_details text
)
CREATE TABLE ref... | SELECT T1.investor_details FROM investors AS T1 JOIN transactions AS T2 ON T1.investor_id = T2.investor_id WHERE T2.share_count > 100 | spider |
CREATE TABLE table_204_74 (
id number,
"#" number,
"title" text,
"producers" text,
"guest performers" text,
"length" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how long is track number 11 ?
| SELECT "length" FROM table_204_74 WHERE "#" = 11 | squall |
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 jybgb (
BBCJBW text,
BBDM tex... | SELECT * FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jy... | css |
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 d_icd_procedures (
row_id number,
icd9_code text,
s... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, COUNT(*) AS c1 FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'packed cell transfusi... | mimic_iii |
CREATE TABLE table_name_52 (
place VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where is Miller Barber from?
| SELECT place FROM table_name_52 WHERE player = "miller barber" | sql_create_context |
CREATE TABLE table_10605 (
"Entrant" text,
"Constructor" text,
"Chassis" text,
"Engine" text,
"Tyre" text,
"Driver" text,
"Rounds" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Motor Racing Developments used which tire in rounds 3-12?
| SELECT "Tyre" FROM table_10605 WHERE "Entrant" = 'motor racing developments' AND "Rounds" = '3-12' | wikisql |
CREATE TABLE table_203_734 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"event" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- in which years did civallero only have one achievement ?
| SELECT "year" FROM table_203_734 GROUP BY "year" HAVING COUNT(*) = 1 | squall |
CREATE TABLE table_31122 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who wrote the episode that was direc... | SELECT "Written by" FROM table_31122 WHERE "Directed by" = 'Kevin Inch' | wikisql |
CREATE TABLE table_name_54 (
score VARCHAR,
visitor VARCHAR,
home VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score when there was a visitor of Magic and at home with the Clippers?
| SELECT score FROM table_name_54 WHERE visitor = "magic" AND home = "clippers" | sql_create_context |
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE airport (
airport_code varchar,
... | SELECT DISTINCT ground_service.ground_fare FROM airport, ground_service WHERE airport.airport_code = 'PHL' AND ground_service.airport_code = airport.airport_code AND ground_service.transport_type = 'AIR TAXI OPERATION' | atis |
CREATE TABLE Person (
name varchar(20),
age INTEGER,
city TEXT,
gender TEXT,
job TEXT
)
CREATE TABLE PersonFriend (
name varchar(20),
friend varchar(20),
year INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the job titles of ... | SELECT job, COUNT(job) FROM Person GROUP BY job | nvbench |
CREATE TABLE table_53980 (
"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 team score when the crowd was l... | SELECT "Home team score" FROM table_53980 WHERE "Crowd" > '30,100' | wikisql |
CREATE TABLE table_name_37 (
z___p__ INTEGER,
n___n__ VARCHAR,
element VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest Z (p) when the N (n) is less than 30, and scandium is the element?
| SELECT AVG(z___p__) FROM table_name_37 WHERE n___n__ < 30 AND element = "scandium" | sql_create_context |
CREATE TABLE product_suppliers (
product_id number,
supplier_id number,
date_supplied_from time,
date_supplied_to time,
total_amount_purchased text,
total_value_purchased number
)
CREATE TABLE department_stores (
dept_store_id number,
dept_store_chain_id number,
store_name text,
... | SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1 | spider |
CREATE TABLE table_484 (
"Season #" real,
"Series #" real,
"Title" text,
"Canadian airdate" text,
"U.S. airdate" text,
"Production code" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the maximum season # with a u.s. air date is may 1, 2... | SELECT MAX("Season #") FROM table_484 WHERE "U.S. airdate" = 'May 1, 2009' | wikisql |
CREATE TABLE Students_in_Detention (
student_id INTEGER,
detention_id INTEGER,
incident_id INTEGER
)
CREATE TABLE Student_Addresses (
student_id INTEGER,
address_id INTEGER,
date_address_from DATETIME,
date_address_to DATETIME,
monthly_rental DECIMAL(19,4),
other_details VARCHAR(255... | SELECT address_id, monthly_rental FROM Student_Addresses ORDER BY monthly_rental DESC | nvbench |
CREATE TABLE table_23446 (
"Index (Year)" text,
"Author / Editor / Source" text,
"Year of publication" text,
"Countries sampled" real,
"World Ranking (1)" text,
"Ranking L.A. (2)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the autho... | SELECT "Author / Editor / Source" FROM table_23446 WHERE "Ranking L.A. (2)" = '1st' | wikisql |
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight, food_service WHERE ((((flight.departure_time BETWEEN 0 AND 1200) AND food_service.meal_code = flight.meal_code AND food_service.meal_description = 'BR... | atis |
CREATE TABLE table_34460 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Series" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What score has april 28 as the date?
| SELECT "Score" FROM table_34460 WHERE "Date" = 'april 28' | wikisql |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
Par... | WITH MathTags AS (SELECT TagName AS Tag, Count FROM "stackexchange.math".dbo.Tags UNION SELECT TagSynonyms.SourceTagName AS Tag, Tags.Count FROM "stackexchange.math".dbo.TagSynonyms LEFT JOIN "stackexchange.math".dbo.Tags ON TagSynonyms.TargetTagName = Tags.TagName), PhysicsTags AS (SELECT TagName AS Tag, Count FROM "s... | sede |
CREATE TABLE table_name_32 (
opponent VARCHAR,
method VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent when there was a TKO method?
| SELECT opponent FROM table_name_32 WHERE method = "tko" | sql_create_context |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellv... | SELECT vitalperiodic.systemicdiastolic FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-24054') AND patient.unitdischargetime IS NULL... | eicu |
CREATE TABLE table_13018 (
"Player" text,
"Height" real,
"Position" text,
"Year born (Age)" text,
"Current Club" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Count the average Height which has a Position of pf, and a Year born (Age) on april 1, 19... | SELECT AVG("Height") FROM table_13018 WHERE "Position" = 'pf' AND "Year born (Age)" = 'april 1, 1981 (age32)' | wikisql |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT t_kc21.PERSON_NM, t_kc21.PERSON_SEX, t_kc21.PERSON_AGE, t_kc21.IDENTITY_CARD FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '75285494355' | css |
CREATE TABLE table_900 (
"Region" text,
"Total Population" real,
"Hindus" real,
"% of Hindus" text,
"% of Hindu total" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest number where the portion of observers is 0.163%?
| SELECT MAX("Hindus") FROM table_900 WHERE "% of Hindus" = '0.163%' | wikisql |
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 icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit... | SELECT t1.spec_type_desc FROM (SELECT microbiologyevents.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM microbiologyevents WHERE DATETIME(microbiologyevents.charttime) <= DATETIME(CURRENT_TIME(), '-4 year') GROUP BY microbiologyevents.spec_type_desc) AS t1 WHERE t1.c1 <= 5 | mimic_iii |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.