instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_18348 (
"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.
-- Name the incumbent for district texas 12
| SELECT "Incumbent" FROM table_18348 WHERE "District" = 'Texas 12' | wikisql |
CREATE TABLE table_203_763 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- in what years did ramon gonzalez come in first place ?
| SELECT "year" FROM table_203_763 WHERE "position" = 1 | squall |
CREATE TABLE table_59509 (
"School" text,
"Suburb/Town" text,
"Years" text,
"Founded" real,
"Website" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the year Airds High School was founded?
| SELECT "Founded" FROM table_59509 WHERE "School" = 'airds high school' | 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 MAX(demographic.age) FROM demographic WHERE demographic.days_stay = "11" AND demographic.dod_year < "2154.0" | mimicsql_data |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM 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 = jybgb.J... | css |
CREATE TABLE table_69894 (
"Rank" real,
"Player" text,
"County" text,
"Tally" text,
"Total" real,
"Opposition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- With a Tally of 0-14, what is the Rank in Kilkenny County?
| SELECT COUNT("Rank") FROM table_69894 WHERE "County" = 'kilkenny' AND "Tally" = '0-14' | wikisql |
CREATE TABLE table_204_735 (
id number,
"rank" number,
"team" text,
"names" text,
"time" text,
"qualification" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many consecutive rankings are listed ?
| SELECT COUNT("rank") FROM table_204_735 | squall |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE patients (
row_id number,
subject_id number,
... | SELECT (SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.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 STRFTIME('%y-%m-%d', inputevents_cv.charttime) <= '2105-12-00') - (SEL... | mimic_iii |
CREATE TABLE table_27987623_4 (
rank_timeslot_ VARCHAR,
airdate VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the total rank on airdate march 30, 2011?
| SELECT COUNT(rank_timeslot_) FROM table_27987623_4 WHERE airdate = "March 30, 2011" | sql_create_context |
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id int,
flight_number int,
from_airport varchar,
meal_code text,
stops int,... | SELECT DISTINCT flight.flight_id FROM airport_service, city, flight, flight_stop WHERE city.city_code = airport_service.city_code AND city.city_name = 'ATLANTA' AND flight_stop.arrival_time < 1200 AND flight_stop.stop_airport = airport_service.airport_code AND flight.flight_id = flight_stop.flight_id | atis |
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight re... | SELECT Name, Weight FROM people | nvbench |
CREATE TABLE table_38237 (
"Games" real,
"Drawn" real,
"Lost" real,
"Points difference" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest number of draws with 14 points and less than 7 games?
| SELECT MAX("Drawn") FROM table_38237 WHERE "Points" = '14' AND "Games" < '7' | wikisql |
CREATE TABLE table_name_38 (
military_deaths VARCHAR,
total_casualties VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many members of the military died in the conflict that had a total of 531 casualties?
| SELECT military_deaths FROM table_name_38 WHERE total_casualties = "531" | sql_create_context |
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 department, name, number FROM course WHERE (description LIKE '%Advanced Al Techniques%' OR name LIKE '%Advanced Al Techniques%') AND credits = 4 | advising |
CREATE TABLE table_51905 (
"Player" text,
"Car." real,
"Yards" real,
"Avg." real,
"TD's" real,
"Long" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number of TD's for long more than 6 and cars less than 4
| SELECT COUNT("TD's") FROM table_51905 WHERE "Long" > '6' AND "Car." < '4' | wikisql |
CREATE TABLE table_1341453_15 (
results VARCHAR,
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result in Illinois 7?
| SELECT results FROM table_1341453_15 WHERE district = "Illinois 7" | sql_create_context |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE patient (
... | SELECT COUNT(*) FROM medication WHERE medication.drugname = 'definity' AND DATETIME(medication.drugstarttime) >= DATETIME(CURRENT_TIME(), '-4 year') | eicu |
CREATE TABLE table_22654 (
"Date Released" text,
"Polling institute" text,
"Social Democratic" text,
"Socialist" text,
"Green-Communist" text,
"Democratic and Social Centre" text,
"Lead" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How man... | SELECT COUNT("Socialist") FROM table_22654 WHERE "Lead" = '12.6%' | wikisql |
CREATE TABLE table_name_81 (
score VARCHAR,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Score has a Result of 0 2?
| SELECT score FROM table_name_81 WHERE result = "0 – 2" | sql_create_context |
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 job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
... | SELECT JOB_ID, SUM(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY SUM(MANAGER_ID) | 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 t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '95304552' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC | css |
CREATE TABLE table_17325580_6 (
high_points VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is every high point when the team is Washington?
| SELECT high_points FROM table_17325580_6 WHERE team = "Washington" | sql_create_context |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT jybgb.SHSJ FROM hz_info JOIN wdmzjzjlb JOIN jybgb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '47198797' AND jybgb.BGRQ BETWEEN '2007-11-06' AND '2012-... | css |
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 All_Home, Team_ID FROM basketball_match GROUP BY ACC_Road, All_Home ORDER BY Team_ID DESC | nvbench |
CREATE TABLE table_11677760_1 (
player VARCHAR,
year VARCHAR,
college VARCHAR,
school VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the player who's college is listed as direct to nba, school is st. vincent st. mary high school and the year ... | SELECT player FROM table_11677760_1 WHERE college = "Direct to NBA" AND school = "St. Vincent – St. Mary High school" AND year = "2001-2002" | sql_create_context |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardi... | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissi... | mimic_iii |
CREATE TABLE wrestler (
Wrestler_ID int,
Name text,
Reign text,
Days_held text,
Location text,
Event text
)
CREATE TABLE Elimination (
Elimination_ID text,
Wrestler_ID text,
Team text,
Eliminated_By text,
Elimination_Move text,
Time text
)
-- Using valid SQLite, answer... | SELECT Location, COUNT(Location) FROM wrestler GROUP BY Location ORDER BY Location DESC | nvbench |
CREATE TABLE table_29673 (
"Week #" text,
"Theme" text,
"Song Choice" text,
"Original Artist" text,
"Order #" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many different weeks are there in order number 4 that were judge's ch... | SELECT COUNT("Week #") FROM table_29673 WHERE "Theme" = 'Judge''s Choice' AND "Order #" = '4' | wikisql |
CREATE TABLE table_204_268 (
id number,
"album/single" text,
"performer" text,
"year" number,
"variant" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who appeared on more albums , maccoll or kornog ?
| SELECT "performer" FROM table_204_268 WHERE "performer" IN ('ewan maccoll', 'kornog') GROUP BY "performer" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE table_30326 (
"Year Location" text,
"Mens Singles" text,
"Womens Singles" text,
"Mens Doubles" text,
"Womens Doubles" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number of womens singles for 1999 rio de janeiro
| SELECT COUNT("Womens Singles") FROM table_30326 WHERE "Year Location" = '1999 Rio de Janeiro' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND prescriptions.route = "NEB" | mimicsql_data |
CREATE TABLE table_36999 (
"Rank" real,
"First quarter" text,
"Second quarter" text,
"Third quarter" text,
"Fourth quarter" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the third quarter is China Mobile 195,680.4, what is the rank?
| SELECT "Rank" FROM table_36999 WHERE "Third quarter" = 'china mobile 195,680.4' | 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 outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | 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 = 'atrophic vaginitis')) | mimic_iii |
CREATE TABLE table_55800 (
"Name" text,
"Date of birth" text,
"Date of death" text,
"Reign" text,
"Relationship with predecessor" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Date of Death of the person whose Date of Birth was 28 May ... | SELECT "Date of death" FROM table_55800 WHERE "Date of birth" = '28 may 1371' | wikisql |
CREATE TABLE table_59892 (
"Date" text,
"Opponent" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the result of the UEFA Cup, against Palermo?
| SELECT "Result" FROM table_59892 WHERE "Competition" = 'uefa cup' AND "Opponent" = 'palermo' | wikisql |
CREATE TABLE table_36602 (
"Date" text,
"Home Team" text,
"Score" text,
"Visiting Team" text,
"Stadium" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score at CN Centre on April 5, 2008?
| SELECT "Score" FROM table_36602 WHERE "Stadium" = 'cn centre' AND "Date" = 'april 5, 2008' | 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 gwyjzb.MED_ORG_DEPT_CD, gwyjzb.MED_ORG_DEPT_NM FROM gwyjzb WHERE gwyjzb.MED_CLINIC_ID = '41121954222' UNION SELECT fgwyjzb.MED_ORG_DEPT_CD, fgwyjzb.MED_ORG_DEPT_NM FROM fgwyjzb WHERE fgwyjzb.MED_CLINIC_ID = '41121954222' | css |
CREATE TABLE table_18818 (
"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.
-- How ma... | SELECT COUNT("High points") FROM table_18818 WHERE "Team" = 'Utah' | wikisql |
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE fare (
fare... | SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'DENVER' AND ground_service.city_code = city.city_code AND ground_service.transport_type = 'RENTAL CAR' | atis |
CREATE TABLE table_14875671_1 (
date VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the date when the attendance was 63995
| SELECT date FROM table_14875671_1 WHERE attendance = 63995 | sql_create_context |
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_da... | 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 WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBURGH' AND date_day.day_number = 25 AND date_day.month_number = 6 AN... | atis |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varcha... | SELECT JOB_ID, SUM(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY JOB_ID DESC | nvbench |
CREATE TABLE table_name_56 (
record VARCHAR,
games VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Record of the 1991 Port of Spain Games?
| SELECT record FROM table_name_56 WHERE games = "1991 port of spain" | 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.gender = "M" AND demographic.days_stay > "2" | 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 Founder | nvbench |
CREATE TABLE table_11951237_3 (
original_air_date VARCHAR,
directed_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is theoriginal air date of the episode directed by timothy van patten?
| SELECT original_air_date FROM table_11951237_3 WHERE directed_by = "Timothy Van Patten" | sql_create_context |
CREATE TABLE table_name_51 (
congress VARCHAR,
_number_of_cosponsors VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Congress has a # of cosponsors of 19?
| SELECT congress FROM table_name_51 WHERE _number_of_cosponsors = 19 | sql_create_context |
CREATE TABLE table_29290 (
"Season" text,
"Coach" text,
"Conf. Record" text,
"Overall" text,
"Standings" text,
"Postseason" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the conference record for the Pandas when they were first in the ... | SELECT "Conf. Record" FROM table_29290 WHERE "Standings" = 'First' AND "Season" = '2003-04' | wikisql |
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' | nvbench |
CREATE TABLE neighborhood (
id int,
business_id varchar,
neighborhood_name varchar
)
CREATE TABLE user (
uid int,
user_id varchar,
name varchar
)
CREATE TABLE business (
bid int,
business_id varchar,
name varchar,
full_address varchar,
city varchar,
latitude varchar,
... | SELECT business.name FROM business, category WHERE business.city = 'Los Angeles' AND business.review_count > 100 AND category.business_id = business.business_id AND category.category_name = 'restaurant' | yelp |
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 COUNT(*) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '2484766' AND gwyjzb.IN_HOSP_DATE BETWEEN '2003-05-25' AND '2014-06-18' AND gwyjzb.CLINIC_TYPE = '门诊' UNION SELECT COUNT(*) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '2484766' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2003-05-25' AND '2014-06-18' AND fgwyjzb.CLINIC_TY... | css |
CREATE TABLE csu_fees (
campus number,
year number,
campusfee number
)
CREATE TABLE degrees (
year number,
campus number,
degrees number
)
CREATE TABLE discipline_enrollments (
campus number,
discipline number,
year number,
undergraduate number,
graduate number
)
CREATE TA... | SELECT campus FROM campuses WHERE location = "Chico" | spider |
CREATE TABLE table_204_805 (
id number,
"name" text,
"club" text,
"date of departure" text,
"replacement" text,
"date of appointment" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the number of managerial changes that ttm samut sakhon m... | SELECT COUNT(*) FROM table_204_805 WHERE "club" = 'ttm samut sakhon' | squall |
CREATE TABLE table_46430 (
"Finished" real,
"Time/ Behind" text,
"Post" real,
"Horse" text,
"Jockey" text,
"Trainer" text,
"Owner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Jockey, when Horse is 'Eight Belles'?
| SELECT "Jockey" FROM table_46430 WHERE "Horse" = 'eight belles' | wikisql |
CREATE TABLE table_29215 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What college did the player who played DE go to?
| SELECT "College" FROM table_29215 WHERE "Position" = 'DE' | wikisql |
CREATE TABLE table_203_238 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- when was his last competition ?
| SELECT "year" FROM table_203_238 ORDER BY "year" DESC LIMIT 1 | squall |
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 Team_Name, ACC_Percent FROM basketball_match | nvbench |
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 wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZ... | css |
CREATE TABLE table_5592 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date was their record 46-39?
| SELECT "Date" FROM table_5592 WHERE "Record" = '46-39' | wikisql |
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 SOC_SRT_DIRE_NM, AMOUNT, MED_CLINIC_ID FROM t_kc22 WHERE (MED_CLINIC_ID = '98852331777' OR MED_CLINIC_ID = '39740471362') AND SOC_SRT_DIRE_NM IN ((SELECT SOC_SRT_DIRE_NM FROM t_kc22 WHERE MED_CLINIC_ID = '98852331777') INTERSECT (SELECT SOC_SRT_DIRE_NM FROM t_kc22 WHERE MED_CLINIC_ID = '39740471362')) | css |
CREATE TABLE table_14903627_1 (
year VARCHAR,
mens_doubles VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- HOW MANY YEARS DID MENS DOUBLES PLAYER HEIKI SORGE MEELIS MAISTE PLAY?
| SELECT COUNT(year) FROM table_14903627_1 WHERE mens_doubles = "Heiki Sorge Meelis Maiste" | sql_create_context |
CREATE TABLE person_info (
RYBH text,
XBDM number,
XBMC text,
XM text,
CSRQ time,
CSD text,
MZDM text,
MZMC text,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
XLDM text,
XLMC text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE mzjzjlb (
YLJGDM text,
JZLSH ... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN 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 = jybgb.JZLSH_MZJZJLB ... | css |
CREATE TABLE table_16318 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the team of the player from St. Francis Xavier College?
| SELECT "CFL Team" FROM table_16318 WHERE "College" = 'St. Francis Xavier' | wikisql |
CREATE TABLE table_2855 (
"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 wa... | SELECT "Score" FROM table_2855 WHERE "Record" = '37-27' | wikisql |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_ID number
)
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,
... | SELECT SUM(t_kc24.OVE_PAY) FROM t_kc21 JOIN t_kc24 JOIN t_kc21_t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc24.MED_CLINIC_ID AND t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID WHERE t_kc21.PERSON_NM = '朱秀兰' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2004-04-24' AND '2021-01-07' | css |
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 ReviewTaskResults (
Id number,
Review... | SELECT Id AS "user_link", (SELECT COUNT(TotalRep) FROM (SELECT SUM(CASE Votes.VoteTypeId WHEN 1 THEN 15 WHEN 2 THEN 10 WHEN 9 THEN BountyAmount END) AS TotalRep, Votes.CreationDate AS CreationDate FROM Posts INNER JOIN Votes ON Votes.PostId = Posts.Id WHERE Posts.OwnerUserId = U.Id AND Posts.CommunityOwnedDate IS NULL ... | sede |
CREATE TABLE table_29399 (
"Model Number" text,
"Frequency" text,
"L2 Cache" text,
"HT" text,
"Mult. 1" text,
"V Core" text,
"TDP" text,
"Socket" text,
"Release Date" text,
"Part Number(s)" text
)
-- Using valid SQLite, answer the following questions for the tables provided abo... | SELECT COUNT("V Core") FROM table_29399 WHERE "Model Number" = 'Mobile Athlon 64 3000+' | wikisql |
CREATE TABLE table_75070 (
"Rank" real,
"Country/Territory" text,
"Nuestra Belleza Latina" real,
"1st runner-up" real,
"2nd runner-up" real,
"3rd runner-up" real,
"4th runner-up" real,
"5th runner-up" real,
"6th runner-up" real,
"7th runner-up" real,
"8th runner-up" real,
... | SELECT SUM("7th runner-up") FROM table_75070 WHERE "10th runner-up" > '0' AND "9th runner-up" > '0' AND "8th runner-up" > '1' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.insurance = "Private" AND demographic.dob_year < "1887" | mimicsql_data |
CREATE TABLE table_name_59 (
country VARCHAR,
city VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where is the City of Douala?
| SELECT country FROM table_name_59 WHERE city = "douala" | sql_create_context |
CREATE TABLE table_4612 (
"Rank" real,
"Heat (Lane)" text,
"Name" text,
"Nationality" text,
"Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which heat and lane was in rank of 22?
| SELECT "Heat (Lane)" FROM table_4612 WHERE "Rank" = '22' | wikisql |
CREATE TABLE table_5482 (
"# 100" real,
"Season" text,
"Playing For" text,
"Against" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which sum of # 100 has a Season of 1990, and an Against of warwickshire?
| SELECT SUM("# 100") FROM table_5482 WHERE "Season" = '1990' AND "Against" = 'warwickshire' | wikisql |
CREATE TABLE table_49190 (
"Event" text,
"Time" text,
"Name" text,
"Nation" text,
"Games" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date was the record set with a time of 1:07.18?
| SELECT "Date" FROM table_49190 WHERE "Time" = '1:07.18' | wikisql |
CREATE TABLE table_17335602_1 (
date VARCHAR,
tournament VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the mcdonald's lpga championship?
| SELECT date FROM table_17335602_1 WHERE tournament = "McDonald's LPGA Championship" | sql_create_context |
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Descr... | SELECT COUNT(DISTINCT P.Id) AS num_questions, t_dbname.TagName FROM Posts AS P INNER JOIN PostTags AS pt ON pt.PostId = P.Id INNER JOIN Tags AS t_lang ON t_lang.Id = pt.TagId INNER JOIN PostTags AS pt_db ON pt_db.PostId = P.Id INNER JOIN Tags AS t_dbname ON t_dbname.Id = pt_db.TagId WHERE t_lang.TagName IN ('c++', 'jav... | sede |
CREATE TABLE table_9522 (
"Name" text,
"Nationality" text,
"Position [F ]" text,
"Date from [G ]" text,
"Date to [H ]" text,
"Appearances" real,
"Goals" real,
"Club source [I ]" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Appe... | SELECT "Appearances" FROM table_9522 WHERE "Position [F ]" = 'defender' AND "Date to [H ]" = '1938' | wikisql |
CREATE TABLE table_name_51 (
meg_whitman__r_ VARCHAR,
date_s__administered VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What percent of the vote went to Meg Whitman in the poll taken on October 21, 2010.
| SELECT meg_whitman__r_ FROM table_name_51 WHERE date_s__administered = "october 21, 2010" | sql_create_context |
CREATE TABLE table_203_568 (
id number,
"town/village" text,
"population" number,
"postal code" text,
"municipality" text,
"island" text,
"location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many towns or villages have a population ... | SELECT COUNT("town/village") FROM table_203_568 WHERE "population" >= 5 AND "population" < 10 | squall |
CREATE TABLE table_23399481_3 (
original_air_date VARCHAR,
season__number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the original air date for episode 4?
| SELECT original_air_date FROM table_23399481_3 WHERE season__number = 4 | sql_create_context |
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 t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '张晴霞' AND t_kc21.MED_SER_ORG_NO = '1657281' AND NOT t_kc21.IN_DIAG_DIS_NM LIKE '%煤工%' | css |
CREATE TABLE table_11041 (
"Drobo (1st)" text,
"Drobo (2nd)" text,
"Drobo S" text,
"Drobo S (2nd)" text,
"Drobo FS" text,
"Drobo Mini" text,
"Drobo 5D" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Drobo (2nd) has a Drobo S (2nd) of 5... | SELECT "Drobo (2nd)" FROM table_11041 WHERE "Drobo S (2nd)" = '5' | wikisql |
CREATE TABLE table_name_52 (
hong_kong INTEGER,
brisbane VARCHAR,
kuala_lumpur VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest Hong Kong value with a 0 Brisbane value and a greater than 0 Kuala Lumpur value?
| SELECT MIN(hong_kong) FROM table_name_52 WHERE brisbane = 0 AND kuala_lumpur > 0 | sql_create_context |
CREATE TABLE table_11658094_3 (
nickname VARCHAR,
enrollment VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the nickname of the school with an enrollment of 2386?
| SELECT nickname FROM table_11658094_3 WHERE enrollment = 2386 | 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 medication (
medi... | SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-141335')) AND DATETIME(medication.drugstarttime) >= DATETIME(CURRENT_T... | eicu |
CREATE TABLE ship (
ship_id number,
name text,
type text,
built_year number,
class text,
flag text
)
CREATE TABLE captain (
captain_id number,
name text,
ship_id number,
age text,
class text,
rank text
)
-- Using valid SQLite, answer the following questions for the tab... | SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id ORDER BY t2.age LIMIT 1 | spider |
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId nu... | SELECT * FROM (SELECT p.*, ViewCount / DATEDIFF(dd, CreationDate, GETUTCDATE()) AS ViewRate FROM Tags AS t JOIN PostTags AS pt ON t.Id = pt.TagId JOIN Posts AS p ON pt.PostId = p.Id WHERE t.TagName = 'microsoftgraph') AS tmp ORDER BY ViewRate DESC | sede |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code tex... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', medication.drugstarttime)) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-16... | eicu |
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_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '0855489' AND t_kc24.t_kc21_MED_ORG_DEPT_NM = '骨科') AND t_kc24.CLINIC_SLT_DATE BETWEEN '2004-08-29' AND '2020-01-27' | css |
CREATE TABLE table_203_374 (
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.
-- who has the most bronze medals ?
| SELECT "nation" FROM table_203_374 ORDER BY "bronze" DESC LIMIT 1 | squall |
CREATE TABLE table_275023_1 (
province VARCHAR,
formed_from VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What provinces were formed from New Munster?
| SELECT province FROM table_275023_1 WHERE formed_from = "New Munster" | sql_create_context |
CREATE TABLE table_25816476_2 (
team_guest_captain VARCHAR,
episode VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the team guest captain for episode 2?
| SELECT team_guest_captain FROM table_25816476_2 WHERE episode = 2 | sql_create_context |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate n... | SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-50099')) AND medication.drugname = 'furosemide 80 mg po tabs' AND DATE... | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Medicaid" AND procedures.long_title = "Combined right and left heart angiocardiography" | mimicsql_data |
CREATE TABLE Customers (
customer_id INTEGER,
customer_first_name VARCHAR(20),
customer_last_name VARCHAR(20),
customer_address VARCHAR(255),
customer_phone VARCHAR(255),
customer_email VARCHAR(255),
other_customer_details VARCHAR(255)
)
CREATE TABLE Accounts (
account_id INTEGER,
c... | SELECT account_id, COUNT(*) FROM Financial_Transactions GROUP BY account_id | nvbench |
CREATE TABLE finrev_fed_17 (
state_code number,
idcensus number,
school_district text,
nces_id text,
yr_data number,
t_fed_rev number,
c14 number,
c25 number
)
CREATE TABLE finrev_fed_key_17 (
state_code number,
state text,
#_records text
)
CREATE TABLE ndecoreexcel_math_gr... | SELECT state, MAX(year) FROM ndecoreexcel_math_grade8 GROUP BY state | studentmathscore |
CREATE TABLE table_79632 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text,
"Arena" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Record of the game with an Attendance... | SELECT "Record" FROM table_79632 WHERE "Attendance" > '16,124' AND "Score" = '6–3' | wikisql |
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 t_kc24.t_kc21_IN_DIAG_DIS_CD, t_kc24.t_kc21_IN_DIAG_DIS_NM FROM t_kc24 WHERE t_kc24.t_kc21_PERSON_NM = '窦秀隽' AND t_kc24.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 5504.26) | css |
CREATE TABLE table_30216 (
"District" text,
"Status" text,
"Date abolished" text,
"Former county" text,
"Successor" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the former counties of the Great Grimsby district?
| SELECT "Former county" FROM table_30216 WHERE "District" = 'Great Grimsby' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.short_title = "Open reduc-int fix femur" | mimicsql_data |
CREATE TABLE table_78928 (
"Elector" text,
"Place of birth" text,
"Cardinalatial title" text,
"Elevated" text,
"Elevator" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Elector was Elevated on December 18, 1182?
| SELECT "Elector" FROM table_78928 WHERE "Elevated" = 'december 18, 1182' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.