answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT "Number-one single(s)" FROM table_3764 WHERE "Artist" = 'Desvarieux, Jacob'
Name the number one singles for desvarieux, jacob
CREATE TABLE table_3764 ( "Artist" text, "Country" text, "Number-one single(s)" text, "Year" real, "Weeks at #1" real, "Straight to #1 ?" text )
SELECT 2011 AS _gdp__ppp__billions_of_usd FROM table_2248784_4 WHERE country = "Iraq"
What 2011 GDP (PPP) billions of USD does Iraq have?
CREATE TABLE table_2248784_4 (country VARCHAR)
SELECT COUNT(wednesday) FROM table_18173916_8 WHERE tuesday = "319 Sucker Punch"
which episode was Transmitted on wednesday if the episode of "319 sucker punch" was transmitted on tuesday?
CREATE TABLE table_18173916_8 (wednesday VARCHAR, tuesday VARCHAR)
SELECT original_us_air_date FROM table_name_80 WHERE original_canadian_air_date = "december 9, 2007"
What is the Original U.S. air-date for the Original Canadian air-date of december 9, 2007?
CREATE TABLE table_name_80 ( original_us_air_date VARCHAR, original_canadian_air_date VARCHAR )
SELECT 2011 AS _gdp__ppp__billions_of_usd FROM table_2248784_4 WHERE country = "Israel"
What 2011 GDP (PPP) billions of USD does Israel have?
CREATE TABLE table_2248784_4 (country VARCHAR)
SELECT wednesday FROM table_18173916_8 WHERE friday = "307 VS."
which episode was Transmitted on wednesday if the episode of "307 vs." was transmitted on friday?
CREATE TABLE table_18173916_8 (wednesday VARCHAR, friday 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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code
i need to make reservations from DENVER to BOSTON
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 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 dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) 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 ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) 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 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 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 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 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_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code 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 )
SELECT COUNT(rank_asia) FROM table_2248784_4 WHERE rank_mideast = 1
How many asian rank have 1 as a mideast rank?
CREATE TABLE table_2248784_4 (rank_asia VARCHAR, rank_mideast VARCHAR)
SELECT scoring_average FROM table_18198579_6 WHERE best_finish = "T35"
Name the scoring average for best finsih being t35
CREATE TABLE table_18198579_6 (scoring_average VARCHAR, best_finish VARCHAR)
SELECT MAX(points) FROM table_name_28 WHERE winnings = "$133,386"
Which driver has the highest point total after winning $133,386?
CREATE TABLE table_name_28 ( points INTEGER, winnings VARCHAR )
SELECT gdp_world_rank FROM table_2249029_1 WHERE asian_rank = 15
Name the gdp world rank for asian rank being 15
CREATE TABLE table_2249029_1 (gdp_world_rank VARCHAR, asian_rank VARCHAR)
SELECT COUNT(top_10s) FROM table_18198579_6 WHERE scoring_rank = "9"
Name the number of top 10s for scoring rank of 9
CREATE TABLE table_18198579_6 (top_10s VARCHAR, scoring_rank VARCHAR)
SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT outputevents.itemid FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 10855)) AND DATETIME(outputevents.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month') AND STRFTIME('%d', outputevents.charttime) = '25' ORDER BY outputevents.charttime LIMIT 1)
what was the name of the output which patient 10855 had for the first time on this month/25?
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 cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto 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 chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_labitems ( row_id number, itemid number, label 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 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 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 procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE diagnoses_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 outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number )
SELECT gdp_per_capita FROM table_2249029_1 WHERE gdp_world_rank = "131"
Name the gdp per capita for world rank being 131
CREATE TABLE table_2249029_1 (gdp_per_capita VARCHAR, gdp_world_rank VARCHAR)
SELECT total FROM table_182298_5 WHERE mens_open = 7
How many are the total winners if 7 won the Men's Open?
CREATE TABLE table_182298_5 (total VARCHAR, mens_open VARCHAR)
SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 88558) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'red blood cells') AND DATETIME(labevents.charttime) <= DATETIME(CURRENT_TIME(), '-38 month') ORDER BY labevents.valuenum, labevents.charttime DESC LIMIT 1
when was the last time until 38 months ago that patient 88558 had the minimum red blood cells value?
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) 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 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 d_labitems ( row_id number, itemid number, label text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name 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 procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom 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 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 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 outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number )
SELECT gdp_world_rank FROM table_2249029_1 WHERE asian_rank = 20
Name the gdp world rank for asian rank being 20
CREATE TABLE table_2249029_1 (gdp_world_rank VARCHAR, asian_rank VARCHAR)
SELECT COUNT(mens_open) FROM table_182298_5 WHERE country = "Sweden"
How many won the Men's Open if the players are from Sweden?
CREATE TABLE table_182298_5 (mens_open VARCHAR, country VARCHAR)
SELECT planet FROM table_14850099_18 WHERE cardinal_direction = "South"
What is the planet associated with the direction of south?
CREATE TABLE table_14850099_18 ( planet VARCHAR, cardinal_direction VARCHAR )
SELECT MAX(world_rank) FROM table_2249029_1 WHERE asian_rank = 31
Name the most world rank for asian rank being 31
CREATE TABLE table_2249029_1 (world_rank INTEGER, asian_rank VARCHAR)
SELECT total FROM table_182298_5 WHERE country = "South Korea"
How many are the total winners from South Korea?
CREATE TABLE table_182298_5 (total VARCHAR, country VARCHAR)
SELECT "Lead" FROM table_34775 WHERE "Second" = 'nkeiruka ezekh'
Who is the lead for the team with Nkeiruka Ezekh as second?
CREATE TABLE table_34775 ( "Nation" text, "Skip" text, "Third" text, "Second" text, "Lead" text, "Alternate" text )
SELECT MIN(rank_subcontinent) FROM table_2248784_3 WHERE country = "Bangladesh"
Name the least rank subcontinent for bangladesh
CREATE TABLE table_2248784_3 (rank_subcontinent INTEGER, country VARCHAR)
SELECT MIN(p) FROM table_18254488_2 WHERE player = "Shaun Maloney"
When shaun maloney is the player what is the lowest p?
CREATE TABLE table_18254488_2 (p INTEGER, player VARCHAR)
SELECT "Suits" FROM table_33186 WHERE "Material or Non-material" = 'no' AND "Opponents" = 'either' AND "Positional or Automatic" = 'positional'
Which suits have no material or non-material, either opponent, and are positional?
CREATE TABLE table_33186 ( "Positional or Automatic" text, "Opponents" text, "Suits" text, "Material or Non-material" text, "Count Rectified" text )
SELECT rank_world FROM table_2248784_3 WHERE rank_subcontinent = 7
Name the rank world for 7 rank subcontinent
CREATE TABLE table_2248784_3 (rank_world VARCHAR, rank_subcontinent VARCHAR)
SELECT MAX(uefa_champions_league) FROM table_18254488_2
What is the highest amount of uefa champion leagues?
CREATE TABLE table_18254488_2 (uefa_champions_league INTEGER)
SELECT school_colors FROM table_name_66 WHERE main_campus_location = "overland park"
What are the school colors for the college whose main campus is overland park?
CREATE TABLE table_name_66 ( school_colors VARCHAR, main_campus_location VARCHAR )
SELECT 2011 AS _gdp__ppp__billions_of_usd FROM table_2248784_3 WHERE country = "Pakistan"
Name the 2011 gdp for pakistan
CREATE TABLE table_2248784_3 (country VARCHAR)
SELECT MIN(league_cup) FROM table_18254488_2 WHERE player = "Koki Mizuno"
When koki mizuno is the player what is the lowest league cup?
CREATE TABLE table_18254488_2 (league_cup INTEGER, player VARCHAR)
SELECT "Tracking Method" FROM table_45903 WHERE "Latest stable release" = '6.0'
Which tracking method has a latest stable release of 6.0?
CREATE TABLE table_45903 ( "Name" text, "Platform" text, "Supported databases" text, "Tracking Method" text, "Latest stable release" text, "License" text )
SELECT 2011 AS _gdp__ppp__billions_of_usd FROM table_2248784_3 WHERE rank_world = 65
Name the 2011 gdp for 65 rank world
CREATE TABLE table_2248784_3 (rank_world VARCHAR)
SELECT COUNT(position) FROM table_18254488_2 WHERE player = "Koki Mizuno"
When koki mizuno is the player how man positions are there?
CREATE TABLE table_18254488_2 (position VARCHAR, player VARCHAR)
SELECT guest_host FROM table_name_73 WHERE episode_number = 5
What is the name of the Guest Host for Episode Number of 5?
CREATE TABLE table_name_73 ( guest_host VARCHAR, episode_number VARCHAR )
SELECT COUNT(rank_world) FROM table_2248784_3 WHERE country = "Bhutan"
Name the number of rank world for bhutan
CREATE TABLE table_2248784_3 (rank_world VARCHAR, country VARCHAR)
SELECT COUNT(written_by) FROM table_18268826_1 WHERE us_viewers__million_ = "3.24"
How many episodes by different writers were seen by 3.24 million people in the US?
CREATE TABLE table_18268826_1 (written_by VARCHAR, us_viewers__million_ VARCHAR)
SELECT COUNT(country) FROM table_21907770_4 WHERE versus = "India"
How many times was the opponent country India?
CREATE TABLE table_21907770_4 ( country VARCHAR, versus VARCHAR )
SELECT COUNT(world_rank) FROM table_2248991_2 WHERE nation = "Nigeria"
How many items were listed under world rank under the nation of Nigeria?
CREATE TABLE table_2248991_2 (world_rank VARCHAR, nation VARCHAR)
SELECT MAX(no_in_season) FROM table_18268826_1 WHERE us_viewers__million_ = "3.19"
What's the season number of the episode viewed by 3.19 million people in the US?
CREATE TABLE table_18268826_1 (no_in_season INTEGER, us_viewers__million_ VARCHAR)
SELECT demographic.admittime, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "2560"
what is admission time and procedure short title of subject id 2560?
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 ) 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 )
SELECT COUNT(gdp_per_capita) FROM table_2248991_2 WHERE nation = "Burkina Faso"
How many items are listed under gdp per capita under the nation of Burkina Faso?
CREATE TABLE table_2248991_2 (gdp_per_capita VARCHAR, nation VARCHAR)
SELECT written_by FROM table_18268826_1 WHERE us_viewers__million_ = "3.25"
Who's the writer of the episode seen by 3.25 million people in the US?
CREATE TABLE table_18268826_1 (written_by VARCHAR, us_viewers__million_ VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "LONG TERM CARE HOSPITAL"
provide the number of patients whose discharge location is long term care hospital?
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 ) 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 )
SELECT MIN(total_gdp_world_rank) FROM table_2248991_2 WHERE gdp_per_capita = "$1,163"
What is the total gdp world rank when the gdp per capita was listed at $1,163?
CREATE TABLE table_2248991_2 (total_gdp_world_rank INTEGER, gdp_per_capita VARCHAR)
SELECT directed_by FROM table_18268826_1 WHERE us_viewers__million_ = "3.93"
Who directed the episode seen by 3.93 million people in the US?
CREATE TABLE table_18268826_1 (directed_by VARCHAR, us_viewers__million_ VARCHAR)
SELECT DEPT_CODE, SUM(T1.CRS_CREDIT) FROM COURSE AS T1 JOIN CLASS AS T2 ON T1.CRS_CODE = T2.CRS_CODE GROUP BY T1.DEPT_CODE
Give me a histogram for what are the total number of credits offered by each department?
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 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 DEPARTMENT ( DEPT_CODE varchar(10), DEPT_NAME varchar(30), SCHOOL_CODE varchar(8), EMP_NUM int, DEPT_ADDRESS varchar(20), DEPT_EXTENSION varchar(4) ) CREATE TABLE ENROLL ( CLASS_CODE varchar(5), STU_NUM int, ENROLL_GRADE varchar(50) )
SELECT MIN(world_rank) FROM table_2249087_1 WHERE south_american_rank = 3
Name the least world rank for south american rank 3
CREATE TABLE table_2249087_1 (world_rank INTEGER, south_american_rank VARCHAR)
SELECT ticket_price_s_ FROM table_18277458_2 WHERE date_s_ = "August 7, 1987"
How much do the tickets cost for August 7, 1987?
CREATE TABLE table_18277458_2 (ticket_price_s_ VARCHAR, date_s_ VARCHAR)
SELECT COUNT(audition_city) FROM table_27615445_1 WHERE episode_air_date = "June 24, 2010"
How many audition city's are there with an episode air date of June 24, 2010?
CREATE TABLE table_27615445_1 ( audition_city VARCHAR, episode_air_date VARCHAR )
SELECT MIN(south_american_rank) FROM table_2249087_1 WHERE nation = "Venezuela"
Name the south american rank for venezuela
CREATE TABLE table_2249087_1 (south_american_rank INTEGER, nation VARCHAR)
SELECT ticket_sold___available FROM table_18277458_2 WHERE venue = "Carver-Hawkeye Arena"
How many tickets are sold for the Carver-Hawkeye Arena?
CREATE TABLE table_18277458_2 (ticket_sold___available VARCHAR, venue VARCHAR)
SELECT "Incumbent" FROM table_18348 WHERE "District" = 'Texas 12'
Name the incumbent for district texas 12
CREATE TABLE table_18348 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
SELECT COUNT(weight) FROM table_22496374_1 WHERE home_town = "San Francisco, CA"
How many weight stats are there for players from San Francisco, CA?
CREATE TABLE table_22496374_1 (weight VARCHAR, home_town VARCHAR)
SELECT no FROM table_1827690_4 WHERE elected = "1462/63"
When 1462/63 was the elected what was the no.?
CREATE TABLE table_1827690_4 (no VARCHAR, elected VARCHAR)
SELECT "year" FROM table_203_763 WHERE "position" = 1
in what years did ramon gonzalez come in first place ?
CREATE TABLE table_203_763 ( id number, "year" number, "competition" text, "venue" text, "position" text, "notes" text )
SELECT MAX(_number) FROM table_22496374_1 WHERE name = "Rickie Winslow"
What was rickie winslow's number?
CREATE TABLE table_22496374_1 (_number INTEGER, name VARCHAR)
SELECT assembled FROM table_1827690_4 WHERE elected = "1472"
When 1472 was the elected when was the assembled?
CREATE TABLE table_1827690_4 (assembled VARCHAR, elected VARCHAR)
SELECT "Founded" FROM table_59509 WHERE "School" = 'airds high school'
What is the year Airds High School was founded?
CREATE TABLE table_59509 ( "School" text, "Suburb/Town" text, "Years" text, "Founded" real, "Website" text )
SELECT COUNT(height) FROM table_22496374_1 WHERE home_town = "Lagos, Nigeria"
How many height entries are there for players from lagos, nigeria?
CREATE TABLE table_22496374_1 (height VARCHAR, home_town VARCHAR)
SELECT COUNT(scores_by_each_individual_judge) FROM table_18278508_6 WHERE co_contestant__yaar_vs_pyaar_ = "Mukul Dev"
How many different combinations of scores by individual judges were given to the contestant competing against Mukul Dev?
CREATE TABLE table_18278508_6 (scores_by_each_individual_judge VARCHAR, co_contestant__yaar_vs_pyaar_ VARCHAR)
SELECT MAX(demographic.age) FROM demographic WHERE demographic.days_stay = "11" AND demographic.dod_year < "2154.0"
what is maximum age of patients whose days of hospital stay is 11 and year of death is less than 2154?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob 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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT home_town FROM table_22496374_1 WHERE high_school = "Alvin"
What is the hometown of the players from alvin high school?
CREATE TABLE table_22496374_1 (home_town VARCHAR, high_school VARCHAR)
SELECT position FROM table_18278508_6 WHERE main_contestant = "Kashmira Shah" AND date_performed = "August 14"
What was Kashmira Shah's position on August 14?
CREATE TABLE table_18278508_6 (position VARCHAR, main_contestant VARCHAR, date_performed VARCHAR)
SELECT COUNT("Rank") FROM table_69894 WHERE "County" = 'kilkenny' AND "Tally" = '0-14'
With a Tally of 0-14, what is the Rank in Kilkenny County?
CREATE TABLE table_69894 ( "Rank" real, "Player" text, "County" text, "Tally" text, "Total" real, "Opposition" text )
SELECT COUNT(height) FROM table_22496374_1 WHERE high_school = "Bayside"
How many height entries are there for players from bayside high school?
CREATE TABLE table_22496374_1 (height VARCHAR, high_school VARCHAR)
SELECT total_score_week FROM table_18278508_6 WHERE date_performed = "August 14" AND position = "Bottom 2"
What was the total score / week of the contestant who placed in the bottom 2 on august 14?
CREATE TABLE table_18278508_6 (total_score_week VARCHAR, date_performed VARCHAR, position VARCHAR)
SELECT COUNT("rank") FROM table_204_735
how many consecutive rankings are listed ?
CREATE TABLE table_204_735 ( id number, "rank" number, "team" text, "names" text, "time" text, "qualification" text )
SELECT COUNT(reason_for_change) FROM table_225095_4 WHERE successor = "Edward Hempstead"
How many reasons for change were listed when Edward Hempstead was the successor?
CREATE TABLE table_225095_4 (reason_for_change VARCHAR, successor VARCHAR)
SELECT scores_by_each_individual_judge FROM table_18278508_6 WHERE main_contestant = "Karanvir Bohra" AND date_performed = "August 13"
What were the scores by the individual judges for Karanvir Bohra on August 13?
CREATE TABLE table_18278508_6 (scores_by_each_individual_judge VARCHAR, main_contestant VARCHAR, date_performed VARCHAR)
SELECT (SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 10431)) AND STRFTIME('%y-%m-%d', inputevents_cv.charttime) <= '2105-12-00') - (SELECT SUM(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 10431)) AND STRFTIME('%y-%m-%d', outputevents.charttime) <= '2105-12-00')
give me the difference between the total input of patient 10431 and the output of the patient until 12/00/2105.
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) 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 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 inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) 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 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_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 diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE procedures_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 cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) 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 )
SELECT COUNT(vacator) FROM table_225095_4 WHERE district = "North Carolina 3rd"
How many Vacators were listed when the district was North Carolina 3rd?
CREATE TABLE table_225095_4 (vacator VARCHAR, district VARCHAR)
SELECT COUNT(main_contestant) FROM table_18278508_4 WHERE position = "Safe" AND co_contestant__yaar_vs_pyaar_ = "Tina Parekh"
Name the total number of main contestants for safe position for tina parekh
CREATE TABLE table_18278508_4 (main_contestant VARCHAR, position VARCHAR, co_contestant__yaar_vs_pyaar_ VARCHAR)
SELECT COUNT(rank_timeslot_) FROM table_27987623_4 WHERE airdate = "March 30, 2011"
what is the total rank on airdate march 30, 2011?
CREATE TABLE table_27987623_4 ( rank_timeslot_ VARCHAR, airdate VARCHAR )
SELECT vacator FROM table_225095_4 WHERE successor = "Shadrach Bond"
Who was the vacator when Shadrach Bond was the successor?
CREATE TABLE table_225095_4 (vacator VARCHAR, successor VARCHAR)
SELECT status FROM table_18278508_4 WHERE main_contestant = "Karanvir Bohra" AND date_performed = "July 30"
Name the status for karanvir bohra and date performed being july 30
CREATE TABLE table_18278508_4 (status VARCHAR, main_contestant VARCHAR, date_performed VARCHAR)
SELECT DISTINCT flight.flight_id FROM airport_service, city, flight, flight_stop WHERE city.city_code = airport_service.city_code AND city.city_name = 'ATLANTA' AND flight_stop.arrival_time < 1200 AND flight_stop.stop_airport = airport_service.airport_code AND flight.flight_id = flight_stop.flight_id
what flights stop in ATLANTA before 1200
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 dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) 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 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 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 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 days ( days_code varchar, day_name varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time 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 equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar )
SELECT date_successor_seated FROM table_225096_4 WHERE reason_for_change = "Until August 2, 1813"
When was the successor who got his seat because of "until august 2, 1813" seated?
CREATE TABLE table_225096_4 (date_successor_seated VARCHAR, reason_for_change VARCHAR)
SELECT province, _community FROM table_18349697_1 WHERE age = 27
What is the province where the age of the contestant is 27?
CREATE TABLE table_18349697_1 (province VARCHAR, _community VARCHAR, age VARCHAR)
SELECT Name, Weight FROM people
A bar chart shows the distribution of Name and Weight .
CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate real ) CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight real )
SELECT date_successor_seated FROM table_225098_4 WHERE district = "Massachusetts 20th"
The successor for the Massachusetts 20th district was seated on what date?
CREATE TABLE table_225098_4 (date_successor_seated VARCHAR, district VARCHAR)
SELECT no_in_season FROM table_18367694_3 WHERE directed_by = "Joan Tewkesbury"
When joan tewkesbury is the director what is the number in seasons?
CREATE TABLE table_18367694_3 (no_in_season VARCHAR, directed_by VARCHAR)
SELECT MAX("Drawn") FROM table_38237 WHERE "Points" = '14' AND "Games" < '7'
What is the highest number of draws with 14 points and less than 7 games?
CREATE TABLE table_38237 ( "Games" real, "Drawn" real, "Lost" real, "Points difference" text, "Points" real )
SELECT vacator FROM table_225098_4 WHERE district = "Pennsylvania 6th"
Who vacated the Pennsylvania 6th district?
CREATE TABLE table_225098_4 (vacator VARCHAR, district VARCHAR)
SELECT no_in_series FROM table_18428024_3 WHERE directed_by = "John Banas"
How many series did John Banas direct?
CREATE TABLE table_18428024_3 (no_in_series VARCHAR, directed_by VARCHAR)
SELECT military_deaths FROM table_name_38 WHERE total_casualties = "531"
How many members of the military died in the conflict that had a total of 531 casualties?
CREATE TABLE table_name_38 ( military_deaths VARCHAR, total_casualties VARCHAR )
SELECT successor FROM table_225099_3 WHERE state__class_ = "Maine (2)"
Who was the successor for the state of Maine (2) ?
CREATE TABLE table_225099_3 (successor VARCHAR, state__class_ VARCHAR)
SELECT COUNT(original_air_date) FROM table_18428024_3 WHERE no_in_series = 360
What is the original air date in series 360?
CREATE TABLE table_18428024_3 (original_air_date VARCHAR, no_in_series VARCHAR)
SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%Advanced Al Techniques%' OR name LIKE '%Advanced Al Techniques%') AND credits = 4
What courses on Advanced Al Techniques have 4 credits ?
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 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 offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) 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 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 gsi ( course_offering_id int, student_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text 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 course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar )
SELECT date_of_successors_formal_installation FROM table_225099_3 WHERE reason_for_change = "Resigned December 4, 1819"
What is the date of successors formal installation when the reason for change is resigned december 4, 1819?
CREATE TABLE table_225099_3 (date_of_successors_formal_installation VARCHAR, reason_for_change VARCHAR)
SELECT coach FROM table_18461635_1 WHERE location = "Leicester"
Who is the coach of the team in Leicester?
CREATE TABLE table_18461635_1 (coach VARCHAR, location VARCHAR)
SELECT COUNT("TD's") FROM table_51905 WHERE "Long" > '6' AND "Car." < '4'
Name the total number of TD's for long more than 6 and cars less than 4
CREATE TABLE table_51905 ( "Player" text, "Car." real, "Yards" real, "Avg." real, "TD's" real, "Long" real )
SELECT COUNT(date_of_successors_formal_installation) FROM table_225099_3 WHERE successor = "John W. Walker (DR)"
How many entries are shown for date of successors formal installation where successor is john w. walker (dr)?
CREATE TABLE table_225099_3 (date_of_successors_formal_installation VARCHAR, successor VARCHAR)
SELECT team FROM table_18461635_1 WHERE county = "Derbyshire"
What is the name of the team from Derbyshire county?
CREATE TABLE table_18461635_1 (team VARCHAR, county VARCHAR)
SELECT results FROM table_1341453_15 WHERE district = "Illinois 7"
What was the result in Illinois 7?
CREATE TABLE table_1341453_15 ( results VARCHAR, district VARCHAR )
SELECT state__class_ FROM table_225099_3 WHERE reason_for_change = "Resigned May 15, 1820"
what is the state for reason for change is resigned may 15, 1820?
CREATE TABLE table_225099_3 (state__class_ VARCHAR, reason_for_change VARCHAR)
SELECT captain FROM table_18461635_1 WHERE team = "Gloucestershire Gladiators"
Who is the captain of the Gloucestershire Gladiators?
CREATE TABLE table_18461635_1 (captain VARCHAR, team VARCHAR)
SELECT COUNT(*) FROM medication WHERE medication.drugname = 'definity' AND DATETIME(medication.drugstarttime) >= DATETIME(CURRENT_TIME(), '-4 year')
what were the number of definity prescriptions that were made since 4 years ago?
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 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 treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time )
SELECT trophy_presentation FROM table_22514845_4 WHERE year = 1987
Who is the trophy presentation in the year 1987?
CREATE TABLE table_22514845_4 (trophy_presentation VARCHAR, year VARCHAR)
SELECT captain FROM table_18461635_1 WHERE location = "Southampton"
Who is the captain of the team in Southampton?
CREATE TABLE table_18461635_1 (captain VARCHAR, location VARCHAR)
SELECT COUNT("Socialist") FROM table_22654 WHERE "Lead" = '12.6%'
How many socialist have a lead of 12.6%?
CREATE TABLE table_22654 ( "Date Released" text, "Polling institute" text, "Social Democratic" text, "Socialist" text, "Green-Communist" text, "Democratic and Social Centre" text, "Lead" text )