answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT demographic.admission_type, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "91588" | what is admission type and diagnoses short title of subject id 91588? | 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,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear 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 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
) |
SELECT MIN(no_in_series) FROM table_22347090_4 WHERE us_viewers__million_ = "1.98" | Which series number had 1.98 million viewers? | CREATE TABLE table_22347090_4 (no_in_series INTEGER, us_viewers__million_ VARCHAR) |
SELECT COUNT(rating) / SHARE(18 AS –49) FROM table_17525955_2 WHERE us_air_date = "Saturday, May 9, 2009" | How many rating/share values does the episode aired on Saturday, May 9, 2009? | CREATE TABLE table_17525955_2 (rating VARCHAR, us_air_date VARCHAR) |
SELECT laps FROM table_name_34 WHERE time_retired = "+0.4865" | How many laps have a +0.4865 time/retired? | CREATE TABLE table_name_34 (
laps VARCHAR,
time_retired VARCHAR
) |
SELECT us_viewers__million_ FROM table_22347090_5 WHERE production_code = "3X6704" | Name the viewers for production code for 3x6704 | CREATE TABLE table_22347090_5 (us_viewers__million_ VARCHAR, production_code VARCHAR) |
SELECT subsidiaries FROM table_1756264_2 WHERE company_name = "POSTERMOBILE LIMITED" | How many subsidiaries of Postermobile Limited? | CREATE TABLE table_1756264_2 (subsidiaries VARCHAR, company_name VARCHAR) |
SELECT MAX(vote__percentage) FROM table_name_53 WHERE election = "1946" | Name the most vote % with election of 1946 | CREATE TABLE table_name_53 (
vote__percentage INTEGER,
election VARCHAR
) |
SELECT us_viewers__million_ FROM table_22347090_5 WHERE production_code = "3X6706" | Name the viewers for production code being 3x6706 | CREATE TABLE table_22347090_5 (us_viewers__million_ VARCHAR, production_code VARCHAR) |
SELECT description_of_activities FROM table_1756264_2 WHERE company_name = "CLEAR CHANNEL ENTERTAINMENT FACILITATION LIMITED" | What activities does Clear Channel Entertainment Facilitation Limited engage in? | CREATE TABLE table_1756264_2 (description_of_activities VARCHAR, company_name VARCHAR) |
SELECT Trade_Name, id FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id ORDER BY Trade_Name DESC | what is the id and trade name of the medicines can interact with at least 3 enzymes?, and I want to show by the x axis from high to low. | CREATE TABLE medicine_enzyme_interaction (
enzyme_id int,
medicine_id int,
interaction_type text
)
CREATE TABLE medicine (
id int,
name text,
Trade_Name text,
FDA_approved text
)
CREATE TABLE enzyme (
id int,
name text,
Location text,
Product text,
Chromosome text,
OMIM int,
Porphyria text
) |
SELECT title FROM table_22347090_5 WHERE us_viewers__million_ = "1.54" | Name the title that got 1.54 viewers | CREATE TABLE table_22347090_5 (title VARCHAR, us_viewers__million_ VARCHAR) |
SELECT subsidiaries FROM table_1756264_2 WHERE company_name = "F M MEDIA LIMITED" | How many subsidiaries of company F M Media Limited? | CREATE TABLE table_1756264_2 (subsidiaries VARCHAR, company_name VARCHAR) |
SELECT Location, COUNT(Location) FROM party GROUP BY Location | Create a bar chart showing how many location across location | CREATE TABLE host (
Host_ID int,
Name text,
Nationality text,
Age text
)
CREATE TABLE party_host (
Party_ID int,
Host_ID int,
Is_Main_in_Charge bool
)
CREATE TABLE party (
Party_ID int,
Party_Theme text,
Location text,
First_year text,
Last_year text,
Number_of_hosts int
) |
SELECT COUNT(no_in_season) FROM table_22347090_5 WHERE no_in_series = 26 | Name the number of number in season for 26 | CREATE TABLE table_22347090_5 (no_in_season VARCHAR, no_in_series VARCHAR) |
SELECT MIN(subsidiaries) FROM table_1756264_2 WHERE company_name = "POSTERMOBILE ADVERTISING LIMITED" | How many subsidiaries are there of Postermobile Advertising Limited? | CREATE TABLE table_1756264_2 (subsidiaries INTEGER, company_name VARCHAR) |
SELECT "Opponent" FROM table_75609 WHERE "Loss" = 'sanderson (9-8)' | Name the opponent with loss of sanderson (9-8) | CREATE TABLE table_75609 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Save" text
) |
SELECT written_by FROM table_22347090_6 WHERE production_code = "3X7557" | Who wrote the episode that has a production code 3x7557? | CREATE TABLE table_22347090_6 (written_by VARCHAR, production_code VARCHAR) |
SELECT MAX(holding_companies) FROM table_1756264_2 | What is the largest number of holding companies? | CREATE TABLE table_1756264_2 (holding_companies INTEGER) |
SELECT away_team AS score FROM table_name_49 WHERE home_team = "collingwood" | When the Home team of collingwood played, what was the opposing Away team score? | CREATE TABLE table_name_49 (
away_team VARCHAR,
home_team VARCHAR
) |
SELECT COUNT(directed_by) FROM table_22347090_6 WHERE us_viewers__million_ = "1.59" | How many directors are there for the episode that had 1.59 million U.S. viewers? | CREATE TABLE table_22347090_6 (directed_by VARCHAR, us_viewers__million_ VARCHAR) |
SELECT COUNT(company_name) FROM table_1756264_2 WHERE parent__holding__company = "POSTERMOBILE LIMITED" | How many companies have Postermobile Limited as a parent company? | CREATE TABLE table_1756264_2 (company_name VARCHAR, parent__holding__company VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Government" AND lab.label = "pO2" | how many patients whose insurance is government and lab test name is po2? | 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
)
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 text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) |
SELECT production_code FROM table_22347090_6 WHERE us_viewers__million_ = "1.32" | What is the production code for the episode that had 1.32 million U.S. viewers? | CREATE TABLE table_22347090_6 (production_code VARCHAR, us_viewers__million_ VARCHAR) |
SELECT COUNT(league) AS Cup FROM table_17598822_11 WHERE player = "Mark Roberts" | Name the total number of league cup for mark roberts | CREATE TABLE table_17598822_11 (league VARCHAR, player VARCHAR) |
SELECT player FROM table_name_10 WHERE to_par = "+1" AND score = 75 - 70 - 71 - 73 = 289 | What Player has a To par of +1 and the Score 75-70-71-73=289? | CREATE TABLE table_name_10 (
player VARCHAR,
to_par VARCHAR,
score VARCHAR
) |
SELECT MIN(no_in_series) FROM table_22347090_6 WHERE production_code = "3X7554" | What episode number in the series had a production code of 3x7554? | CREATE TABLE table_22347090_6 (no_in_series INTEGER, production_code VARCHAR) |
SELECT COUNT(league) FROM table_17598822_11 WHERE total = 5 | Name the total number of league for 5 | CREATE TABLE table_17598822_11 (league VARCHAR, total VARCHAR) |
SELECT COUNT(*) FROM treatment WHERE treatment.treatmentname = 'treatment of hyperkalemia - insulin / glucose' AND STRFTIME('%y', treatment.treatmenttime) >= '2100' | how many treatment of hyperkalemia - insulin / glucose procedures have occurred since 2100? | 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,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
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 lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
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 (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
) |
SELECT title FROM table_22347090_6 WHERE no_in_series = 41 | What is the name of episode number 41 in the series? | CREATE TABLE table_22347090_6 (title VARCHAR, no_in_series VARCHAR) |
SELECT MAX(league) FROM table_17598822_11 WHERE scottish_cup = 0 | Name the maximum leagure for 0 scottish cup | CREATE TABLE table_17598822_11 (league INTEGER, scottish_cup VARCHAR) |
SELECT EMP_FNAME, COUNT(EMP_FNAME) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM GROUP BY CRS_CODE, EMP_FNAME ORDER BY EMP_FNAME | Show the number of courses each instructor taught in a stacked bar chart The x-axis is the instructor's first name and group by course code, and show by the bars from low to high please. | CREATE TABLE STUDENT (
STU_NUM int,
STU_LNAME varchar(15),
STU_FNAME varchar(15),
STU_INIT varchar(1),
STU_DOB datetime,
STU_HRS int,
STU_CLASS varchar(2),
STU_GPA float(8),
STU_TRANSFER numeric,
DEPT_CODE varchar(18),
STU_PHONE varchar(4),
PROF_NUM int
)
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8),
PROF_NUM int
)
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION varchar(4),
PROF_HIGH_DEGREE varchar(5)
)
CREATE TABLE COURSE (
CRS_CODE varchar(10),
DEPT_CODE varchar(10),
CRS_DESCRIPTION varchar(35),
CRS_CREDIT float(8)
)
CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varchar(12),
EMP_INITIAL varchar(1),
EMP_JOBCODE varchar(5),
EMP_HIREDATE datetime,
EMP_DOB datetime
)
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
DEPT_EXTENSION varchar(4)
) |
SELECT MIN(silver) FROM table_22355_20 | Who has the minimum number of silver? | CREATE TABLE table_22355_20 (silver INTEGER) |
SELECT MAX(challenge_cup) FROM table_17598822_11 WHERE player = "Damon Gray" | Name the most challenge cup for damon gray | CREATE TABLE table_17598822_11 (challenge_cup INTEGER, player VARCHAR) |
SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '032-4849' AND patient.hospitaladmitsource = 'emergency department' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime LIMIT 1 | had patient 032-4849 when they visited the hospital first time been admitted to an er? | 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,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
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,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
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 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 number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
) |
SELECT athlete FROM table_22355_20 WHERE rank = 8 AND olympics = "1948–1952" | Who is the athlete who's rank is 8 and competed in the olympics during 1948–1952? | CREATE TABLE table_22355_20 (athlete VARCHAR, rank VARCHAR, olympics VARCHAR) |
SELECT league FROM table_17598822_11 WHERE player = "Paul Paton" | Name the league for paul paton | CREATE TABLE table_17598822_11 (league VARCHAR, player VARCHAR) |
SELECT All_Neutral, All_Games_Percent FROM basketball_match ORDER BY All_Neutral DESC | Give me the comparison about All_Games_Percent over the All_Neutral by a bar chart, I want to order by the x axis in desc. | 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 (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
) |
SELECT nation FROM table_22355_20 WHERE olympics = "1924–1928" AND bronze = 1 | What is the nation who won 1 bronze in the Olympics during 1924–1928? | CREATE TABLE table_22355_20 (nation VARCHAR, olympics VARCHAR, bronze VARCHAR) |
SELECT original_air_date FROM table_17623902_1 WHERE written_by = "Debbie Sarjeant" | What was the original air date of this episode that was written by Debbie Sarjeant? | CREATE TABLE table_17623902_1 (original_air_date VARCHAR, written_by VARCHAR) |
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 62977 AND STRFTIME('%y', admissions.admittime) = '2101' ORDER BY admissions.admittime LIMIT 1 | when was patient 62977 in 2101 admitted for the first time to the hospital? | CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
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 outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
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 d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
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 labevents (
row_id number,
subject_id number,
hadm_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 text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
) |
SELECT athlete FROM table_22355_20 WHERE nation = "Ethiopia (ETH)" AND rank > 7.0 | Who is the athlete from the nation of Ethiopia (eth) who had a rank bigger than 7.0? | CREATE TABLE table_22355_20 (athlete VARCHAR, nation VARCHAR, rank VARCHAR) |
SELECT COUNT(production_code) FROM table_17623902_1 WHERE written_by = "Julie Martin" | How many episodes did Julie Martin wrote for the show If every episode has its own production code? | CREATE TABLE table_17623902_1 (production_code VARCHAR, written_by VARCHAR) |
SELECT MIN("Goals") FROM table_54660 WHERE "Name" = 'kenny miller' AND "Average" < '0.261' | What is the low goal for kenny miller with an average smaller than 0.261? | CREATE TABLE table_54660 (
"Name" text,
"Scotland career" text,
"Caps" real,
"Goals" real,
"Average" real
) |
SELECT MAX(gold) FROM table_22355_26 | What is the maximum number of golds? | CREATE TABLE table_22355_26 (gold INTEGER) |
SELECT COUNT(series) FROM table_17621978_11 WHERE date = "April 26" | Name the total number of series for april 26 | CREATE TABLE table_17621978_11 (series VARCHAR, date VARCHAR) |
SELECT * FROM table_dev_35 WHERE platelets >= 100000 | platelets >= 100000 / mm3 | CREATE TABLE table_dev_35 (
"id" int,
"white_blood_cell_count_wbc" int,
"platelets" int,
"neutrophil_count" int,
"serum_creatinine" float,
"albumin" float,
"NOUSE" float
) |
SELECT MIN(silver) FROM table_22355_29 | What is the smallest amount of silver? | CREATE TABLE table_22355_29 (silver INTEGER) |
SELECT COUNT(high_rebounds) FROM table_17621978_11 WHERE date = "April 21" | Name the number of high rebounds for april 21 | CREATE TABLE table_17621978_11 (high_rebounds VARCHAR, date VARCHAR) |
SELECT People_ID, Height FROM people GROUP BY Sex | Return a scatter chart about the correlation between People_ID and Height , and group by attribute Sex. | CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
)
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
) |
SELECT nation FROM table_22355_44 WHERE athlete = "Abdon Pamich Category:Articles with hCards" | Name the nation for abdon pamich category:articles with hcards | CREATE TABLE table_22355_44 (nation VARCHAR, athlete VARCHAR) |
SELECT COUNT(location_attendance) FROM table_17621978_11 WHERE date = "April 24" | Name the number of location attendance for april 24 | CREATE TABLE table_17621978_11 (location_attendance VARCHAR, date VARCHAR) |
SELECT civilian_deaths FROM table_name_19 WHERE total_deaths__not_including_foreigners_ = "178" | How many civilians died in the conflict that left 178, excluding foreigners, dead? | CREATE TABLE table_name_19 (
civilian_deaths VARCHAR,
total_deaths__not_including_foreigners_ VARCHAR
) |
SELECT MAX(silver) FROM table_22355_44 WHERE athlete = "Ronald Weigel Category:Articles with hCards" | Name the silver for ronald weigel category:articles with hcards | CREATE TABLE table_22355_44 (silver INTEGER, athlete VARCHAR) |
SELECT p FROM table_17634290_7 WHERE type = "Free agent 1" | What is listed in p when the type is listed as free agent 1? | CREATE TABLE table_17634290_7 (p VARCHAR, type VARCHAR) |
SELECT away_team FROM table_name_76 WHERE tie_no = "18" | In Tie #18, who was the away team? | CREATE TABLE table_name_76 (
away_team VARCHAR,
tie_no VARCHAR
) |
SELECT MIN(rank) FROM table_22355_5 | What's the minimal rank of a athlete shown in the chart? | CREATE TABLE table_22355_5 (rank INTEGER) |
SELECT ends FROM table_17634290_7 WHERE moving_from = "Cary Clarets" | What is the end when moving from is listed as cary clarets? | CREATE TABLE table_17634290_7 (ends VARCHAR, moving_from VARCHAR) |
SELECT Type, COUNT(Type) FROM ship GROUP BY Nationality, Type ORDER BY Type | Draw a bar chart showing the total number of every ship type by categorizing by nationality, could you sort bars in asc order? | CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
)
CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
) |
SELECT MIN(gold) FROM table_22355_35 | which is the minimun amount of gold medals? | CREATE TABLE table_22355_35 (gold INTEGER) |
SELECT country FROM table_17634290_7 WHERE moving_from = "Bristol City" | What is the name of the country where moving from is listed as bristol city? | CREATE TABLE table_17634290_7 (country VARCHAR, moving_from VARCHAR) |
SELECT "result" + "result" FROM table_204_375 WHERE "date" = '2013-05-21' | what was the total number of points scored in the game held on 2013-05-21 ? | CREATE TABLE table_204_375 (
id number,
"#" number,
"season" number,
"competition" text,
"date" text,
"round" text,
"opponent" text,
"h / a" text,
"result" text,
"scorer (s)" text
) |
SELECT MIN(silver) FROM table_22355_35 | which is the minimun amount of silver medals? | CREATE TABLE table_22355_35 (silver INTEGER) |
SELECT COUNT(duration) FROM table_17641206_6 WHERE viewership = "5.46 million" | Name the number of duration for viewership of 5.46 million | CREATE TABLE table_17641206_6 (duration VARCHAR, viewership VARCHAR) |
SELECT season FROM table_name_34 WHERE score = "1-0" | Can you tell me the Season that has the Score of 1-0? | CREATE TABLE table_name_34 (
season VARCHAR,
score VARCHAR
) |
SELECT MIN(total_min_2_medals_) FROM table_22355_65 | What is the lowest overall number for total(min. 2 medals)? | CREATE TABLE table_22355_65 (total_min_2_medals_ INTEGER) |
SELECT COUNT(episode) FROM table_17641206_6 WHERE written_by = "David Cantor" | Name the total number of episodes written by david cantor | CREATE TABLE table_17641206_6 (episode VARCHAR, written_by VARCHAR) |
SELECT payment_date, COUNT(payment_date) FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa' ORDER BY COUNT(payment_date) DESC | What are the payment dates for any payments that have an amount greater than 10 or were handled by a staff member with the first name Elsa, and count them by a bar chart, I want to display by the Y in descending. | CREATE TABLE payment (
payment_id SMALLINT UNSIGNED,
customer_id SMALLINT UNSIGNED,
staff_id TINYINT UNSIGNED,
rental_id INT,
amount DECIMAL(5,2),
payment_date DATETIME,
last_update TIMESTAMP
)
CREATE TABLE film_actor (
actor_id SMALLINT UNSIGNED,
film_id SMALLINT UNSIGNED,
last_update TIMESTAMP
)
CREATE TABLE staff (
staff_id TINYINT UNSIGNED,
first_name VARCHAR(45),
last_name VARCHAR(45),
address_id SMALLINT UNSIGNED,
picture BLOB,
email VARCHAR(50),
store_id TINYINT UNSIGNED,
active BOOLEAN,
username VARCHAR(16),
password VARCHAR(40),
last_update TIMESTAMP
)
CREATE TABLE category (
category_id TINYINT UNSIGNED,
name VARCHAR(25),
last_update TIMESTAMP
)
CREATE TABLE address (
address_id SMALLINT UNSIGNED,
address VARCHAR(50),
address2 VARCHAR(50),
district VARCHAR(20),
city_id SMALLINT UNSIGNED,
postal_code VARCHAR(10),
phone VARCHAR(20),
last_update TIMESTAMP
)
CREATE TABLE language (
language_id TINYINT UNSIGNED,
name CHAR(20),
last_update TIMESTAMP
)
CREATE TABLE film_category (
film_id SMALLINT UNSIGNED,
category_id TINYINT UNSIGNED,
last_update TIMESTAMP
)
CREATE TABLE customer (
customer_id SMALLINT UNSIGNED,
store_id TINYINT UNSIGNED,
first_name VARCHAR(45),
last_name VARCHAR(45),
email VARCHAR(50),
address_id SMALLINT UNSIGNED,
active BOOLEAN,
create_date DATETIME,
last_update TIMESTAMP
)
CREATE TABLE film_text (
film_id SMALLINT,
title VARCHAR(255),
description TEXT
)
CREATE TABLE city (
city_id SMALLINT UNSIGNED,
city VARCHAR(50),
country_id SMALLINT UNSIGNED,
last_update TIMESTAMP
)
CREATE TABLE actor (
actor_id SMALLINT UNSIGNED,
first_name VARCHAR(45),
last_name VARCHAR(45),
last_update TIMESTAMP
)
CREATE TABLE inventory (
inventory_id MEDIUMINT UNSIGNED,
film_id SMALLINT UNSIGNED,
store_id TINYINT UNSIGNED,
last_update TIMESTAMP
)
CREATE TABLE store (
store_id TINYINT UNSIGNED,
manager_staff_id TINYINT UNSIGNED,
address_id SMALLINT UNSIGNED,
last_update TIMESTAMP
)
CREATE TABLE country (
country_id SMALLINT UNSIGNED,
country VARCHAR(50),
last_update TIMESTAMP
)
CREATE TABLE film (
film_id SMALLINT UNSIGNED,
title VARCHAR(255),
description TEXT,
release_year YEAR,
language_id TINYINT UNSIGNED,
original_language_id TINYINT UNSIGNED,
rental_duration TINYINT UNSIGNED,
rental_rate DECIMAL(4,2),
length SMALLINT UNSIGNED,
replacement_cost DECIMAL(5,2),
rating any,
special_features any,
last_update TIMESTAMP
)
CREATE TABLE rental (
rental_id INT,
rental_date DATETIME,
inventory_id MEDIUMINT UNSIGNED,
customer_id SMALLINT UNSIGNED,
return_date DATETIME,
staff_id TINYINT UNSIGNED,
last_update TIMESTAMP
) |
SELECT MAX(rank) FROM table_22355_62 WHERE gold = 4 | What is the maximum rank of the nation that won 4 gold medals? | CREATE TABLE table_22355_62 (rank INTEGER, gold VARCHAR) |
SELECT COUNT(original_title) FROM table_17641206_6 WHERE written_by = "John Sullivan and Keith Lindsay" | Name the total number of original titles written by john sullivan and keith lindsay | CREATE TABLE table_17641206_6 (original_title VARCHAR, written_by VARCHAR) |
SELECT "GCM (kg) Technical Capacity" FROM table_245 WHERE "Transmission Make/Type/Speed" = 'Eaton FS 5306-A Manual Synchromesh 6 Speed' | When the transmission make/type/speed is eaton fs 5306-a manual synchromesh 6 speed, what is the value of the gcm (kg) technical capacity? | CREATE TABLE table_245 (
"Model" text,
"Engine make/Capacity" text,
"Power kW@rpm" text,
"Torque Nm@rpm" text,
"Transmission Make/Type/Speed" text,
"GVM (kg) Technical Capacity" text,
"GCM (kg) Technical Capacity" text
) |
SELECT MAX(rank) FROM table_22355_68 | Name the most rank | CREATE TABLE table_22355_68 (rank INTEGER) |
SELECT original_title FROM table_17641206_6 WHERE viewership = "6.05 million" | Name the original title for 6.05 million viewership | CREATE TABLE table_17641206_6 (original_title VARCHAR, viewership VARCHAR) |
SELECT COUNT(points) FROM table_name_62 WHERE year > 1988 | with year greater than 1988 what is the total number of points? | CREATE TABLE table_name_62 (
points VARCHAR,
year INTEGER
) |
SELECT MIN(rank) FROM table_22355_68 WHERE gold = 2 | Name the most rank for 2 gold | CREATE TABLE table_22355_68 (rank INTEGER, gold VARCHAR) |
SELECT third_place FROM table_17632217_2 WHERE total_wins = 4 | Who took third-place when there were 4 total wins? | CREATE TABLE table_17632217_2 (third_place VARCHAR, total_wins VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND procedures.long_title = "Ventriculopuncture through previously implanted catheter" | What is the number of hispanic or latino-puerto rican patients who had ventriculo puncture through previously implanted catheter? | 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 text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
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 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,
label text,
fluid text
) |
SELECT MAX(total) FROM table_22360_3 | Name the most total | CREATE TABLE table_22360_3 (total INTEGER) |
SELECT COUNT(number_of_clubs) FROM table_17632217_2 WHERE runners_up = "Liaoning Fushun" | What is the total number of clubs when the runner-up was Liaoning Fushun? | CREATE TABLE table_17632217_2 (number_of_clubs VARCHAR, runners_up VARCHAR) |
SELECT "To par" FROM table_44634 WHERE "Place" = 't5' AND "Player" = 'steve jones' | What was the par for the t5 place player Steve Jones? | CREATE TABLE table_44634 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) |
SELECT MIN(silver) FROM table_22360_3 WHERE discipline = "Baseball" | Name the silver for baseball | CREATE TABLE table_22360_3 (silver INTEGER, discipline VARCHAR) |
SELECT fourth_placed FROM table_17632217_2 WHERE third_place = "Beijing Guoan" AND winners = "Dalian Wanda" AND total_wins = 4 | Who was placed fourth when third was Beijing Guoan and the winner was Dalian Wanda and wins total was 4? | CREATE TABLE table_17632217_2 (fourth_placed VARCHAR, total_wins VARCHAR, third_place VARCHAR, winners VARCHAR) |
SELECT interview FROM table_11690135_1 WHERE evening_gown = "9.78" | Who had an evening gown score of 9.78? | CREATE TABLE table_11690135_1 (
interview VARCHAR,
evening_gown VARCHAR
) |
SELECT discipline FROM table_22360_3 WHERE bronze = 0 | Name the discipline for bronze being 0 | CREATE TABLE table_22360_3 (discipline VARCHAR, bronze VARCHAR) |
SELECT third_place FROM table_17632217_2 WHERE runners_up = "Guangzhou Apollo" | Who was placed third when the ruuner up was Guangzhou Apollo? | CREATE TABLE table_17632217_2 (third_place VARCHAR, runners_up VARCHAR) |
SELECT COUNT(enrollment) FROM table_name_56 WHERE school = "shakamak" | How much Enrollment has a School of shakamak? | CREATE TABLE table_name_56 (
enrollment VARCHAR,
school VARCHAR
) |
SELECT MAX(tier_1_capital), _€_million FROM table_22368322_2 WHERE institution = "Irish Nationwide" | Name the most tier 1 capital for irish nationwide | CREATE TABLE table_22368322_2 (_€_million VARCHAR, tier_1_capital INTEGER, institution VARCHAR) |
SELECT third_place FROM table_17632217_2 WHERE season = 2001 | Who was placed third in 2001? | CREATE TABLE table_17632217_2 (third_place VARCHAR, season VARCHAR) |
SELECT executed_person FROM table_2861364_1 WHERE under_president = "Charles de Gaulle" AND crime = "Child murder after rape" | who was executed during president charles de gaulle's reign for thr crime of child murder after rape? | CREATE TABLE table_2861364_1 (
executed_person VARCHAR,
under_president VARCHAR,
crime VARCHAR
) |
SELECT tier_1_ratio FROM table_22368322_2 WHERE institution = "Irish Life and Permanent" | Name the tier 1 ratio for irish life and permanent | CREATE TABLE table_22368322_2 (tier_1_ratio VARCHAR, institution VARCHAR) |
SELECT census_ranking FROM table_176524_2 WHERE official_name = "Perth" | What is the census ranking for the Perth parish? | CREATE TABLE table_176524_2 (census_ranking VARCHAR, official_name VARCHAR) |
SELECT DISTINCT airline.airline_code FROM airline, airport_service, city, flight WHERE city.city_code = airport_service.city_code AND city.city_name = 'SALT LAKE CITY' AND flight.airline_code = airline.airline_code AND flight.from_airport = airport_service.airport_code | what airlines fly into SALT LAKE CITY | CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
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_miles int,
pressurized varchar
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
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
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE month (
month_number int,
month_name text
)
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,
time_elapsed int,
to_airport varchar
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
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_days text
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
round_trip_required varchar
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
) |
SELECT COUNT(tier_1_capital), _€_million FROM table_22368322_2 WHERE institution = "Allied Irish Banks" | Name the total number of tier 1 capital for allied irish banks | CREATE TABLE table_22368322_2 (_€_million VARCHAR, tier_1_capital VARCHAR, institution VARCHAR) |
SELECT MIN(population) FROM table_176524_2 WHERE area_km_2 = "750.51" | What is the minimum population of the parish with a 750.51 km area? | CREATE TABLE table_176524_2 (population INTEGER, area_km_2 VARCHAR) |
SELECT name, open_year FROM manufacturer WHERE num_of_shops > 10 OR Num_of_Factories < 10 | Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops. | CREATE TABLE manufacturer (
name VARCHAR,
open_year VARCHAR,
num_of_shops VARCHAR,
Num_of_Factories VARCHAR
) |
SELECT date_of_report FROM table_22368322_2 WHERE tier_1_ratio = "3.9%" | Name the date of report for tier 1 ratio being 3.9% | CREATE TABLE table_22368322_2 (date_of_report VARCHAR, tier_1_ratio VARCHAR) |
SELECT won FROM table_17675675_2 WHERE tries_against = "89" | with the amount of tries at 89, how many win's were there? | CREATE TABLE table_17675675_2 (won VARCHAR, tries_against VARCHAR) |
SELECT "Elector" FROM table_64899 WHERE "Place of birth" = 'bavaria' | What Elector has the Place of Birth listed as Bavaria? | CREATE TABLE table_64899 (
"Elector" text,
"Place of birth" text,
"Cardinalatial title" text,
"Elevated" text,
"Elevator" text
) |
SELECT season FROM table_22383603_1 WHERE finish__incl_championship_ = "April 18" | What season ended on April 18? | CREATE TABLE table_22383603_1 (season VARCHAR, finish__incl_championship_ VARCHAR) |
SELECT tries_against FROM table_17675675_2 WHERE club = "Swansea Uplands RFC" | For club Swansea Uplands RFC, what is the amount of tries against? | CREATE TABLE table_17675675_2 (tries_against VARCHAR, club VARCHAR) |
SELECT SUM("Rank") FROM table_45195 WHERE "Director(s)" = 'm. night shyamalan' | Sum of m. night shyamalan ranks? | CREATE TABLE table_45195 (
"Rank" real,
"Title" text,
"Studio" text,
"Director(s)" text,
"Worldwide Gross" text
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.