answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT MAX(crowd) FROM table_name_13 WHERE away_team = "collingwood" | What was the largest crowd at a game where Collingwood was the away team? | CREATE TABLE table_name_13 (crowd INTEGER, away_team VARCHAR) |
SELECT loss FROM table_name_20 WHERE date = "may 29" | Name the loss on may 29 | CREATE TABLE table_name_20 (
loss VARCHAR,
date VARCHAR
) |
SELECT title FROM table_25548213_1 WHERE directed_by = "Bill Lawrence" | What was the name of the episode that bill lawrence directed? | CREATE TABLE table_25548213_1 (title VARCHAR, directed_by VARCHAR) |
SELECT population__percentage_1971 FROM table_name_62 WHERE population__percentage_1981 = "1.92%" | For the group with 1.92% population in 1981, what was their percentage of the population in 1971? | CREATE TABLE table_name_62 (population__percentage_1971 VARCHAR, population__percentage_1981 VARCHAR) |
SELECT historical_references FROM table_name_7 WHERE run_time = "6:07" | What is the topic of the episode that runs 6:07? | CREATE TABLE table_name_7 (
historical_references VARCHAR,
run_time VARCHAR
) |
SELECT title FROM table_25548213_1 WHERE us_viewers__million_ = "4.65" | What was the name of the episode that had 4.65 million viewers? | CREATE TABLE table_25548213_1 (title VARCHAR, us_viewers__million_ VARCHAR) |
SELECT population__percentage_1971 FROM table_name_14 WHERE population__percentage_1961 = "1.79%" | For the group with 1.79% population in 1961, what was their percentage of the population in 1971? | CREATE TABLE table_name_14 (population__percentage_1971 VARCHAR, population__percentage_1961 VARCHAR) |
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'LAS VEGAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHOENIX' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code | flights from LAS VEGAS to PHOENIX | CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
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 days (
days_code varchar,
day_name varchar
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name 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 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 compartment_class (
compartment varchar,
class_type 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 time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
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 food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
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 code_description (
code varchar,
description 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 month (
month_number int,
month_name text
)
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 flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
) |
SELECT production_code FROM table_25548505_1 WHERE directed_by = "Michael McDonald" | What is the production code of the episode directed by Michael McDonald? | CREATE TABLE table_25548505_1 (production_code VARCHAR, directed_by VARCHAR) |
SELECT rice_[b_] FROM table_name_7 WHERE potato_[d_] = "79" | What is the rice amount when the potato amount is 79? | CREATE TABLE table_name_7 (rice_ VARCHAR, b_ VARCHAR, potato_ VARCHAR, d_ VARCHAR) |
SELECT "Austria" FROM table_6640 WHERE "Croatia" = 'ireland' | What is shown for Austria when Croatia shows Ireland? | CREATE TABLE table_6640 (
"102." real,
"28 February" text,
"Friendly" text,
"Croatia" text,
"Austria" text
) |
SELECT original_air_date FROM table_25548505_1 WHERE us_viewers__millions_ = "5.30" | What was the original air date of the episode that had 5.30 million U.S. viewers? | CREATE TABLE table_25548505_1 (original_air_date VARCHAR, us_viewers__millions_ VARCHAR) |
SELECT yam_[y_] FROM table_name_48 WHERE soybean__green__[f_] = "0" AND potato_[d_] = "0.01" | What is the yam amount with amount of soybean 0 and potato of 0.01? | CREATE TABLE table_name_48 (yam_ VARCHAR, y_ VARCHAR, soybean__green__ VARCHAR, f_ VARCHAR, potato_ VARCHAR, d_ VARCHAR) |
SELECT "Score" FROM table_47868 WHERE "Record" = '1-1' | WHAT SCORE HAD A RECORD OF 1-1? | CREATE TABLE table_47868 (
"Date" text,
"Opponent" text,
"Score" text,
"Result" text,
"Record" text
) |
SELECT title FROM table_25548505_1 WHERE directed_by = "Linda Mendoza" | What is the title of the episode directed by Linda Mendoza? | CREATE TABLE table_25548505_1 (title VARCHAR, directed_by VARCHAR) |
SELECT yam_[y_] FROM table_name_34 WHERE cassava_[e_] = "0.11" | What is the yam amount when the Cassava amount is 0.11? | CREATE TABLE table_name_34 (yam_ VARCHAR, y_ VARCHAR, cassava_ VARCHAR, e_ VARCHAR) |
SELECT other_account_details, COUNT(other_account_details) FROM Accounts GROUP BY other_account_details ORDER BY other_account_details DESC | Show the number of accounts in a bar chart that groups by other account details, and sort in desc by the x-axis please. | 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 Invoices (
invoice_number INTEGER,
order_id INTEGER,
invoice_date DATETIME
)
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 Order_Items (
order_item_id INTEGER,
order_id INTEGER,
product_id INTEGER,
product_quantity VARCHAR(50),
other_order_item_details VARCHAR(255)
)
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 Orders (
order_id INTEGER,
customer_id INTEGER,
date_order_placed DATETIME,
order_details VARCHAR(255)
)
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 Accounts (
account_id INTEGER,
customer_id INTEGER,
date_account_opened DATETIME,
account_name VARCHAR(50),
other_account_details VARCHAR(255)
) |
SELECT type FROM table_255602_1 WHERE area__km²_ = "155.77" | What are all the political types where area is 155.77? | CREATE TABLE table_255602_1 (type VARCHAR, area__km²_ VARCHAR) |
SELECT wheat_[c_] FROM table_name_20 WHERE potato_[d_] = "1.9" | What is the wheat amount when the potato amount of 1.9? | CREATE TABLE table_name_20 (wheat_ VARCHAR, c_ VARCHAR, potato_ VARCHAR, d_ VARCHAR) |
SELECT thursday FROM table_name_59 WHERE series = "big brother 13" | Which Thursday does big brother 13 air? | CREATE TABLE table_name_59 (
thursday VARCHAR,
series VARCHAR
) |
SELECT MIN(no_of_barangays) FROM table_255602_1 WHERE type = "Component City" | What is the minimum number of barangays where the type is component city? | CREATE TABLE table_255602_1 (no_of_barangays INTEGER, type VARCHAR) |
SELECT sweet_potato_[g_] FROM table_name_92 WHERE soybean__green__[f_] = "1.65" | What is the Sweet Potato amount when the soybean amount is 1.65? | CREATE TABLE table_name_92 (sweet_potato_ VARCHAR, g_ VARCHAR, soybean__green__ VARCHAR, f_ VARCHAR) |
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, fare, fare_basis, flight, flight_fare WHERE ((CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND fare_basis.class_type = 'FIRST' AND fare.fare_basis_code = fare_basis.fare_basis_code AND flight_fare.fare_id = fare.fare_id AND flight.flight_id = flight_fare.flight_id) AND flight.airline_code = 'UA' | give me flights from BALTIMORE to DENVER on UA that offer FIRST class | 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 airline (
airline_code varchar,
airline_name text,
note 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 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 state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name 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 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 class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE month (
month_number int,
month_name text
)
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_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
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 equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant 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_interval (
period text,
begin_time int,
end_time int
) |
SELECT city__municipality FROM table_255602_1 WHERE area__km²_ = "176.40" | What city/municipality has area of 176.40? | CREATE TABLE table_255602_1 (city__municipality VARCHAR, area__km²_ VARCHAR) |
SELECT yam_[y_] FROM table_name_80 WHERE maize___corn_[a_] = "1355" | What is the Yam amount when the Maze/Corn amount is 1355? | CREATE TABLE table_name_80 (yam_ VARCHAR, y_ VARCHAR, maize___corn_ VARCHAR, a_ VARCHAR) |
SELECT DISTINCT t1.c1 FROM (SELECT labevents.valuenum, PERCENT_RANK() OVER (ORDER BY labevents.valuenum) AS c1 FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'sodium') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age = (SELECT admissions.age FROM admissions WHERE admissions.subject_id = 97330 AND admissions.dischtime IS NULL))) AS t1 WHERE t1.valuenum = 144.0 | what percentile of sodium is 144.0 in patients of the same age as patient 97330 on the current hospital encounter? | CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
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 labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
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 cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
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 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 d_items (
row_id number,
itemid number,
label text,
linksto 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 procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
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 patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
) |
SELECT area__km²_ FROM table_255602_1 WHERE population__2010_ = 38062 | What is the area where population in 2010 is 38062? | CREATE TABLE table_255602_1 (area__km²_ VARCHAR, population__2010_ VARCHAR) |
SELECT name_and_flag FROM table_name_40 WHERE water_area__km_2__ = 0 | Which province and flag has a water area (km 2) of 0? | CREATE TABLE table_name_40 (name_and_flag VARCHAR, water_area__km_2__ VARCHAR) |
SELECT attendance FROM table_name_68 WHERE visitor = "indiana" | How many people went to the game with Indiana visiting? | CREATE TABLE table_name_68 (
attendance VARCHAR,
visitor VARCHAR
) |
SELECT COUNT(pop_density__per_km²_) FROM table_255602_1 WHERE area__km²_ = "48.67" | What is the population density where area is 48.67? | CREATE TABLE table_255602_1 (pop_density__per_km²_ VARCHAR, area__km²_ VARCHAR) |
SELECT date FROM table_name_80 WHERE opponent = "pittsburgh steelers" | When did the Browns play the Pittsburgh Steelers? | CREATE TABLE table_name_80 (date VARCHAR, opponent VARCHAR) |
SELECT "Player" FROM table_52544 WHERE "Hometown" = 'bay city, tx' | Who's from Bay City, TX? | CREATE TABLE table_52544 (
"Player" text,
"Height" text,
"School" text,
"Hometown" text,
"College" text,
"NBA Draft" text
) |
SELECT couple FROM table_25557556_5 WHERE average = "21.0" | What couple averaged 21.0? | CREATE TABLE table_25557556_5 (couple VARCHAR, average VARCHAR) |
SELECT home_team FROM table_name_51 WHERE away_team = "north melbourne" | Who is the home side when north melbourne is the away side? | CREATE TABLE table_name_51 (home_team VARCHAR, away_team VARCHAR) |
SELECT school_club_team FROM table_name_34 WHERE player = "andre wakefield" | Which School/Club Team did Andre Wakefield play for? | CREATE TABLE table_name_34 (
school_club_team VARCHAR,
player VARCHAR
) |
SELECT MAX(number_of_dances) FROM table_25557556_5 WHERE competition_finish = 3 | What was the number of dances for the competition finish of 3? | CREATE TABLE table_25557556_5 (number_of_dances INTEGER, competition_finish VARCHAR) |
SELECT venue FROM table_name_99 WHERE away_team = "collingwood" | Where was the game played where Collingwood was the away team? | CREATE TABLE table_name_99 (venue VARCHAR, away_team VARCHAR) |
SELECT DISTINCT fare.fare_id, flight.airline_code, flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND flight_fare.fare_id = fare.fare_id AND flight.flight_id = flight_fare.flight_id AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code | show me all flights and fares from DENVER to SAN FRANCISCO | CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code 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
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
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 month (
month_number int,
month_name text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
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 ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
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 city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
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 class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
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 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 date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
) |
SELECT MIN(wins) FROM table_25557880_1 | What was his minimum number wins in a single year? | CREATE TABLE table_25557880_1 (wins INTEGER) |
SELECT total_tenure_time FROM table_name_3 WHERE total_tenure_rank = 49 | What was the total tenure time with a rank of 49? | CREATE TABLE table_name_3 (total_tenure_time VARCHAR, total_tenure_rank VARCHAR) |
SELECT lname FROM student WHERE major = 50 | What are the last names of students studying major 50? | CREATE TABLE voting_record (
stuid number,
registration_date text,
election_cycle text,
president_vote number,
vice_president_vote number,
secretary_vote number,
treasurer_vote number,
class_president_vote number,
class_senator_vote number
)
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
) |
SELECT series FROM table_25557880_1 WHERE position = "NC†" | In which series was his position NC† ? | CREATE TABLE table_25557880_1 (series VARCHAR, position VARCHAR) |
SELECT winning_team FROM table_name_74 WHERE winning_driver = "teo fabi" AND pole_position = "teo fabi" | Who did Teo Fabi drive for when he won and had pole position? | CREATE TABLE table_name_74 (winning_team VARCHAR, winning_driver VARCHAR, pole_position VARCHAR) |
SELECT admissions.subject_id FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_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 = 'assault nos') AND STRFTIME('%y', diagnoses_icd.charttime) >= '2101') | the list of the patient ids of patients diagnosed with assault nos since 2101. | CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
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,
wardid number,
intime time,
outtime time
)
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 labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
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 cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount 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 procedures_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
) |
SELECT position FROM table_25557880_1 WHERE points = "38" | What was his position when he garnered 38 points? | CREATE TABLE table_25557880_1 (position VARCHAR, points VARCHAR) |
SELECT name FROM table_name_49 WHERE winning_team = "forsythe racing" AND pole_position = "bobby rahal" | Who won for Forsythe Racing when Bobby Rahal had pole position? | CREATE TABLE table_name_49 (name VARCHAR, winning_team VARCHAR, pole_position VARCHAR) |
SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the sum of employee_id over the hire_date bin hire_date by time. | CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
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 departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
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(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
) |
SELECT sail_number FROM table_25561560_3 WHERE yacht = "Two True" | What was the sail number of Two True? | CREATE TABLE table_25561560_3 (sail_number VARCHAR, yacht VARCHAR) |
SELECT winning_team FROM table_name_47 WHERE fastest_lap = "1:13.516" | Which team had the fastest lap of 1:13.516? | CREATE TABLE table_name_47 (winning_team VARCHAR, fastest_lap VARCHAR) |
SELECT "Winning score" FROM table_9803 WHERE "Margin of victory" = 'playoff' AND "Tournament" = 'safeco classic' | What was the winning score when the margin of victory was a playoff for the Tournament of safeco classic? | CREATE TABLE table_9803 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
) |
SELECT yacht FROM table_25561560_3 WHERE skipper = "Andrew Saies" | What yacht did Andrew Saies sail on? | CREATE TABLE table_25561560_3 (yacht VARCHAR, skipper VARCHAR) |
SELECT fastest_lap FROM table_name_40 WHERE winning_driver = "al unser" | Who had the fastest lap when Al Unser won? | CREATE TABLE table_name_40 (fastest_lap VARCHAR, winning_driver VARCHAR) |
SELECT demographic.age, demographic.religion FROM demographic WHERE demographic.subject_id = "1121" | what is age and religion of subject id 1121? | 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
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) |
SELECT position FROM table_25561560_2 WHERE skipper = "Mark Richards" | In what position did skipper Mark Richards place? | CREATE TABLE table_25561560_2 (position VARCHAR, skipper VARCHAR) |
SELECT COUNT(max__number_of_players) FROM table_name_24 WHERE developer = "sega" AND main_title___alternate_title_s_ = "hang-on (cartridge version)" | What is the maximum number of players for the sega game, hang-on (cartridge version)? | CREATE TABLE table_name_24 (max__number_of_players VARCHAR, developer VARCHAR, main_title___alternate_title_s_ VARCHAR) |
SELECT score FROM table_name_38 WHERE attendance = "1,644" | What was the score of the game when the attendance was 1,644? | CREATE TABLE table_name_38 (
score VARCHAR,
attendance VARCHAR
) |
SELECT yacht AS type FROM table_25561560_2 WHERE yacht = "ICAP Leopard" | What is the yacht type of Icap Leopard? | CREATE TABLE table_25561560_2 (yacht VARCHAR) |
SELECT away_team FROM table_name_33 WHERE score = "4–2" | Which Away team has a Score of 4–2? | CREATE TABLE table_name_33 (away_team VARCHAR, score VARCHAR) |
SELECT name, distance FROM aircraft ORDER BY name DESC | Show me distance by name in a histogram, display X in descending order. | CREATE TABLE employee (
eid number(9,0),
name varchar2(30),
salary number(10,2)
)
CREATE TABLE certificate (
eid number(9,0),
aid number(9,0)
)
CREATE TABLE aircraft (
aid number(9,0),
name varchar2(30),
distance number(6,0)
)
CREATE TABLE flight (
flno number(4,0),
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0)
) |
SELECT skipper FROM table_25561560_2 WHERE sail_number = "AUS60000" | what skipper has the sail number aus60000? | CREATE TABLE table_25561560_2 (skipper VARCHAR, sail_number VARCHAR) |
SELECT home_team FROM table_name_60 WHERE away_team = "al-ain fc" AND year = "2002/03" | Which Home team has an Away team of al-ain fc, and a Year of 2002/03? | CREATE TABLE table_name_60 (home_team VARCHAR, away_team VARCHAR, year VARCHAR) |
SELECT COUNT("Red (E8)") FROM table_23795 WHERE "Interior/Roof" = 'Parchment/saddle' | How many different results for red (e8) does the model with parchment/saddle interior/roof have? | CREATE TABLE table_23795 (
"Interior/Roof" text,
"Black (UA)" real,
"Red (E8)" real,
"White (ZR)" real,
"Green (SW)" real,
"Totals" real
) |
SELECT aggressive_rider FROM table_25580292_13 WHERE winner = "Luis León Sánchez" | Who was the aggressive rider when the winner was luis león sánchez? | CREATE TABLE table_25580292_13 (aggressive_rider VARCHAR, winner VARCHAR) |
SELECT home_team FROM table_name_35 WHERE year = "2002/03" AND venue = "tahnoun bin mohamed stadium" | Which Home team has a Year of 2002/03, and a Venue of tahnoun bin mohamed stadium? | CREATE TABLE table_name_35 (home_team VARCHAR, year VARCHAR, venue VARCHAR) |
SELECT COUNT("2009") FROM table_41805 WHERE "1999" < '1' AND "2006" > '0' AND "1997" < '0' | How many countries in 2009 have fewer than 1 in 1999, more than 0 in 2006 and none in 1997? | CREATE TABLE table_41805 (
"Country" text,
"1997" real,
"1998" real,
"1999" real,
"2000" real,
"2001" real,
"2002" real,
"2003" real,
"2004" real,
"2005" real,
"2006" real,
"2007" real,
"2008" real,
"2009" real,
"2010" real,
"2011" real,
"2012" real,
"Total" real
) |
SELECT aggressive_rider FROM table_25580292_13 WHERE sprint_classification = "André Greipel" AND mountains_classification = "Timothy Roe" | Who was the aggressive rider when the sprint classification was andré greipel and mountains classification was timothy roe? | CREATE TABLE table_25580292_13 (aggressive_rider VARCHAR, sprint_classification VARCHAR, mountains_classification VARCHAR) |
SELECT away_team FROM table_name_58 WHERE home_team = "al-ain fc" AND score = "1–1" | Which Away team has a Home team of al-ain fc, and a Score of 1–1? | CREATE TABLE table_name_58 (away_team VARCHAR, home_team VARCHAR, score VARCHAR) |
SELECT demographic.name FROM demographic WHERE demographic.subject_id = "66411" | what is subject name of subject id 66411? | 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 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 stage FROM table_25580292_13 WHERE winner = "Luis León Sánchez" | What was the stage when the winner was luis león sánchez? | CREATE TABLE table_25580292_13 (stage VARCHAR, winner VARCHAR) |
SELECT MAX(attendance) FROM table_name_85 WHERE date = "september 27, 1964" | What is the attendance of the game that was played on September 27, 1964? | CREATE TABLE table_name_85 (attendance INTEGER, date VARCHAR) |
SELECT result FROM table_2668336_24 WHERE candidates = "Alexander Smyth (DR) 100%" | What is the result when the candidates are alexander smyth (dr) 100% | CREATE TABLE table_2668336_24 (
result VARCHAR,
candidates VARCHAR
) |
SELECT young_rider_classification FROM table_25580292_13 WHERE winner = "Manuel Cardoso" | What was the young rider classification when manuel cardoso was the winner? | CREATE TABLE table_25580292_13 (young_rider_classification VARCHAR, winner VARCHAR) |
SELECT home_team AS score FROM table_name_77 WHERE away_team = "geelong" | What is the home side's score when geelong is the away team? | CREATE TABLE table_name_77 (home_team VARCHAR, away_team VARCHAR) |
SELECT "township" FROM table_204_322 ORDER BY "population" DESC LIMIT 1 | which township has the most residents ? | CREATE TABLE table_204_322 (
id number,
"township" text,
"fips" number,
"population" number,
"population\ndensity\n/km2 (/sq mi)" text,
"land area\nkm2 (sq mi)" text,
"water area\nkm2 (sq mi)" text,
"water %" text,
"geographic coordinates" text
) |
SELECT COUNT(winner) FROM table_25580292_13 WHERE stage = 5 | How many winners were there for stage 5? | CREATE TABLE table_25580292_13 (winner VARCHAR, stage VARCHAR) |
SELECT score_in_the_final FROM table_name_92 WHERE date = 1974 | What was the score of the tournament that was held in 1974? | CREATE TABLE table_name_92 (score_in_the_final VARCHAR, date VARCHAR) |
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND flight.departure_time = 400 AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'WASHINGTON' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code | are there any 400 o'clock flights from WASHINGTON to DENVER | CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
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 time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
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 state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_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 airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant 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 equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
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 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 food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE days (
days_code varchar,
day_name 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 airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
) |
SELECT COUNT(population__2007_) FROM table_255829_1 WHERE municipality = "Gigmoto" | What is the 2007 population of Gigmoto? | CREATE TABLE table_255829_1 (population__2007_ VARCHAR, municipality VARCHAR) |
SELECT date FROM table_name_14 WHERE home_team = "south melbourne" | What was the date when South Melbourne was the home team? | CREATE TABLE table_name_14 (date VARCHAR, home_team VARCHAR) |
SELECT COUNT("Equivalent daily inflation rate") FROM table_18917 WHERE "Time required for prices to double" = '3.7 days' | how many equivalent daily inflation rate with time required for prices to double being 3.7 days | CREATE TABLE table_18917 (
"Country" text,
"Currency name" text,
"Month with highest inflation rate" text,
"Highest monthly inflation rate" text,
"Equivalent daily inflation rate" text,
"Time required for prices to double" text
) |
SELECT population__2010_ FROM table_255829_1 WHERE no_of_barangays = 31 | What is the 2010 population of the municipality with 31 barangays? | CREATE TABLE table_255829_1 (population__2010_ VARCHAR, no_of_barangays VARCHAR) |
SELECT venue FROM table_name_29 WHERE home_team = "hawthorn" | Where did Hawthorn play as home team? | CREATE TABLE table_name_29 (venue VARCHAR, home_team VARCHAR) |
SELECT "Constructor" FROM table_51567 WHERE "Grid" > '19' AND "Time/Retired" = 'suspension' | Who constructed the car with a grid over 19 that retired due to suspension? | CREATE TABLE table_51567 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) |
SELECT pop_density__per_km_2__ FROM table_255829_1 WHERE municipality = "Caramoran" | What is the population density of Caramoran? | CREATE TABLE table_255829_1 (pop_density__per_km_2__ VARCHAR, municipality VARCHAR) |
SELECT home_team AS score FROM table_name_20 WHERE venue = "brunswick street oval" | When the VFL played Brunswick Street Oval what was the home team score? | CREATE TABLE table_name_20 (home_team VARCHAR, venue VARCHAR) |
SELECT Id, Text FROM Comments WHERE PostId IN (SELECT Id FROM Posts WHERE Tags LIKE '%puppet%') AND Text LIKE '%complex%' | Comment extraction - ask ubuntu. | CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDate time,
ApprovalModeratorId number,
DeactivationDate time,
DeactivationModeratorId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
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 Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
) |
SELECT municipality FROM table_255829_1 WHERE pop_density__per_km_2__ = "130.6" | What municipality has a 130.6 pupulation density? | CREATE TABLE table_255829_1 (municipality VARCHAR, pop_density__per_km_2__ VARCHAR) |
SELECT venue FROM table_name_9 WHERE away_team = "geelong" | Where did Geelong play as the away team? | CREATE TABLE table_name_9 (venue VARCHAR, away_team VARCHAR) |
SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-66291')) AND NOT vitalperiodic.heartrate IS NULL AND DATETIME(vitalperiodic.observationtime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m-%d', vitalperiodic.observationtime) = '12-31' ORDER BY vitalperiodic.heartrate DESC, vitalperiodic.observationtime DESC LIMIT 1 | when has patient 012-66291 last had the heartrate maximum on 12/31/this year? | 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 cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
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 (
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 lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
) |
SELECT no_of_s_barangay FROM table_255885_1 WHERE municipality = "Paracale" | What is the number of S Barangay for Paracale? | CREATE TABLE table_255885_1 (no_of_s_barangay VARCHAR, municipality VARCHAR) |
SELECT COUNT(crowd) FROM table_name_2 WHERE home_team = "fitzroy" | What was the attendance when Fitzroy played as home team? | CREATE TABLE table_name_2 (crowd VARCHAR, home_team VARCHAR) |
SELECT club_team FROM table_name_1 WHERE round = 4 AND overall = 119 | Which team scores 119 in round 4? | CREATE TABLE table_name_1 (
club_team VARCHAR,
round VARCHAR,
overall VARCHAR
) |
SELECT municipality FROM table_255885_1 WHERE area__km²_ = "199.35" | What is the municipality that has an area of exactly 199.35 sq. km? | CREATE TABLE table_255885_1 (municipality VARCHAR, area__km²_ VARCHAR) |
SELECT SUM(crowd) FROM table_name_25 WHERE home_team = "hawthorn" | What was the attendance when Hawthorn played as home team? | CREATE TABLE table_name_25 (crowd INTEGER, home_team VARCHAR) |
SELECT "Total" FROM table_7566 WHERE "Country" = 'spain' | What was the total of the player from Spain? | CREATE TABLE table_7566 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" text,
"To par" text
) |
SELECT municipality FROM table_255885_1 WHERE area__km²_ = "214.44" | What is the municipality that has an area of exactly 214.44 sq. km? | CREATE TABLE table_255885_1 (municipality VARCHAR, area__km²_ VARCHAR) |
SELECT engine FROM table_name_24 WHERE chassis = "reynard 01i" AND drivers = "casey mears" | What engine did Casey Mears use on the Reynard 01i Chassis? | CREATE TABLE table_name_24 (engine VARCHAR, chassis VARCHAR, drivers VARCHAR) |
SELECT COUNT(DISTINCT course.course_id) FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.has_lab = 'Y' AND program_course.category LIKE '%ULCS%' | Regarding upper level classes , what 's the count on the number that have labs ? | CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments int,
respected int,
participation int,
heavy_reading int,
tough_grader int,
hilarious int,
would_take_again int,
good_lecture int,
no_skip int
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
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_project varchar,
has_final_exam varchar,
textbook varchar,
class_address varchar,
allow_audit varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_projects varchar,
has_exams varchar,
num_reviews int,
clarity_score int,
easiness_score int,
helpfulness_score int
)
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
) |
SELECT winning_team FROM table_25572118_1 WHERE series = "FR2.0 9" | When fr2.0 9 is the series who is the winning team? | CREATE TABLE table_25572118_1 (winning_team VARCHAR, series VARCHAR) |
SELECT chassis FROM table_name_37 WHERE drivers = "memo gidley" | What Chassis did Memo Gidley use? | CREATE TABLE table_name_37 (chassis VARCHAR, drivers VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.