answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT type FROM table_256286_8 WHERE description = "Department of Industry and Public Works Amendment" | What was the type of ballot measure with the description of Department of Industry and Public Works Amendment? | CREATE TABLE table_256286_8 (type VARCHAR, description VARCHAR) |
SELECT COUNT(round) FROM table_name_95 WHERE player = "honester davidson" | How many rounds did Honester Davidson play? | CREATE TABLE table_name_95 (round VARCHAR, player VARCHAR) |
SELECT "Gender" FROM table_30574 WHERE "School website" = 'http://www.nicholasbreakspearschool.co.uk/' | What is the gender of the school which has the website http://www.nicholasbreakspearschool.co.uk/? | CREATE TABLE table_30574 (
"School" text,
"Gender" text,
"Age Range" text,
"Religious Affiliation" text,
"Location" text,
"School website" text
) |
SELECT COUNT(no_votes) FROM table_256286_8 WHERE description = "$1500 Tax Exemption Amendment" | How many data are there under NO vote with a description of $1500 tax exemption amendment? | CREATE TABLE table_256286_8 (no_votes VARCHAR, description VARCHAR) |
SELECT school_club_team FROM table_name_15 WHERE overall = 21 | What School or Club team has an overall score of 21? | CREATE TABLE table_name_15 (school_club_team VARCHAR, overall VARCHAR) |
SELECT COUNT("Rank") FROM table_44119 WHERE "Director" = 'kevin costner' | What is the rank of the film directed by Kevin Costner? | CREATE TABLE table_44119 (
"Rank" real,
"Title" text,
"Studio" text,
"Director" text,
"Gross" text
) |
SELECT _percentage_yes FROM table_256286_61 WHERE yes_votes = 218846 | What is the percentage of yes when there were 218846 yes votes | CREATE TABLE table_256286_61 (_percentage_yes VARCHAR, yes_votes VARCHAR) |
SELECT COUNT(overall) FROM table_name_86 WHERE round < 1 | What total number of Overalls has a round that was smaller than 1? | CREATE TABLE table_name_86 (overall VARCHAR, round INTEGER) |
SELECT AVG("Game") FROM table_46062 WHERE "October" = '19' | What is the average game number that was on october 19? | CREATE TABLE table_46062 (
"Game" real,
"October" real,
"Opponent" text,
"Score" text,
"Record" text
) |
SELECT COUNT(type) FROM table_256286_61 WHERE _percentage_yes = "68.91%" | How many type catagories are listed when the percentage of yes is 68.91%? | CREATE TABLE table_256286_61 (type VARCHAR, _percentage_yes VARCHAR) |
SELECT player FROM table_name_33 WHERE position = "kicker" | What player is a kicker? | CREATE TABLE table_name_33 (player VARCHAR, position VARCHAR) |
SELECT craft FROM table_name_15 WHERE location = "coniston water" | What is the Craft used at Coniston Water? | CREATE TABLE table_name_15 (
craft VARCHAR,
location VARCHAR
) |
SELECT type FROM table_256286_61 WHERE yes_votes = 546255 | What is the type when yes votes are 546255? | CREATE TABLE table_256286_61 (type VARCHAR, yes_votes VARCHAR) |
SELECT position FROM table_name_17 WHERE overall < 410 AND round < 5 AND school_club_team = "oklahoma state" | What position and school/club team of Oklahoma state has an overall less than 410 and a round smaller than 5? | CREATE TABLE table_name_17 (position VARCHAR, school_club_team VARCHAR, overall VARCHAR, round VARCHAR) |
SELECT COUNT(cfl_team) FROM table_26996293_3 WHERE college = "Mount Allison" | How many CFL teams drafted someone from mount allison college? | CREATE TABLE table_26996293_3 (
cfl_team VARCHAR,
college VARCHAR
) |
SELECT meas_num FROM table_256286_61 WHERE description = "Obscenity and sexual conduct bill" | What is the measure number for the bill described as obscenity and sexual conduct bill? | CREATE TABLE table_256286_61 (meas_num VARCHAR, description VARCHAR) |
SELECT player FROM table_name_43 WHERE position = "forward" AND school_country = "kentucky" | Which player plays forward and is from Kentucky? | CREATE TABLE table_name_43 (player VARCHAR, position VARCHAR, school_country VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dod_year <= "2122.0" AND prescriptions.formulary_drug_cd = "BETH5" | give me the number of patients whose year of death is less than or equal to 2122 and drug code is beth5? | 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
)
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
) |
SELECT COUNT(points) FROM table_25647137_2 WHERE player = "Art Renner" | How many points did art renner have? | CREATE TABLE table_25647137_2 (points VARCHAR, player VARCHAR) |
SELECT away_team FROM table_name_4 WHERE venue = "punt road oval" | What team was the away team for the venue punt road oval? | CREATE TABLE table_name_4 (away_team VARCHAR, venue VARCHAR) |
SELECT "Location" FROM table_65419 WHERE "Branding" = '1116 dxas zamboanga' | What's the location when the branding is 1116 DXAS Zamboanga? | CREATE TABLE table_65419 (
"Branding" text,
"Call-Sign" text,
"Frequency" text,
"Power (kw)" text,
"Location" text
) |
SELECT COUNT(touchdowns) FROM table_25647137_2 WHERE player = "Bill Culligan" | How many touchdowns did bill culligan have? | CREATE TABLE table_25647137_2 (touchdowns VARCHAR, player VARCHAR) |
SELECT MAX(rank) FROM table_name_3 WHERE opposition = "westmeath" | What is the highest ranked player who opposed Westmeath? | CREATE TABLE table_name_3 (rank INTEGER, opposition VARCHAR) |
SELECT AVG(points) FROM table_name_33 WHERE extra_points = 0 AND field_goals > 0 | Who had a points average with 0 extra points and 0 field goals? | CREATE TABLE table_name_33 (
points INTEGER,
extra_points VARCHAR,
field_goals VARCHAR
) |
SELECT MAX(touchdowns) FROM table_25647137_2 | What was the highest number of touchdowns by a player? | CREATE TABLE table_25647137_2 (touchdowns INTEGER) |
SELECT county FROM table_name_67 WHERE player = "tony o'sullivan" | What is Tony O'Sullivan's county? | CREATE TABLE table_name_67 (county VARCHAR, player VARCHAR) |
SELECT share_of_seats FROM table_name_79 WHERE european_election__uk_ = 2009 | Which Share of seats has a European election (UK) of 2009? | CREATE TABLE table_name_79 (
share_of_seats VARCHAR,
european_election__uk_ VARCHAR
) |
SELECT MIN(points) FROM table_25647137_2 WHERE player = "Robert Stenberg" | How many points did robert stenberg have? | CREATE TABLE table_25647137_2 (points INTEGER, player VARCHAR) |
SELECT network FROM table_name_71 WHERE language = "punjabi" | What Network has Punjabi as the Language? | CREATE TABLE table_name_71 (network VARCHAR, language VARCHAR) |
SELECT date FROM table_name_7 WHERE venue = "city stadium, georgetown" | Which date held the match at the City Stadium, Georgetown? | CREATE TABLE table_name_7 (
date VARCHAR,
venue VARCHAR
) |
SELECT location FROM table_25643046_1 WHERE origin_time = "14:07" | Where was the quake that began at 14:07? | CREATE TABLE table_25643046_1 (location VARCHAR, origin_time VARCHAR) |
SELECT genre FROM table_name_16 WHERE language = "hindi" AND network = "star gold" | What Genre has Hindi as the Language and Star Gold as the Network? | CREATE TABLE table_name_16 (genre VARCHAR, language VARCHAR, network VARCHAR) |
SELECT "Allied forces" FROM table_72197 WHERE "Target" = 'Woensdrecht' | Which Allied Force targetted Woensdrecht? | CREATE TABLE table_72197 (
"Target" text,
"Target Code (Allied)" text,
"Luftwaffe unit (wing)" text,
"Allied forces" text,
"Effect on Allied Squadrons (according to official figures)" text
) |
SELECT epicentre__lat, _s_ FROM table_25643046_1 WHERE origin_time = "17:09" | What was the epicenter latitude for the quake that started at 17:09? | CREATE TABLE table_25643046_1 (epicentre__lat VARCHAR, _s_ VARCHAR, origin_time VARCHAR) |
SELECT origin_of_programming FROM table_name_98 WHERE network = "ndtv india" | What is the Origin of Programming for the Network NDTV India? | CREATE TABLE table_name_98 (origin_of_programming VARCHAR, network VARCHAR) |
SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2 | Find the number of booking start date for the apartments that have more than two bedrooms for each weekday in a bar chart. | CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
CREATE TABLE Apartments (
apt_id INTEGER,
building_id INTEGER,
apt_type_code CHAR(15),
apt_number CHAR(10),
bathroom_count INTEGER,
bedroom_count INTEGER,
room_count CHAR(5)
)
CREATE TABLE Apartment_Bookings (
apt_booking_id INTEGER,
apt_id INTEGER,
guest_id INTEGER,
booking_status_code CHAR(15),
booking_start_date DATETIME,
booking_end_date DATETIME
)
CREATE TABLE Guests (
guest_id INTEGER,
gender_code CHAR(1),
guest_first_name VARCHAR(80),
guest_last_name VARCHAR(80),
date_of_birth DATETIME
)
CREATE TABLE View_Unit_Status (
apt_id INTEGER,
apt_booking_id INTEGER,
status_date DATETIME,
available_yn BIT
)
CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address VARCHAR(255),
building_manager VARCHAR(50),
building_phone VARCHAR(80)
) |
SELECT COUNT(series__number) FROM table_25649467_2 WHERE season__number = 12 | When 12 is the season number how many series numbers are there? | CREATE TABLE table_25649467_2 (series__number VARCHAR, season__number VARCHAR) |
SELECT origin_of_programming FROM table_name_43 WHERE network = "mtv india" | What is the Origin of Programming for the Network MTV India? | CREATE TABLE table_name_43 (origin_of_programming VARCHAR, network VARCHAR) |
SELECT team FROM table_name_24 WHERE laps = 10 AND driver = "alex yoong" | What team had 10 Labs and the Driver was Alex Yoong? | CREATE TABLE table_name_24 (
team VARCHAR,
laps VARCHAR,
driver VARCHAR
) |
SELECT mountains_classification FROM table_25655781_17 WHERE winner = "Borut Božič" | Who had the mountains classification when borut božič was the winner? | CREATE TABLE table_25655781_17 (mountains_classification VARCHAR, winner VARCHAR) |
SELECT language FROM table_name_28 WHERE network = "ptc punjabi" | What is the Language for Network PTC Punjabi? | CREATE TABLE table_name_28 (language VARCHAR, network VARCHAR) |
SELECT "Score" FROM table_35500 WHERE "Home Team" = 'san jose' AND "Venue" = 'spartan stadium' | What was the score at Spartan Stadium when San Jose was the Home team? | CREATE TABLE table_35500 (
"Date" text,
"Home Team" text,
"Score" text,
"Away Team" text,
"Venue" text
) |
SELECT team_classification FROM table_25655781_17 WHERE winner = "André Greipel" AND points_classification = "André Greipel" | What was the team classification where andré greipel was the winner and had the points classification? | CREATE TABLE table_25655781_17 (team_classification VARCHAR, winner VARCHAR, points_classification VARCHAR) |
SELECT genre FROM table_name_93 WHERE network = "zee tv" | What Genre has the Network Zee TV? | CREATE TABLE table_name_93 (genre VARCHAR, network VARCHAR) |
SELECT chartevents.charttime 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 = 21454)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [diastolic]' AND d_items.linksto = 'chartevents') AND chartevents.valuenum > 52.0 AND STRFTIME('%y-%m-%d', chartevents.charttime) = '2102-07-28' ORDER BY chartevents.charttime DESC LIMIT 1 | on 07/28/2102, when was the last time that the arterial bp [diastolic] of patient 21454 was greater than 52.0? | CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_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 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 microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE diagnoses_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 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 chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_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 d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
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 transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
) |
SELECT MAX(stage) FROM table_25655781_17 | How many stages are there? | CREATE TABLE table_25655781_17 (stage INTEGER) |
SELECT home_team FROM table_name_74 WHERE venue = "junction oval" | What team was the home team at the venue junction oval? | CREATE TABLE table_name_74 (home_team VARCHAR, venue VARCHAR) |
SELECT "Score" FROM table_48673 WHERE "Date" = 'march 8' | what is the score on march 8? | CREATE TABLE table_48673 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) |
SELECT COUNT(sprint_classification) FROM table_25655781_17 WHERE winner = "Marco Frapporti" | How many sprint classifications are there where marco frapporti is the winner? | CREATE TABLE table_25655781_17 (sprint_classification VARCHAR, winner VARCHAR) |
SELECT away_team FROM table_name_33 WHERE home_team = "south melbourne" | What away team played when the home team was south melbourne? | CREATE TABLE table_name_33 (away_team VARCHAR, home_team VARCHAR) |
SELECT SUM("Bronze") FROM table_64785 WHERE "Total" < '8' AND "Rank" = '9' AND "Silver" < '0' | What is the sum of the bronze medals when there were less than 8 total medals, 0 silver medals and a rank of 9? | CREATE TABLE table_64785 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) |
SELECT second_couple FROM table_25664518_3 WHERE itv1_weekly_ranking = 29 | Who was the second couple for the episode having an ITV1 ranking of 29? | CREATE TABLE table_25664518_3 (second_couple VARCHAR, itv1_weekly_ranking VARCHAR) |
SELECT home_team FROM table_name_36 WHERE away_team = "richmond" | What team was the home team when Richmond was the away team? | CREATE TABLE table_name_36 (home_team VARCHAR, away_team VARCHAR) |
SELECT T1.country FROM sampledata15 AS T1 JOIN resultsdata15 AS T2 ON T1.sample_pk = T2.sample_pk WHERE T2.concen = "0" GROUP BY T1.country | What are the country of product origins where pesticide residues were not detected? | CREATE TABLE sampledata15 (
sample_pk number,
state text,
year text,
month text,
day text,
site text,
commod text,
source_id text,
variety text,
origin text,
country text,
disttype text,
commtype text,
claim text,
quantity number,
growst text,
packst text,
distst text
)
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,
determin text
) |
SELECT MAX(itv1_weekly_ranking) FROM table_25664518_3 | What is the maximum ITV1 weekly ranking? | CREATE TABLE table_25664518_3 (itv1_weekly_ranking INTEGER) |
SELECT home_team AS score FROM table_name_45 WHERE home_team = "geelong" | What was the score when geelong was the away team? | CREATE TABLE table_name_45 (home_team VARCHAR) |
SELECT COUNT(silver) FROM table_name_23 WHERE total < 15 AND rank < 5 AND bronze = 4 AND gold < 3 | How many times is the total less than 15, rank less than 5, bronze is 4 and gold smaller than 3? | CREATE TABLE table_name_23 (
silver VARCHAR,
gold VARCHAR,
bronze VARCHAR,
total VARCHAR,
rank VARCHAR
) |
SELECT viewers__millions_ FROM table_25664518_3 WHERE fourth_couple = "Tony and Jamie" | What was the number of viewers for the episode having a fourth couple of Tony and Jamie? | CREATE TABLE table_25664518_3 (viewers__millions_ VARCHAR, fourth_couple VARCHAR) |
SELECT cb_cw FROM table_name_89 WHERE year = 1982 | What was the CB CW for the year of 1982? | CREATE TABLE table_name_89 (cb_cw VARCHAR, year VARCHAR) |
SELECT date_account_opened, COUNT(date_account_opened) FROM Accounts GROUP BY other_account_details | Show the number of accounts opened in each day. Bin the account open day by weekday and group by other account details in a stacked bar chart. | CREATE TABLE Accounts (
account_id INTEGER,
customer_id INTEGER,
date_account_opened DATETIME,
account_name VARCHAR(50),
other_account_details VARCHAR(255)
)
CREATE TABLE Orders (
order_id INTEGER,
customer_id INTEGER,
date_order_placed DATETIME,
order_details VARCHAR(255)
)
CREATE TABLE Invoices (
invoice_number INTEGER,
order_id INTEGER,
invoice_date DATETIME
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_first_name VARCHAR(50),
customer_middle_initial VARCHAR(1),
customer_last_name VARCHAR(50),
gender VARCHAR(1),
email_address VARCHAR(255),
login_name VARCHAR(80),
login_password VARCHAR(20),
phone_number VARCHAR(255),
town_city VARCHAR(50),
state_county_province VARCHAR(50),
country VARCHAR(50)
)
CREATE TABLE Invoice_Line_Items (
order_item_id INTEGER,
invoice_number INTEGER,
product_id INTEGER,
product_title VARCHAR(80),
product_quantity VARCHAR(50),
product_price DECIMAL(19,4),
derived_product_cost DECIMAL(19,4),
derived_vat_payable DECIMAL(19,4),
derived_total_cost DECIMAL(19,4)
)
CREATE TABLE Products (
product_id INTEGER,
parent_product_id INTEGER,
production_type_code VARCHAR(15),
unit_price DECIMAL(19,4),
product_name VARCHAR(80),
product_color VARCHAR(20),
product_size VARCHAR(20)
)
CREATE TABLE Product_Categories (
production_type_code VARCHAR(15),
product_type_description VARCHAR(80),
vat_rating DECIMAL(19,4)
)
CREATE TABLE Financial_Transactions (
transaction_id INTEGER,
account_id INTEGER,
invoice_number INTEGER,
transaction_type VARCHAR(15),
transaction_date DATETIME,
transaction_amount DECIMAL(19,4),
transaction_comment VARCHAR(255),
other_transaction_details VARCHAR(255)
)
CREATE TABLE Order_Items (
order_item_id INTEGER,
order_id INTEGER,
product_id INTEGER,
product_quantity VARCHAR(50),
other_order_item_details VARCHAR(255)
) |
SELECT first_couple FROM table_25664518_3 WHERE fourth_couple = "Sammy and Nat" | Who was the first couple in the episode having a fourth couple of Sammy and Nat? | CREATE TABLE table_25664518_3 (first_couple VARCHAR, fourth_couple VARCHAR) |
SELECT MAX(year) FROM table_name_8 WHERE bb_cw = "78" | What is the most current year that had a BB CW of 78? | CREATE TABLE table_name_8 (year INTEGER, bb_cw VARCHAR) |
SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN characteristics AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "sesame" | What are all the characteristic names of product 'sesame'? | CREATE TABLE ref_colors (
color_code text,
color_description text
)
CREATE TABLE products (
product_id number,
color_code text,
product_category_code text,
product_name text,
typical_buying_price text,
typical_selling_price text,
product_description text,
other_product_details text
)
CREATE TABLE product_characteristics (
product_id number,
characteristic_id number,
product_characteristic_value text
)
CREATE TABLE ref_product_categories (
product_category_code text,
product_category_description text,
unit_of_measure text
)
CREATE TABLE ref_characteristic_types (
characteristic_type_code text,
characteristic_type_description text
)
CREATE TABLE characteristics (
characteristic_id number,
characteristic_type_code text,
characteristic_data_type text,
characteristic_name text,
other_characteristic_details text
) |
SELECT MIN(itv1_weekly_ranking) FROM table_25664518_3 WHERE viewers__millions_ = "5.42" | What is the minimum ITV1 ranking for the episode having viewership of 5.42 million? | CREATE TABLE table_25664518_3 (itv1_weekly_ranking INTEGER, viewers__millions_ VARCHAR) |
SELECT home_team AS score FROM table_name_52 WHERE home_team = "north melbourne" | What was the North Melbourne's score when they played as the home team? | CREATE TABLE table_name_52 (home_team VARCHAR) |
SELECT semi_finalist__number2 FROM table_name_59 WHERE year = "2007" | Who was the Semi-Finalist #2 in 2007? | CREATE TABLE table_name_59 (
semi_finalist__number2 VARCHAR,
year VARCHAR
) |
SELECT MAX(no_in_series) FROM table_25668962_1 WHERE us_viewers__million_ = "13.66" | What episode number in the series was viewed by 13.66 million people in the U.S.? | CREATE TABLE table_25668962_1 (no_in_series INTEGER, us_viewers__million_ VARCHAR) |
SELECT AVG(crowd) FROM table_name_54 WHERE home_team = "st kilda" | What was the attendance at the St Kilda home game? | CREATE TABLE table_name_54 (crowd INTEGER, home_team VARCHAR) |
SELECT COUNT("New adherents per year") FROM table_30288 WHERE "Religion" = 'Confucianism' | Name the number of new adherents per year for confucianism | CREATE TABLE table_30288 (
"Religion" text,
"Births" real,
"Conversions" text,
"New adherents per year" real,
"Growth rate" text
) |
SELECT us_viewers__million_ FROM table_25668962_1 WHERE production_code = "1ARC12" | How many million U.S. viewers watched the epiode with a production code of 1arc12? | CREATE TABLE table_25668962_1 (us_viewers__million_ VARCHAR, production_code VARCHAR) |
SELECT COUNT(crowd) FROM table_name_58 WHERE venue = "junction oval" | What was the attendance when the VFL played Junction Oval? | CREATE TABLE table_name_58 (crowd VARCHAR, venue VARCHAR) |
SELECT AVG(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.days_stay = "27" | what is average age of patients whose gender is m and days of hospital stay is 27? | 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 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) |
SELECT us_viewers__million_ FROM table_25668962_1 WHERE production_code = "1ARC03" | How many million U.S. viewers watched the episode with a production code of 1arc03? | CREATE TABLE table_25668962_1 (us_viewers__million_ VARCHAR, production_code VARCHAR) |
SELECT venue FROM table_name_95 WHERE away_team = "melbourne" | Where did Melbourne play as the away team? | CREATE TABLE table_name_95 (venue VARCHAR, away_team VARCHAR) |
SELECT COUNT(rank) FROM table_name_48 WHERE studio = "vestron" | What is the total number of ranks that had vestron as the studio? | CREATE TABLE table_name_48 (
rank VARCHAR,
studio VARCHAR
) |
SELECT us_viewers__million_ FROM table_25668962_1 WHERE no_in_series = 6 | How many million U.S. viewers watched episode number 6 in the series? | CREATE TABLE table_25668962_1 (us_viewers__million_ VARCHAR, no_in_series VARCHAR) |
SELECT venue FROM table_name_82 WHERE home_team = "fitzroy" | What is Fitzroy's home field? | CREATE TABLE table_name_82 (venue VARCHAR, home_team VARCHAR) |
SELECT COUNT(pick__number) FROM table_14650162_1 WHERE position = "Tight End" | How many picks played Tight end? | CREATE TABLE table_14650162_1 (
pick__number VARCHAR,
position VARCHAR
) |
SELECT directed_by FROM table_25668962_1 WHERE no_in_series = 18 | Who directed episode number 18 in the series? | CREATE TABLE table_25668962_1 (directed_by VARCHAR, no_in_series VARCHAR) |
SELECT away_team FROM table_name_5 WHERE venue = "punt road oval" | Who was the away team at punt road oval? | CREATE TABLE table_name_5 (away_team VARCHAR, venue VARCHAR) |
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'antiarrhythmics - class iii antiarrhythmic' AND DATETIME(treatment.treatmenttime) >= DATETIME(CURRENT_TIME(), '-3 year')) AS t1 JOIN (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 's/p thyroid surgery' AND DATETIME(diagnosis.diagnosistime) >= DATETIME(CURRENT_TIME(), '-3 year')) AS t2 WHERE t1.treatmenttime < t2.diagnosistime AND DATETIME(t2.diagnosistime) BETWEEN DATETIME(t1.treatmenttime) AND DATETIME(t1.treatmenttime, '+2 month') | how many patients since 3 years ago were diagnosed with s/p thyroid surgery after antiarrhythmics - class iii antiarrhythmic within 2 months? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
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 intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
) |
SELECT 3 AS rd_couple FROM table_25664518_4 WHERE viewers__millions_ = "4.89" | Who were the 3rd couple that were viewed by 4.89 million viewers? | CREATE TABLE table_25664518_4 (viewers__millions_ VARCHAR) |
SELECT away_team AS score FROM table_name_62 WHERE venue = "victoria park" | What was the away team score at victoria park? | CREATE TABLE table_name_62 (away_team VARCHAR, venue VARCHAR) |
SELECT "Division" FROM table_36704 WHERE "City" = 'jacksonville, florida' | Which Division does the City being jacksonville, florida belong to? | CREATE TABLE table_36704 (
"Conference" text,
"Division" text,
"Team" text,
"City" text,
"Home Stadium" text
) |
SELECT location FROM table_25668203_2 WHERE most_laps_led = "Patrick McKenna" | What location(s) did patrick mckenna lead the most laps? | CREATE TABLE table_25668203_2 (location VARCHAR, most_laps_led VARCHAR) |
SELECT home_team AS score FROM table_name_42 WHERE venue = "arden street oval" | Who was the home team in the game played at arden street oval? | CREATE TABLE table_name_42 (home_team VARCHAR, venue VARCHAR) |
SELECT MIN(stolen_ends) FROM table_29565541_2 WHERE l = 5 | When 5 is the l what is the lowest amount of stolen ends? | CREATE TABLE table_29565541_2 (
stolen_ends INTEGER,
l VARCHAR
) |
SELECT COUNT(fastest_lap) FROM table_25668203_2 WHERE rnd = "10" | How many races went for 10 rounds? | CREATE TABLE table_25668203_2 (fastest_lap VARCHAR, rnd VARCHAR) |
SELECT away_team AS score FROM table_name_21 WHERE away_team = "st kilda" | What was St Kilda's away team score? | CREATE TABLE table_name_21 (away_team VARCHAR) |
SELECT Trade_Name, id FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id ORDER BY id | Show me a bar chart for what is the id and trade name of the medicines can interact with at least 3 enzymes?, sort total number in ascending order please. | CREATE TABLE medicine_enzyme_interaction (
enzyme_id int,
medicine_id int,
interaction_type text
)
CREATE TABLE enzyme (
id int,
name text,
Location text,
Product text,
Chromosome text,
OMIM int,
Porphyria text
)
CREATE TABLE medicine (
id int,
name text,
Trade_Name text,
FDA_approved text
) |
SELECT most_laps_led FROM table_25668203_2 WHERE location = "Monterey, California" AND winning_driver = "Scott Rarick" | Who had the most laps led in monterey, california when scott rarick won the race? | CREATE TABLE table_25668203_2 (most_laps_led VARCHAR, location VARCHAR, winning_driver VARCHAR) |
SELECT away_team FROM table_name_13 WHERE home_team = "south melbourne" | Who was home team South Melbourne's opponent? | CREATE TABLE table_name_13 (away_team VARCHAR, home_team VARCHAR) |
SELECT year, SUM(citation_num) FROM publication WHERE title = 'Making database systems usable' GROUP BY year | return me the number of citations of ' Making database systems usable ' in each year . | CREATE TABLE publication (
abstract varchar,
cid int,
citation_num int,
jid int,
pid int,
reference_num int,
title varchar,
year int
)
CREATE TABLE domain_keyword (
did int,
kid int
)
CREATE TABLE conference (
cid int,
homepage varchar,
name varchar
)
CREATE TABLE writes (
aid int,
pid int
)
CREATE TABLE cite (
cited int,
citing int
)
CREATE TABLE domain_journal (
did int,
jid int
)
CREATE TABLE domain (
did int,
name varchar
)
CREATE TABLE author (
aid int,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE organization (
continent varchar,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE publication_keyword (
kid int,
pid int
)
CREATE TABLE domain_publication (
did int,
pid int
)
CREATE TABLE domain_conference (
cid int,
did int
)
CREATE TABLE domain_author (
aid int,
did int
)
CREATE TABLE keyword (
keyword varchar,
kid int
)
CREATE TABLE journal (
homepage varchar,
jid int,
name varchar
) |
SELECT winning_team FROM table_25668203_2 WHERE winning_driver = "Mikhail Goikhberg" | What was the winning team when mikhail goikhberg was the winning driver? | CREATE TABLE table_25668203_2 (winning_team VARCHAR, winning_driver VARCHAR) |
SELECT music FROM table_name_99 WHERE score = "13 (5, 4, 4)" | What was the music for the team who earned a score of 13 (5, 4, 4)? | CREATE TABLE table_name_99 (music VARCHAR, score VARCHAR) |
SELECT 123 AS kg FROM table_name_41 WHERE world_record = "total" | What's the 123kg of the Total world record? | CREATE TABLE table_name_41 (
world_record VARCHAR
) |
SELECT directed_by FROM table_25679312_2 WHERE prod_code = 10 | Who directed the episode with the production code 10? | CREATE TABLE table_25679312_2 (directed_by VARCHAR, prod_code VARCHAR) |
SELECT music FROM table_name_7 WHERE result = "eliminated" | What was the music of the team that was eliminated? | CREATE TABLE table_name_7 (music VARCHAR, result VARCHAR) |
SELECT demographic.diagnosis, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "74463" | what is the primary disease and procedure icd9 code of subject id 74463? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title 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 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 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 written_by FROM table_25679312_2 WHERE prod_code = 2 | Who wrote the episode with production code 2? | CREATE TABLE table_25679312_2 (written_by VARCHAR, prod_code VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.