answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT SUM(drawn) FROM table_name_59 WHERE lost < 4 AND points = 8
How many total drawn has less than 4 lost and 8 points?
CREATE TABLE table_name_59 (drawn INTEGER, lost VARCHAR, points VARCHAR)
SELECT "Opponent" FROM table_53593 WHERE "Round" = '1'
Which opponent had round 1?
CREATE TABLE table_53593 ( "Date" text, "Tournament" text, "Round" text, "Ground" text, "Opponent" text, "Score 1" text )
SELECT MIN(points) FROM table_27539808_5 WHERE game = 32
What is the lowest number of points for game 32?
CREATE TABLE table_27539808_5 (points INTEGER, game VARCHAR)
SELECT SUM(lost) FROM table_name_5 WHERE games < 7
How many lost are there before game 7?
CREATE TABLE table_name_5 (lost INTEGER, games INTEGER)
SELECT bronze FROM table_name_27 WHERE year = "1998"
How many bronze medals were won in 1998?
CREATE TABLE table_name_27 ( bronze VARCHAR, year VARCHAR )
SELECT location_attendance FROM table_27539808_5 WHERE december = 1
What is the location and attendance total from the game on December 1?
CREATE TABLE table_27539808_5 (location_attendance VARCHAR, december VARCHAR)
SELECT COUNT(touchdowns) FROM table_name_65 WHERE net_yds < 4495 AND long < 80 AND yds_att < 5.5
How many touchdowns did the player with less than 4495 yards, long of less than 80, and yds/att less than 5.5 have?
CREATE TABLE table_name_65 (touchdowns VARCHAR, yds_att VARCHAR, net_yds VARCHAR, long VARCHAR)
SELECT "Winnings" FROM table_77725 WHERE "Make" = 'chevrolet' AND "Car #" > '29' AND "Points" = '102'
What were the winnings for the Chevrolet with a number larger than 29 and scored 102 points?
CREATE TABLE table_77725 ( "Driver" text, "Car #" real, "Make" text, "Points" real, "Laps" real, "Winnings" text )
SELECT directed_by FROM table_27547668_3 WHERE viewers = 899000
Who directed the episode with 899000 viewers?
CREATE TABLE table_27547668_3 (directed_by VARCHAR, viewers VARCHAR)
SELECT SUM(attempts) FROM table_name_66 WHERE start > 1997 AND yds_att = 5 AND rank > 1
How many attempts did the player ranking with a number higher than 1, who started after 1997 and had yds/att of 5 have?
CREATE TABLE table_name_66 (attempts INTEGER, rank VARCHAR, start VARCHAR, yds_att VARCHAR)
SELECT prescriptions.icustay_id, prescriptions.formulary_drug_cd FROM prescriptions WHERE prescriptions.subject_id = "65652"
what is the icu stay id and drug code of subject id 65652?
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 ) 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 MIN(_number) FROM table_27547668_3
What is the smallest numbered episode in the series listed?
CREATE TABLE table_27547668_3 (_number INTEGER)
SELECT AVG(net_yds) FROM table_name_59 WHERE long = 68 AND start > 1984
What is the average net yds for the player who had a long of 68 and started after 1984?
CREATE TABLE table_name_59 (net_yds INTEGER, long VARCHAR, start VARCHAR)
SELECT "2010" FROM table_11629 WHERE "2008" = 'lq' AND "2011" = '2r'
What was the 2010 result for a 2008 result of LQ and 2011 result of 2R?
CREATE TABLE table_11629 ( "Tournament" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text, "Career Win\u2013Loss" text )
SELECT viewers FROM table_27547668_3 WHERE _number = 13
How many people watched episode number 13?
CREATE TABLE table_27547668_3 (viewers VARCHAR, _number VARCHAR)
SELECT MIN(attempts) FROM table_name_57 WHERE rank > 3 AND start > 1984 AND yds_att < 6.1
What is the lowest number of attempts for the player with a rank number larger than 3, who started after 1984 and had less than 6.1 yds/att?
CREATE TABLE table_name_57 (attempts INTEGER, yds_att VARCHAR, rank VARCHAR, start VARCHAR)
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT microlab.patientunitstayid FROM microlab WHERE microlab.culturesite = 'urine, voided specimen' AND STRFTIME('%y', microlab.culturetakentime) = '2105')
how many people have had microbiological tests in their urine, voided specimen in 2105?
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 lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime 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 medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time )
SELECT no FROM table_27547668_3 WHERE written_by = "Greg Nelson" AND directed_by = "Keith Samples"
What episode number in the season was written by Greg nelson and directed by Keith samples?
CREATE TABLE table_27547668_3 (no VARCHAR, written_by VARCHAR, directed_by VARCHAR)
SELECT film FROM table_name_1 WHERE year < 2002
Which film was made before 2002?
CREATE TABLE table_name_1 (film VARCHAR, year INTEGER)
SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE "4:%" UNION SELECT song_name FROM song WHERE languages = "english"
List the names of all songs that have 4 minute duration or are in English.
CREATE TABLE song ( song_name VARCHAR, f_id VARCHAR ) CREATE TABLE files ( f_id VARCHAR, duration VARCHAR )
SELECT title FROM table_27547668_2 WHERE prod_code = 102
What is the title of the episode with production code 102?
CREATE TABLE table_27547668_2 (title VARCHAR, prod_code VARCHAR)
SELECT film FROM table_name_68 WHERE role = "taylor"
Which film has a role named Taylor?
CREATE TABLE table_name_68 (film VARCHAR, role 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 = 'NEWARK' AND flight.departure_time > 2300 AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'SAN FRANCISCO' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code
show me the flights from SAN FRANCISCO to NEWARK that leave after 2300
CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) 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 dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt 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 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 month ( month_number int, month_name text ) 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 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 food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE airline ( airline_code varchar, airline_name text, note 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 code_description ( code varchar, description 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 equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) 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 )
SELECT original_airdate FROM table_27547668_2 WHERE _number = 6
What is the original air date of # 6?
CREATE TABLE table_27547668_2 (original_airdate VARCHAR, _number VARCHAR)
SELECT notes FROM table_name_3 WHERE film = "touch & go"
What notes does the film Touch & go have?
CREATE TABLE table_name_3 (notes VARCHAR, film VARCHAR)
SELECT "Week 5" FROM table_59381 WHERE "Week 2" = '36.80' AND "Week 4" = '39.75'
What is week 5 when week 2 is 36.80, and week 4 is 39.75?
CREATE TABLE table_59381 ( "Week 2" text, "Week 3" text, "Week 4" text, "Week 5" text, "Week 6" text, "Week 7" text )
SELECT original_airdate FROM table_27547668_2 WHERE viewers = 908000
What is the original air date of the episode with 908000 viewers?
CREATE TABLE table_27547668_2 (original_airdate VARCHAR, viewers VARCHAR)
SELECT language FROM table_name_46 WHERE film = "marion bridge"
What language is the film Marion Bridge?
CREATE TABLE table_name_46 (language VARCHAR, film VARCHAR)
SELECT "Club" FROM table_37171 WHERE "Tries for" = 'tries for'
What club has tries for in the category tries for?
CREATE TABLE table_37171 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text )
SELECT COUNT(season) AS premiere FROM table_27553627_2 WHERE viewers__in_millions_ = "15.27"
How many season premieres had 15.27 million viewers?
CREATE TABLE table_27553627_2 (season VARCHAR, viewers__in_millions_ VARCHAR)
SELECT language FROM table_name_90 WHERE role = "annabelle"
What language is the film with a character named Annabelle?
CREATE TABLE table_name_90 (language VARCHAR, role VARCHAR)
SELECT "Womens Doubles" FROM table_30328 WHERE "Womens Singles" = 'Ding Ning'
Who was the womens double winner when the womens singles winner was Ding Ning?
CREATE TABLE table_30328 ( "Year Location" text, "Mens Singles" text, "Womens Singles" text, "Mens Doubles" text, "Womens Doubles" text )
SELECT season AS finale FROM table_27553627_2 WHERE rank = "20th"
When was the season finale that ranked 20th?
CREATE TABLE table_27553627_2 (season VARCHAR, rank VARCHAR)
SELECT MIN(pick) FROM table_name_83 WHERE school = "furman" AND round < 8
What is the lowest pick from the Furman School that is a round smaller than 8?
CREATE TABLE table_name_83 (pick INTEGER, school VARCHAR, round VARCHAR)
SELECT MAX(2 AS nd) FROM table_11570261_6 WHERE cuts_made = "11"
How many times did Tiger get second in the year where there were 11 cuts?
CREATE TABLE table_11570261_6 ( cuts_made VARCHAR )
SELECT tv_season FROM table_27553627_2 WHERE viewers__in_millions_ = "14.54"
What tv season year had 14.54 million viewers?
CREATE TABLE table_27553627_2 (tv_season VARCHAR, viewers__in_millions_ VARCHAR)
SELECT COUNT(round) FROM table_name_59 WHERE school = "morris brown"
What is the total number of round picks from the Morris Brown School?
CREATE TABLE table_name_59 (round VARCHAR, school VARCHAR)
SELECT meter_600, meter_100 FROM swimmer ORDER BY meter_600 DESC
Return a bar chart about the distribution of meter_600 and meter_100 , and could you order by the x-axis from high to low please?
CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, meter_700 text, Time text ) CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int )
SELECT MAX(episodes) FROM table_27553627_2 WHERE viewers__in_millions_ = "14.41"
What episode number had 14.41 million viewers?
CREATE TABLE table_27553627_2 (episodes INTEGER, viewers__in_millions_ VARCHAR)
SELECT COUNT(round) FROM table_name_58 WHERE player = "rell tipton"
What is the total number of rounds for the player of Rell Tipton?
CREATE TABLE table_name_58 (round VARCHAR, player VARCHAR)
SELECT lost FROM table_name_40 WHERE try_bonus = "5" AND points_against = "298"
What is the lost when the try bonus is 5, and points against is 298?
CREATE TABLE table_name_40 ( lost VARCHAR, try_bonus VARCHAR, points_against VARCHAR )
SELECT MIN(rnd) FROM table_27561505_2 WHERE circuit = "Laguna Seca"
What is the minimum rnd at Laguna Seca?
CREATE TABLE table_27561505_2 (rnd INTEGER, circuit VARCHAR)
SELECT date FROM table_name_44 WHERE game = 3
On what date was game 3 played?
CREATE TABLE table_name_44 (date VARCHAR, game VARCHAR)
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', inputevents_cv.charttime)) 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 = 19428) AND icustays.outtime IS NULL) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'd 12.5 w' AND d_items.linksto = 'inputevents_cv') ORDER BY inputevents_cv.charttime DESC LIMIT 1
how many days have passed since patient 19428 had a d 12.5 w intake for the last time on the current intensive care unit visit?
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 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 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 d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) 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 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 ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) 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 cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text )
SELECT COUNT(gt_20_winning_team) FROM table_27561503_2 WHERE sports_20_winning_team = "#16 Trans Ocean Motors" AND circuit = "Castle Rock"
Name the gt 2.0 winning team for sports 2.0 winning team for #16 trans ocean motors for castle rock
CREATE TABLE table_27561503_2 (gt_20_winning_team VARCHAR, sports_20_winning_team VARCHAR, circuit VARCHAR)
SELECT game FROM table_name_8 WHERE date = "april 22"
Which game took place on April 22?
CREATE TABLE table_name_8 (game VARCHAR, date VARCHAR)
SELECT "Team" FROM table_45758 WHERE "Date" = 'december 30'
WHAT IS THE TEAM FOR DECEMBER 30?
CREATE TABLE table_45758 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT COUNT(results) FROM table_27561503_2 WHERE sports_20_winning_team = "#23 Lotus"
Name the results for #23 lotus
CREATE TABLE table_27561503_2 (results VARCHAR, sports_20_winning_team VARCHAR)
SELECT series FROM table_name_1 WHERE game = 1
What was the standing in the series after game 1?
CREATE TABLE table_name_1 (series VARCHAR, game VARCHAR)
SELECT "Serbian League East" FROM table_17593 WHERE "Serbian League Belgrade" = 'Kolubara'
What team was promoted in the Serbian League East in the same season when Kolubara was promoted in the Serbian League Belgrade?
CREATE TABLE table_17593 ( "Season" text, "Serbian League Belgrade" text, "Serbian League East" text, "Serbian League Vojvodina" text, "Serbian League West" text )
SELECT results FROM table_27561503_2 WHERE gt_20_winning_team = "Herb Wetanson"
Name results for herb wetanson
CREATE TABLE table_27561503_2 (results VARCHAR, gt_20_winning_team VARCHAR)
SELECT race FROM table_name_90 WHERE time = "1:24.35"
Which race had a time of 1:24.35?
CREATE TABLE table_name_90 (race VARCHAR, time VARCHAR)
SELECT archive FROM table_2102714_1 WHERE run_time = "24:05"
What is he archive for the episode with a run time of 24:05?
CREATE TABLE table_2102714_1 ( archive VARCHAR, run_time VARCHAR )
SELECT province FROM table_27592654_2 WHERE electorate = "Collingwood"
What was the province if the electorate was Collingwood?
CREATE TABLE table_27592654_2 (province VARCHAR, electorate VARCHAR)
SELECT date FROM table_name_98 WHERE group = "g1" AND venue = "flemington"
What was the date for the G1 group race at Flemington?
CREATE TABLE table_name_98 (date VARCHAR, group VARCHAR, venue VARCHAR)
SELECT COUNT("!Event") FROM table_66228 WHERE "Winner" = 'clay'
How many events did clay win?
CREATE TABLE table_66228 ( "!Event" real, "Round" text, "Surface" text, "Winner" text, "Opponent" text, "Result" text )
SELECT province FROM table_27592654_2 WHERE election_date = "5 Cannot handle non-empty timestamp argument! 1861"
What was the province with an election date of 5 cannot handle non-empty timestamp argument! 1861?
CREATE TABLE table_27592654_2 (province VARCHAR, election_date VARCHAR)
SELECT COUNT(weight__kg_) FROM table_name_42 WHERE race = "chelmsford stakes"
What was the combined weight in kilograms of the horses in the race at Chelmsford stakes?
CREATE TABLE table_name_42 (weight__kg_ VARCHAR, race VARCHAR)
SELECT COUNT("NHL team") FROM table_17456 WHERE "Player" = 'Bob Peppler'
How many teams did Bob Peppler play for?
CREATE TABLE table_17456 ( "Pick #" real, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text )
SELECT races FROM table_27582888_1 WHERE final_placing = "5th"
Name the races for final placing being 5th
CREATE TABLE table_27582888_1 (races VARCHAR, final_placing VARCHAR)
SELECT year FROM table_name_54 WHERE artist = "afro-dite"
In what year was the artist Afro-dite?
CREATE TABLE table_name_54 (year VARCHAR, artist VARCHAR)
SELECT MAX("Points") FROM table_22076 WHERE "Goals scored" = '47'
HOw many points where there when the number of goals scored was 47?
CREATE TABLE table_22076 ( "Position" real, "Club" text, "Games played" real, "Wins" real, "Draws" real, "Loses" real, "Goals scored" real, "Goals conceded" real, "Points" real )
SELECT MAX(poles) FROM table_27582888_1 WHERE podiums = 4
Name the post poles for 4 podiums
CREATE TABLE table_27582888_1 (poles INTEGER, podiums VARCHAR)
SELECT stadium FROM table_name_2 WHERE date = "december 23, 2001"
What stadium was the game held at on December 23, 2001?
CREATE TABLE table_name_2 (stadium VARCHAR, date VARCHAR)
SELECT "Writer" FROM table_40581 WHERE "Date" = 'january 1975'
What is the Writer with a Date that is january 1975?
CREATE TABLE table_40581 ( "Spoofed Title" text, "Actual Title" text, "Writer" text, "Artist" text, "Issue" real, "Date" text )
SELECT song_choice FROM table_27614571_1 WHERE theme = "Samba"
What was Barreto's song choice when the theme was samba?
CREATE TABLE table_27614571_1 (song_choice VARCHAR, theme VARCHAR)
SELECT record FROM table_name_52 WHERE date = "december 2, 2001"
What is the Record for the game held on December 2, 2001?
CREATE TABLE table_name_52 (record VARCHAR, date VARCHAR)
SELECT MAX("Nepalis admitted") FROM table_47310 WHERE "Sri Lankans admitted" > '5,520' AND "Bangladeshis admitted" > '2,715' AND "Pakistanis admitted" > '139,574'
What was the most Nepalis admitted when the number of Sri Lankans was more than 5,520, Bangladeshis was more than 2,715, and Pakistanis more than 139,574?
CREATE TABLE table_47310 ( "Year" text, "Indians admitted" real, "Pakistanis admitted" real, "Sri Lankans admitted" real, "Bangladeshis admitted" real, "Nepalis admitted" real )
SELECT song_choice FROM table_27614571_1 WHERE original_artist = "Patricia Marx"
What was Barreto's song choice where the original artist was Patricia Marx?
CREATE TABLE table_27614571_1 (song_choice VARCHAR, original_artist VARCHAR)
SELECT AVG(game) FROM table_name_24 WHERE attendance = "65,666"
What is the average Game where there were 65,666 in attendance?
CREATE TABLE table_name_24 (game INTEGER, attendance VARCHAR)
SELECT COUNT("Species") FROM table_16136 WHERE "Sepal width" = '3.4' AND "Sepal length" = '5.4'
Name the number of species with sepal width of 3.4 and sepal length of 5.4
CREATE TABLE table_16136 ( "Sepal length" text, "Sepal width" text, "Petal length" text, "Petal width" text, "Species" text )
SELECT week__number FROM table_27614571_1 WHERE original_artist = "Leila Pinheiro"
In which week # was the original artist of Barreto's song choice was Leila Pinheiro?
CREATE TABLE table_27614571_1 (week__number VARCHAR, original_artist VARCHAR)
SELECT feature FROM table_name_46 WHERE driving_force_ex = "25cm (10-inch)"
Driving Force EX of 25cm (10-inch) involves what feature?
CREATE TABLE table_name_46 (feature VARCHAR, driving_force_ex VARCHAR)
SELECT last_name, COUNT(last_name) FROM Maintenance_Engineers AS T1 JOIN Engineer_Skills AS T2 ON T1.engineer_id = T2.engineer_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id GROUP BY last_name ORDER BY last_name DESC
List the number of enginners and group by last name in a bar chart, and order bar in descending order.
CREATE TABLE Fault_Log ( fault_log_entry_id INTEGER, asset_id INTEGER, recorded_by_staff_id INTEGER, fault_log_entry_datetime DATETIME, fault_description VARCHAR(255), other_fault_details VARCHAR(255) ) CREATE TABLE Skills_Required_To_Fix ( part_fault_id INTEGER, skill_id INTEGER ) CREATE TABLE Fault_Log_Parts ( fault_log_entry_id INTEGER, part_fault_id INTEGER, fault_status VARCHAR(10) ) CREATE TABLE Maintenance_Contracts ( maintenance_contract_id INTEGER, maintenance_contract_company_id INTEGER, contract_start_date DATETIME, contract_end_date DATETIME, other_contract_details VARCHAR(255) ) CREATE TABLE Staff ( staff_id INTEGER, staff_name VARCHAR(255), gender VARCHAR(1), other_staff_details VARCHAR(255) ) CREATE TABLE Engineer_Skills ( engineer_id INTEGER, skill_id INTEGER ) CREATE TABLE Maintenance_Engineers ( engineer_id INTEGER, company_id INTEGER, first_name VARCHAR(50), last_name VARCHAR(50), other_details VARCHAR(255) ) CREATE TABLE Assets ( asset_id INTEGER, maintenance_contract_id INTEGER, supplier_company_id INTEGER, asset_details VARCHAR(255), asset_make VARCHAR(20), asset_model VARCHAR(20), asset_acquired_date DATETIME, asset_disposed_date DATETIME, other_asset_details VARCHAR(255) ) CREATE TABLE Third_Party_Companies ( company_id INTEGER, company_type VARCHAR(5), company_name VARCHAR(255), company_address VARCHAR(255), other_company_details VARCHAR(255) ) CREATE TABLE Part_Faults ( part_fault_id INTEGER, part_id INTEGER, fault_short_name VARCHAR(20), fault_description VARCHAR(255), other_fault_details VARCHAR(255) ) CREATE TABLE Skills ( skill_id INTEGER, skill_code VARCHAR(20), skill_description VARCHAR(255) ) CREATE TABLE Parts ( part_id INTEGER, part_name VARCHAR(255), chargeable_yn VARCHAR(1), chargeable_amount VARCHAR(20), other_part_details VARCHAR(255) ) CREATE TABLE Asset_Parts ( asset_id INTEGER, part_id INTEGER ) CREATE TABLE Engineer_Visits ( engineer_visit_id INTEGER, contact_staff_id INTEGER, engineer_id INTEGER, fault_log_entry_id INTEGER, fault_status VARCHAR(10), visit_start_datetime DATETIME, visit_end_datetime DATETIME, other_visit_details VARCHAR(255) )
SELECT MIN(year) FROM table_27611593_5
When did the earliest tournament happened?
CREATE TABLE table_27611593_5 (year INTEGER)
SELECT driving_force_gt FROM table_name_2 WHERE gt_force = "no" AND driving_force_pro = "no" AND g27_racing_wheel = "no"
GT Force of no, and a Driving Force Pro of no, and a G27 Racing Wheel of no has what driving force gt?
CREATE TABLE table_name_2 (driving_force_gt VARCHAR, g27_racing_wheel VARCHAR, gt_force VARCHAR, driving_force_pro VARCHAR)
SELECT COUNT(DISTINCT allergytype) FROM Allergy_type
How many different allergy types exist?
CREATE TABLE Allergy_type ( allergytype VARCHAR )
SELECT partner FROM table_27611593_5 WHERE score = "6–2, 3–6, 6–7 (7-9)"
Who was Petrova's partner where she scored 6–2, 3–6, 6–7 (7-9)?
CREATE TABLE table_27611593_5 (partner VARCHAR, score VARCHAR)
SELECT driving_force_gt FROM table_name_34 WHERE feature = "gear stick"
Feature of gear stick involves which driving force gt?
CREATE TABLE table_name_34 (driving_force_gt VARCHAR, feature VARCHAR)
SELECT AVG(attendance) FROM table_name_6 WHERE away = "marathon"
What was the average attendance when marathon was the away team?
CREATE TABLE table_name_6 ( attendance INTEGER, away VARCHAR )
SELECT opponents FROM table_27611593_5 WHERE partner = "Vania King"
Who were Petrova's opponents with Vania King?
CREATE TABLE table_27611593_5 (opponents VARCHAR, partner VARCHAR)
SELECT feature FROM table_name_64 WHERE driving_force_ex = "no" AND driving_force_gt = "yes" AND driving_force_pro = "yes"
Driving Force EX of no, and a Driving Force GT of yes, and a Driving Force Pro of yes has what feature?
CREATE TABLE table_name_64 (feature VARCHAR, driving_force_pro VARCHAR, driving_force_ex VARCHAR, driving_force_gt VARCHAR)
SELECT "Losses" FROM table_53800 WHERE "Appearances" < '16'
How many losses did the division who appeared less than 16 times have?
CREATE TABLE table_53800 ( "Conference" text, "Division" text, "Appearances" real, "Wins" real, "Losses" real )
SELECT written_by FROM table_27610775_1 WHERE prod_code = 211
Who wrote the episode with the production code 211?
CREATE TABLE table_27610775_1 (written_by VARCHAR, prod_code VARCHAR)
SELECT g27_racing_wheel FROM table_name_45 WHERE driving_force_ex = "no" AND driving_force_pro = "no" AND g25_racing_wheel = "no"
Driving Force EX of no, and a Driving Force Pro of no, and a G25 Racing Wheel of no involves which g27 racing wheel?
CREATE TABLE table_name_45 (g27_racing_wheel VARCHAR, g25_racing_wheel VARCHAR, driving_force_ex VARCHAR, driving_force_pro VARCHAR)
SELECT "Location Attendance" FROM table_1658 WHERE "Date" = 'December 9'
What was the location and the crowd attendance on December 9?
CREATE TABLE table_1658 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT MAX(prod_code) FROM table_27610775_1 WHERE directed_by = "Sean McNamara"
What is the maximum production code of the episode directed by Sean McNamara?
CREATE TABLE table_27610775_1 (prod_code INTEGER, directed_by VARCHAR)
SELECT driving_force_ex FROM table_name_87 WHERE gt_force = "yes" AND g27_racing_wheel = "16"
GT Force of yes, and a G27 Racing Wheel of 16 involves which driving force ex?
CREATE TABLE table_name_87 (driving_force_ex VARCHAR, gt_force VARCHAR, g27_racing_wheel VARCHAR)
SELECT title FROM table_name_46 WHERE artist = "tangorodrim" AND cat__number = "fsr006"
What is the title of the record with an artist of Tangorodrim, category number FSR006?
CREATE TABLE table_name_46 ( title VARCHAR, artist VARCHAR, cat__number 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 score FROM table_name_95 WHERE date = "october 7"
What is the score on october 7?
CREATE TABLE table_name_95 (score VARCHAR, date VARCHAR)
SELECT Nationality, COUNT(*) FROM host GROUP BY Nationality ORDER BY Nationality DESC
Bar chart x axis nationality y axis the total number, rank in desc by the x axis.
CREATE TABLE party_host ( Party_ID int, Host_ID int, Is_Main_in_Charge bool ) CREATE TABLE host ( Host_ID int, Name text, Nationality text, Age text ) CREATE TABLE party ( Party_ID int, Party_Theme text, Location text, First_year text, Last_year text, Number_of_hosts int )
SELECT episode_air_date FROM table_27615445_1 WHERE audition_venue = "Nego Quirido Sambadrome"
List all episode air dates that auditioned at Nego Quirido Sambadrome?
CREATE TABLE table_27615445_1 (episode_air_date VARCHAR, audition_venue VARCHAR)
SELECT SUM(attendance) FROM table_name_39 WHERE score = "17-13"
How many people went to the game that had 17-13?
CREATE TABLE table_name_39 (attendance INTEGER, score VARCHAR)
SELECT result FROM table_name_40 WHERE game < 37 AND streak = "lost 1" AND record = "4-9"
Which Result has a Game smaller than 37, and a Streak of lost 1, and a Record of 4-9?
CREATE TABLE table_name_40 ( result VARCHAR, record VARCHAR, game VARCHAR, streak VARCHAR )
SELECT episode_air_date FROM table_27615445_1 WHERE guest_fourth_judge = "Luiza Possi"
List all episode air dates where Luiza Possi was the guest fourth judge?
CREATE TABLE table_27615445_1 (episode_air_date VARCHAR, guest_fourth_judge VARCHAR)
SELECT MAX(rank) FROM table_name_56 WHERE code__iata_icao_ = "hkg/vhhh"
What is the highest rank for the airport with a code of HKG/VHHH?
CREATE TABLE table_name_56 (rank INTEGER, code__iata_icao_ VARCHAR)
SELECT microlab.culturetakentime FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-23724')) ORDER BY microlab.culturetakentime LIMIT 1
when was the first microbiology test of patient 031-23724,?
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, hospitaladmitsource text, unitadmittime time, unitdischargetime time, hospitaldischargetime time, hospitaldischargestatus text ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time )
SELECT COUNT(episode_air_date) FROM table_27615445_1 WHERE audition_city = "Rio de Janeiro"
How many episode air dates are there for auditioning city Rio De Janeiro?
CREATE TABLE table_27615445_1 (episode_air_date VARCHAR, audition_city VARCHAR)
SELECT COUNT(points) FROM table_name_72 WHERE drawn = 7 AND team = "corinthians" AND played > 18
How many Points have Drawn of 7, and a Team of corinthians, and a Played larger than 18?
CREATE TABLE table_name_72 (points VARCHAR, played VARCHAR, drawn VARCHAR, team VARCHAR)