answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT outgoing_manager FROM table_27225944_3 WHERE manner_of_departure = "Mutual consent" AND position_in_table = "16th"
Name the outgoing manager for mutual consent and position 16th
CREATE TABLE table_27225944_3 (outgoing_manager VARCHAR, manner_of_departure VARCHAR, position_in_table VARCHAR)
SELECT purse FROM table_name_95 WHERE trainer = "aidan o'brien"
What is the purse when Aidan O'brien was the trainer?
CREATE TABLE table_name_95 (purse VARCHAR, trainer VARCHAR)
SELECT MIN(rank) FROM table_name_4 WHERE title = "american pie 2"
What is the rank of American Pie 2?
CREATE TABLE table_name_4 ( rank INTEGER, title VARCHAR )
SELECT replaced_by FROM table_27225944_3 WHERE team = "Slaven Belupo"
Name the replaced by for slaven belupo
CREATE TABLE table_27225944_3 (replaced_by VARCHAR, team VARCHAR)
SELECT purse FROM table_name_82 WHERE year < 2013 AND winner = "muhannak"
What is the purse for the year earlier than 2013 and muhannak was the winner?
CREATE TABLE table_name_82 (purse VARCHAR, year VARCHAR, winner VARCHAR)
SELECT "Total" FROM table_60905 WHERE "Event" = 'wc belgrade' AND "Rank points" = '10'
What's the total for the wc belgrade event with 10 rank points?
CREATE TABLE table_60905 ( "Shooter" text, "Event" text, "Rank points" text, "Score points" text, "Total" text )
SELECT COUNT(outgoing_manager) FROM table_27225944_3 WHERE team = "Rijeka"
Name the number of outgoing manager for rijeka
CREATE TABLE table_27225944_3 (outgoing_manager VARCHAR, team VARCHAR)
SELECT trainer FROM table_name_71 WHERE year = 2013
Who was the trainer in 2013?
CREATE TABLE table_name_71 (trainer VARCHAR, year VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND demographic.age < "85"
count the number of patients whose admission location is emergency room admit and age is less than 85?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) 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 )
SELECT MIN(horizontal) FROM table_272313_2 WHERE pixel_aspect_ratio = "SMPTE 259M three quarters"
Name the least horizontal for smpte 259m three quarters
CREATE TABLE table_272313_2 (horizontal INTEGER, pixel_aspect_ratio VARCHAR)
SELECT throws FROM table_name_2 WHERE dob = "19/10/81"
Which throw number had a DOB of 19/10/81?
CREATE TABLE table_name_2 (throws VARCHAR, dob VARCHAR)
SELECT "Year" FROM table_54933 WHERE "Comp" = '33'
What year was the comp 33?
CREATE TABLE table_54933 ( "Year" text, "Team" text, "Comp" text, "Rate" text, "RAtt" text, "RYds" text, "RAvg" text )
SELECT aspect_ratio FROM table_272313_2 WHERE pixel_aspect_ratio = "SMPTE 259M" AND scanning = "interlaced"
Name the aspect ratio for smpte 259m and interlaced scanning
CREATE TABLE table_272313_2 (aspect_ratio VARCHAR, pixel_aspect_ratio VARCHAR, scanning VARCHAR)
SELECT first FROM table_name_76 WHERE surname = "cook"
Which first's surname is Cook?
CREATE TABLE table_name_76 (first VARCHAR, surname VARCHAR)
SELECT "Date" FROM table_15615 WHERE "Record" = '22-22'
Which date has a Record of 22-22?
CREATE TABLE table_15615 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text )
SELECT originalairdate FROM table_27218002_2 WHERE written_by = "Fintan Ryan"
What date did the episode that was written by Fintan Ryan originally air?
CREATE TABLE table_27218002_2 (originalairdate VARCHAR, written_by VARCHAR)
SELECT position FROM table_name_14 WHERE bats = "l" AND surname = "anderson"
Which position has L bats and Anderson as a surname?
CREATE TABLE table_name_14 (position VARCHAR, bats VARCHAR, surname VARCHAR)
SELECT round FROM table_name_12 WHERE club = "spartak moscow"
What round did the spartak moscow club play?
CREATE TABLE table_name_12 ( round VARCHAR, club VARCHAR )
SELECT originalairdate FROM table_27218002_2 WHERE ratings = "1.37 Million"
What date did the epiode that had 1.37 million as the rating originally air?
CREATE TABLE table_27218002_2 (originalairdate VARCHAR, ratings VARCHAR)
SELECT team_2 FROM table_name_88 WHERE team_1 = "us gorée"
What is the team 2 with a team 1 us gorée?
CREATE TABLE table_name_88 (team_2 VARCHAR, team_1 VARCHAR)
SELECT "Manager" FROM table_72293 WHERE "Rank" = '16'
Who is the manager whose rank is 16?
CREATE TABLE table_72293 ( "Season" text, "League" text, "Rank" real, "Games" real, "Points" real, "GF" real, "GA" real, "Manager" text, "Top Scorer" text, "Goals" real )
SELECT title FROM table_27250813_1 WHERE no_in_season = 16
What is the title of the episode no. 16 by season?
CREATE TABLE table_27250813_1 (title VARCHAR, no_in_season VARCHAR)
SELECT 2 AS nd_leg FROM table_name_31 WHERE team_1 = "zamalek sc"
What is the 2nd leg of team 1 Zamalek SC?
CREATE TABLE table_name_31 (team_1 VARCHAR)
SELECT "HDTV" FROM table_20385 WHERE "Television service" = 'PRIVÈ'
Was there HDTV when the service was Priv ?
CREATE TABLE table_20385 ( "N\u00b0" real, "Television service" text, "Country" text, "Language" text, "Content" text, "DAR" text, "HDTV" text, "PPV" text, "Package/Option" text )
SELECT COUNT(original_air_date) FROM table_27250813_1 WHERE production_code = 12003
How many times did an episode with a production code of 12003 was aired?
CREATE TABLE table_27250813_1 (original_air_date VARCHAR, production_code VARCHAR)
SELECT 1 AS st_leg FROM table_name_13 WHERE agg = "2-1"
What is the 1st leg of the team with a 2-1 agg.?
CREATE TABLE table_name_13 (agg VARCHAR)
SELECT builder FROM table_1181375_1 WHERE withdrawn = "1954–1958"
what's the builder where withdrawn is 1954 1958
CREATE TABLE table_1181375_1 ( builder VARCHAR, withdrawn VARCHAR )
SELECT color_analyst_s_ FROM table_2724704_5 WHERE studio_analyst_s_ = "Terry Bowden" AND tv_rating = "17.2"
Name the color analyst for terry bowden and 17.2
CREATE TABLE table_2724704_5 (color_analyst_s_ VARCHAR, studio_analyst_s_ VARCHAR, tv_rating VARCHAR)
SELECT 2 AS nd_leg FROM table_name_92 WHERE team_2 = "far rabat"
What is the 2nd leg of team 2 Far rabat?
CREATE TABLE table_name_92 (team_2 VARCHAR)
SELECT services, COUNT(services) FROM station GROUP BY services ORDER BY services
Give me a bar chart that the x-axis is the services and the Y is the count(services), and could you show bars from low to high order?
CREATE TABLE route ( train_id int, station_id int ) CREATE TABLE station ( id int, network_name text, services text, local_authority text ) CREATE TABLE train ( id int, train_number int, name text, origin text, destination text, time text, interval text ) CREATE TABLE weekly_weather ( station_id int, day_of_week text, high_temperature int, low_temperature int, precipitation real, wind_speed_mph int )
SELECT COUNT(bowl) FROM table_2724704_5 WHERE studio_analyst_s_ = "Lee Corso, Gene Chizik and Chip Kelly"
Name the number of bowl for lee corso, gene chizik and chip kelly
CREATE TABLE table_2724704_5 (bowl VARCHAR, studio_analyst_s_ VARCHAR)
SELECT MIN(watts) FROM table_name_37 WHERE class = "a" AND frequency = "91.5 fm" AND city_of_license = "elkhart, kansas"
How many Watts has a Class of a, and a Frequency of 91.5 fm, and a City of license of elkhart, kansas?
CREATE TABLE table_name_37 (watts INTEGER, city_of_license VARCHAR, class VARCHAR, frequency VARCHAR)
SELECT COUNT(DISTINCT t2.position) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid WHERE t1.clubname = "Bootup Baltimore"
How many different roles are there in the club 'Bootup Baltimore'?
CREATE TABLE club ( clubid number, clubname text, clubdesc text, clublocation text ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE member_of_club ( stuid number, clubid number, position text )
SELECT studio_analyst_s_ FROM table_2724704_5 WHERE network_s_ = "ESPN" AND sideline_reporter_s_ = "Erin Andrews and Tom Rinaldi"
Name the studio analysts for espn with erin andrews and tom rinaldi
CREATE TABLE table_2724704_5 (studio_analyst_s_ VARCHAR, network_s_ VARCHAR, sideline_reporter_s_ VARCHAR)
SELECT class FROM table_name_50 WHERE city_of_license = "garden city, kansas"
Which Class has a City of license of garden city, kansas?
CREATE TABLE table_name_50 (class VARCHAR, city_of_license VARCHAR)
SELECT date FROM table_name_94 WHERE tournament = "outback steakhouse pro-am"
What is the date of the Outback Steakhouse Pro-Am Tournament?
CREATE TABLE table_name_94 ( date VARCHAR, tournament VARCHAR )
SELECT MAX(no_in_series) FROM table_27255755_1 WHERE us_viewers__millions_ = "9.17"
What is the highest series number with 9.17 million US viewers?
CREATE TABLE table_27255755_1 (no_in_series INTEGER, us_viewers__millions_ VARCHAR)
SELECT frequency FROM table_name_93 WHERE call_sign = "kcse"
Which Frequency has a Call sign of kcse?
CREATE TABLE table_name_93 (frequency VARCHAR, call_sign VARCHAR)
SELECT DISTINCT patient.gender FROM patient WHERE patient.uniquepid = '025-66662'
what is patient 025-66662's gender?
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 allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime 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 intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE 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 )
SELECT podiums FROM table_2725949_6 WHERE starts = 22
name the podiums for start of 22
CREATE TABLE table_2725949_6 (podiums VARCHAR, starts VARCHAR)
SELECT year FROM table_name_58 WHERE finish_position = "59th"
What year has 59th as a finish position?
CREATE TABLE table_name_58 (year VARCHAR, finish_position VARCHAR)
SELECT "Stadium" FROM table_41009 WHERE "Date" = 'december 29, 2008'
What stadium was the December 29, 2008 game played at?
CREATE TABLE table_41009 ( "Bowl Game" text, "Date" text, "Stadium" text, "City" text, "Television" text, "Conference Matchups" text, "Payout ( US$ )" text )
SELECT COUNT(poles) FROM table_2725949_6 WHERE fastest_laps = 6
Name the number of poles for fastest laps being 6
CREATE TABLE table_2725949_6 (poles VARCHAR, fastest_laps VARCHAR)
SELECT 2 AS nd_day FROM table_name_4 WHERE year < 2009
Which 2nd day has a year prior to 2009?
CREATE TABLE table_name_4 (year INTEGER)
SELECT MIN(third) FROM table_name_37 WHERE club = "es sahel" AND rank < 3
What is the smallest number of third place earned for the Es Sahel at a rank less than 3?
CREATE TABLE table_name_37 ( third INTEGER, club VARCHAR, rank VARCHAR )
SELECT MIN(podiums) FROM table_2725949_6 WHERE season = 2009
Name the least podiums for 2009
CREATE TABLE table_2725949_6 (podiums INTEGER, season VARCHAR)
SELECT event FROM table_name_82 WHERE medal = "bronze" AND games = "1988 seoul"
What event did Pakistan get the bronze medal at the 1988 Seoul Games?
CREATE TABLE table_name_82 (event VARCHAR, medal VARCHAR, games VARCHAR)
SELECT club FROM table_17625749_1 WHERE tries_for = "32"
Name the club for when tries for is 32
CREATE TABLE table_17625749_1 ( club VARCHAR, tries_for VARCHAR )
SELECT starts FROM table_2725949_6 WHERE season = 2009
Name the starts for 2009
CREATE TABLE table_2725949_6 (starts VARCHAR, season VARCHAR)
SELECT sport FROM table_name_56 WHERE games = "1960 rome" AND event = "men's freestyle welterweight"
What sport in the 1960 Rome Games did Pakistan play in the Men's Freestyle Welterweight?
CREATE TABLE table_name_56 (sport VARCHAR, games VARCHAR, event VARCHAR)
SELECT "Position" FROM table_17209 WHERE "Player" = 'Jordan Fransoo'
What position is the player Jordan Fransoo in?
CREATE TABLE table_17209 ( "Round" real, "Overall" text, "Player" text, "Position" text, "Nationality" text, "Club team" text )
SELECT MAX(starts) FROM table_2725949_6 WHERE wins = 6
Name the most starts for 6 wins
CREATE TABLE table_2725949_6 (starts INTEGER, wins VARCHAR)
SELECT games FROM table_name_56 WHERE event = "men's competition" AND medal = "silver"
When did Pakistan win a Silver Medal in a Men's Competition?
CREATE TABLE table_name_56 (games VARCHAR, event VARCHAR, medal VARCHAR)
SELECT competition FROM table_name_71 WHERE venue = "klfa stadium, cheras" AND score = "3-3"
Venue of klfa stadium, cheras, and a Score of 3-3 had what competition?
CREATE TABLE table_name_71 ( competition VARCHAR, venue VARCHAR, score VARCHAR )
SELECT COUNT(matches) FROM table_27268238_5 WHERE wickets = 16
How many matches were wickets 16?
CREATE TABLE table_27268238_5 (matches VARCHAR, wickets VARCHAR)
SELECT games FROM table_name_19 WHERE sport = "field hockey" AND medal = "gold"
When did Pakistan win a Gold Medal in Field Hockey?
CREATE TABLE table_name_19 (games VARCHAR, sport VARCHAR, medal VARCHAR)
SELECT date, mean_temperature_f FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3
For the top 3 days with the largest max gust speeds, show the date and average temperature with a bar chart.
CREATE TABLE station ( id INTEGER, name TEXT, lat NUMERIC, long NUMERIC, dock_count INTEGER, city TEXT, installation_date TEXT ) CREATE TABLE trip ( id INTEGER, duration INTEGER, start_date TEXT, start_station_name TEXT, start_station_id INTEGER, end_date TEXT, end_station_name TEXT, end_station_id INTEGER, bike_id INTEGER, subscription_type TEXT, zip_code INTEGER ) CREATE TABLE status ( station_id INTEGER, bikes_available INTEGER, docks_available INTEGER, time TEXT ) CREATE TABLE weather ( date TEXT, max_temperature_f INTEGER, mean_temperature_f INTEGER, min_temperature_f INTEGER, max_dew_point_f INTEGER, mean_dew_point_f INTEGER, min_dew_point_f INTEGER, max_humidity INTEGER, mean_humidity INTEGER, min_humidity INTEGER, max_sea_level_pressure_inches NUMERIC, mean_sea_level_pressure_inches NUMERIC, min_sea_level_pressure_inches NUMERIC, max_visibility_miles INTEGER, mean_visibility_miles INTEGER, min_visibility_miles INTEGER, max_wind_Speed_mph INTEGER, mean_wind_speed_mph INTEGER, max_gust_speed_mph INTEGER, precipitation_inches INTEGER, cloud_cover INTEGER, events TEXT, wind_dir_degrees INTEGER, zip_code INTEGER )
SELECT MIN(wickets) FROM table_27268238_5
What is the lowest wickets?
CREATE TABLE table_27268238_5 (wickets INTEGER)
SELECT name FROM table_name_56 WHERE games = "1964 tokyo"
What team played in the 1964 Tokyo Games?
CREATE TABLE table_name_56 (name VARCHAR, games VARCHAR)
SELECT COUNT("title") FROM table_204_871 WHERE "ano" >= 1998 AND "ano" <= 2002
how many tv shows did natalia oreiro between 1998 and 2002 ?
CREATE TABLE table_204_871 ( id number, "ano" text, "title" text, "role" text, "channel" text, "notes" text )
SELECT 4 AS wi FROM table_27268238_5 WHERE economy = "7.82"
What is the 4wi when the economy is 7.82?
CREATE TABLE table_27268238_5 (economy VARCHAR)
SELECT sport FROM table_name_58 WHERE name = "national team" AND games = "1968 mexico city"
What sport did the National Team play in the 1968 mexico City Games?
CREATE TABLE table_name_58 (sport VARCHAR, name VARCHAR, games VARCHAR)
SELECT "Date" FROM table_8011 WHERE "Home team" = 'grimsby town'
What is the date when Grimsby Town is the home team?
CREATE TABLE table_8011 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
SELECT player FROM table_27268238_5 WHERE bbi = "5/27"
Who is the player when the bbi is 5/27?
CREATE TABLE table_27268238_5 (player VARCHAR, bbi VARCHAR)
SELECT COUNT(round) FROM table_name_33 WHERE position = "center" AND player = "denis arkhipov"
What is the total number of rounds that Center position Denis Arkhipov have?
CREATE TABLE table_name_33 (round VARCHAR, position VARCHAR, player VARCHAR)
SELECT "Current Stock" FROM table_21956 WHERE "Avg. trips per mile (\u00d71000)" = '4744'
When 4744 is the avg. trips per mile (x1000) what is the current stock?
CREATE TABLE table_21956 ( "Name" text, "Map colour" text, "First operated" real, "Type" text, "Length" text, "No. Sta" real, "Current Stock" text, "Future Stock" text, "Trips per annum (\u00d71000)" real, "Avg. trips per mile (\u00d71000)" real )
SELECT team FROM table_27268238_5 WHERE economy = "5.73"
What is the team when the economy is 5.73?
CREATE TABLE table_27268238_5 (team VARCHAR, economy VARCHAR)
SELECT player FROM table_name_17 WHERE round = 3 AND nationality = "russia"
Who is the player from Round 3 from Russia?
CREATE TABLE table_name_17 (player VARCHAR, round VARCHAR, nationality VARCHAR)
SELECT current_series FROM table_1000181_1 WHERE notes = "New series began in June 2011"
What is the current series where the new series began in June 2011?
CREATE TABLE table_1000181_1 ( current_series VARCHAR, notes VARCHAR )
SELECT COUNT(valid_votes) FROM table_27274222_2 WHERE province = "Denizli"
When Denizli was the province, what was the total number of valid votes?
CREATE TABLE table_27274222_2 (valid_votes VARCHAR, province VARCHAR)
SELECT SUM(round) FROM table_name_41 WHERE position = "defenceman"
What is the sum of the round with the defenceman?
CREATE TABLE table_name_41 (round INTEGER, position 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, date_day, days, fare, flight, flight_fare WHERE ((((((flight.arrival_time < flight.departure_time) AND date_day.day_number = 22 AND date_day.month_number = 3 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code) OR (date_day.day_number = 22 AND date_day.month_number = 3 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code AND NOT (flight.arrival_time < flight.departure_time))) AND (flight.arrival_time <= 1700 AND flight.arrival_time >= 1500)) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND fare.one_direction_cost = (SELECT MIN(FAREalias1.one_direction_cost) FROM airport_service AS AIRPORT_SERVICEalias2, airport_service AS AIRPORT_SERVICEalias3, city AS CITYalias2, city AS CITYalias3, date_day AS DATE_DAYalias1, days AS DAYSalias1, fare AS FAREalias1, flight AS FLIGHTalias1, flight_fare AS FLIGHT_FAREalias1 WHERE (((((FLIGHTalias1.arrival_time < FLIGHTalias1.departure_time) AND DATE_DAYalias1.day_number = 22 AND DATE_DAYalias1.month_number = 3 AND DATE_DAYalias1.year = 1991 AND DAYSalias1.day_name = DATE_DAYalias1.day_name AND FLIGHTalias1.flight_days = DAYSalias1.days_code) OR (DATE_DAYalias1.day_number = 22 AND DATE_DAYalias1.month_number = 3 AND DATE_DAYalias1.year = 1991 AND DAYSalias1.day_name = DATE_DAYalias1.day_name AND FLIGHTalias1.flight_days = DAYSalias1.days_code AND NOT (FLIGHTalias1.arrival_time < FLIGHTalias1.departure_time))) AND (FLIGHTalias1.arrival_time <= 1700 AND FLIGHTalias1.arrival_time >= 1500)) AND CITYalias3.city_code = AIRPORT_SERVICEalias3.city_code AND CITYalias3.city_name = 'PHILADELPHIA' AND FLIGHTalias1.to_airport = AIRPORT_SERVICEalias3.airport_code) AND CITYalias2.city_code = AIRPORT_SERVICEalias2.city_code AND CITYalias2.city_name = 'BOSTON' AND FLIGHT_FAREalias1.fare_id = FAREalias1.fare_id AND FLIGHTalias1.flight_id = FLIGHT_FAREalias1.flight_id AND FLIGHTalias1.from_airport = AIRPORT_SERVICEalias2.airport_code) AND flight_fare.fare_id = fare.fare_id AND flight.flight_id = flight_fare.flight_id
the cheapest flights between BOSTON and PHILADELPHIA which arrive between 3 and 1700 o'clock on tuesday
CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE code_description ( code varchar, description text ) 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 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_fare ( flight_id int, fare_id 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 flight_leg ( flight_id int, leg_number int, leg_flight 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 dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_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 food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE compartment_class ( compartment varchar, class_type 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 ) 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 class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE month ( month_number int, month_name 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 ground_service ( city_code text, airport_code text, transport_type text, ground_fare int )
SELECT province FROM table_27274222_2 WHERE turnout___percentage_ = "54.09"
What province had a turnout of 54.09%?
CREATE TABLE table_27274222_2 (province VARCHAR, turnout___percentage_ VARCHAR)
SELECT college_junior_club_team FROM table_name_85 WHERE round < 3
What is the college club that plays before round 3?
CREATE TABLE table_name_85 (college_junior_club_team VARCHAR, round INTEGER)
SELECT "opponent" FROM table_204_795 WHERE "date" > (SELECT "date" FROM table_204_795 WHERE "date" = 'january 29, 1949') ORDER BY "date" LIMIT 1
which team did this team face against next after beating minnesota on january 29 of this season ?
CREATE TABLE table_204_795 ( id number, "date" text, "opponent" text, "score" text, "result" text, "location" text, "attendance" number )
SELECT model_number FROM table_27277284_28 WHERE order_part_number = "TMRM75DAM22GG"
What is the model number for the order part numbered tmrm75dam22gg?
CREATE TABLE table_27277284_28 (model_number VARCHAR, order_part_number VARCHAR)
SELECT population FROM table_name_65 WHERE former_local_authority = "audenshaw urban district"
What was the population of the area that was formerly under the authority of the Audenshaw Urban District?
CREATE TABLE table_name_65 (population VARCHAR, former_local_authority VARCHAR)
SELECT "Date" FROM table_54709 WHERE "Versus" = 'source: cricinfo.com'
What date had a versus of source: cricinfo.com?
CREATE TABLE table_54709 ( "Catches" text, "Player" text, "Versus" text, "Venue" text, "Date" text )
SELECT order_part_number FROM table_27277284_28 WHERE mult_1 = "10x"
What is the oder part number for the model with 10x mult. 1?
CREATE TABLE table_27277284_28 (order_part_number VARCHAR, mult_1 VARCHAR)
SELECT MIN(overall) FROM table_name_26 WHERE name = "derrick harvey" AND round > 1
What is the overall pick number that Derrick Harvey was when he was picked in a round after round 1?
CREATE TABLE table_name_26 (overall INTEGER, name VARCHAR, round VARCHAR)
SELECT "Grand Finalist" FROM table_16698 WHERE "Winners" = 'Collingwood'
what's the grand finalist where winners is collingwood
CREATE TABLE table_16698 ( "Year" real, "Winners" text, "Grand Finalist" text, "Scores" text, "Venue" text, "Crowd" real, "Margin" real, "Season Result" text )
SELECT ht FROM table_27277284_28 WHERE mult_1 = "10x"
How much ht does the model with 10x mult. 1 have?
CREATE TABLE table_27277284_28 (ht VARCHAR, mult_1 VARCHAR)
SELECT college FROM table_name_72 WHERE position = "defensive end" AND round = 2
What college was the defensive end pick that was picked in round 2?
CREATE TABLE table_name_72 (college VARCHAR, position VARCHAR, round VARCHAR)
SELECT "Venue" FROM table_12283 WHERE "Competition" = 'friendly'
What is the Venue with the Friendly Competition?
CREATE TABLE table_12283 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
SELECT ht FROM table_27277284_28 WHERE release_date = "June 4, 2008"
What's the ht for the model released on June 4, 2008?
CREATE TABLE table_27277284_28 (ht VARCHAR, release_date VARCHAR)
SELECT AVG(round) FROM table_name_48 WHERE college = "usf" AND pick__number < 24
What is the average round that the player from USF was picked in when his draft pick number was less than 24?
CREATE TABLE table_name_48 (round INTEGER, college VARCHAR, pick__number VARCHAR)
SELECT gender, COUNT(*) FROM Dorm GROUP BY gender ORDER BY gender DESC
Find the number of dorms for each gender in a bar chart, I want to show by the x axis from high to low please.
CREATE TABLE Dorm ( dormid INTEGER, dorm_name VARCHAR(20), student_capacity INTEGER, gender VARCHAR(1) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Lives_in ( stuid INTEGER, dormid INTEGER, room_number INTEGER ) CREATE TABLE Dorm_amenity ( amenid INTEGER, amenity_name VARCHAR(25) ) CREATE TABLE Has_amenity ( dormid INTEGER, amenid INTEGER )
SELECT COUNT(poles) FROM table_27279050_1 WHERE points = "0" AND nation = "Mexico"
How many pole position achieved 0 points from Mexico?
CREATE TABLE table_27279050_1 (poles VARCHAR, points VARCHAR, nation VARCHAR)
SELECT SUM(pick__number) FROM table_name_77 WHERE round = 5 AND overall > 159
What is the sum of the pick numbers where the player was picked in round 5 and overall pick number was greater than 159?
CREATE TABLE table_name_77 (pick__number INTEGER, round VARCHAR, overall VARCHAR)
SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-7771')) AND intakeoutput.cellpath LIKE '%output%' AND DATETIME(intakeoutput.intakeoutputtime) <= DATETIME(CURRENT_TIME(), '-1929 day') ORDER BY intakeoutput.intakeoutputtime DESC LIMIT 1
what was the name of the output that patient 002-7771 got last until 1929 days ago?
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime 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 ) 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 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 cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) 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 )
SELECT v_core FROM table_27277284_8 WHERE mult_1 = "11x"
Name the vcore for multi 11x
CREATE TABLE table_27277284_8 (v_core VARCHAR, mult_1 VARCHAR)
SELECT AVG(overall) FROM table_name_23 WHERE college = "usf" AND round > 5
What is the average overall pick number for the USF player who was picked after round 5?
CREATE TABLE table_name_23 (overall INTEGER, college VARCHAR, round VARCHAR)
SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime, admissions.hadm_id FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'ins drug-elut coronry st') AND STRFTIME('%y', procedures_icd.charttime) <= '2103') AS t1 JOIN (SELECT admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id FROM labevents JOIN admissions ON labevents.hadm_id = admissions.hadm_id WHERE STRFTIME('%y', labevents.charttime) <= '2103') AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.charttime AND t1.hadm_id = t2.hadm_id GROUP BY t2.itemid) AS t3 WHERE t3.c1 <= 3)
what are the top three most common laboratory tests that followed in the same hospital encounter for patients who were given ins drug-elut coronry st until 2103?
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime 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 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 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 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 outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) 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 patients ( row_id number, subject_id number, gender text, dob time, dod time ) 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 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 labevents ( row_id number, subject_id number, hadm_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 )
SELECT COUNT(v_core) FROM table_27277284_8 WHERE model_number = "Mobile Athlon 64 3000+"
Name the number of v core for model number mobile athlon 64 3000+
CREATE TABLE table_27277284_8 (v_core VARCHAR, model_number VARCHAR)
SELECT MIN(population) FROM table_name_37 WHERE median_family_income = "$74,905" AND number_of_households < 145 OFFSET 790
Which Population is the lowest one that has a Median family income of $74,905, and a Number of households smaller than 145,790?
CREATE TABLE table_name_37 (population INTEGER, median_family_income VARCHAR, number_of_households VARCHAR)
SELECT score FROM table_name_38 WHERE date = "5 september 2001"
What was the score of the match played on 5 September 2001?
CREATE TABLE table_name_38 ( score VARCHAR, date VARCHAR )
SELECT COUNT(points_for) FROM table_27293285_4 WHERE "played" = "played"
Name the total number of points for for played
CREATE TABLE table_27293285_4 (points_for VARCHAR)
SELECT COUNT(rape__art_190_stgb_) FROM table_name_27 WHERE embezzlement__art_138_stgb_ = 820 AND total_convictions < 94 OFFSET 574
What is the total number of Rapes that have Embezzlements a figure of 820 and total number of convictions less than 94,574?
CREATE TABLE table_name_27 (rape__art_190_stgb_ VARCHAR, embezzlement__art_138_stgb_ VARCHAR, total_convictions VARCHAR)
SELECT SUM("Played") FROM table_69759 WHERE "First game" < '2000' AND "Lost" < '21' AND "Drawn" < '0'
What is the sum of matches played that has a year of first match before 2000, fewer than 21 lost, and 0 drawn?
CREATE TABLE table_69759 ( "First game" real, "Played" real, "Drawn" real, "Lost" real, "Percentage" text )
SELECT COUNT(points) FROM table_27293285_4 WHERE tries_for = "46"
Name the total number of points for 46 tries for
CREATE TABLE table_27293285_4 (points VARCHAR, tries_for VARCHAR)