answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT MAX("To par") FROM table_47826 WHERE "Score" = '72-73=145' | What is the highest To Par, when Score is '72-73=145'? | CREATE TABLE table_47826 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" real
) |
SELECT COUNT(score) FROM table_27734286_1 WHERE high_points = "Al Jefferson (24)" | What's the score in al jefferson (24) high points? | CREATE TABLE table_27734286_1 (score VARCHAR, high_points VARCHAR) |
SELECT transfer_window FROM table_name_79 WHERE country = "bra" AND transfer_fee = "£3.4m" | What transfer window has bra as the country, with £3.4m as the transfer fee? | CREATE TABLE table_name_79 (transfer_window VARCHAR, country VARCHAR, transfer_fee VARCHAR) |
SELECT COUNT("Season") FROM table_26967 WHERE "Final Record" = '9–16–5' | how many time is the final record is 9 16 5? | CREATE TABLE table_26967 (
"Season" real,
"Regular Season" text,
"Playoffs" text,
"U.S. Open Cup" text,
"CONCACAF" text,
"Final Record" text
) |
SELECT score FROM table_27734286_1 WHERE date = "October 7" | What`s the score in October 7. | CREATE TABLE table_27734286_1 (score VARCHAR, date VARCHAR) |
SELECT incumbent FROM table_name_62 WHERE district = "massachusetts 2" | Which Incumbent has a District of massachusetts 2? | CREATE TABLE table_name_62 (incumbent VARCHAR, district VARCHAR) |
SELECT DISTINCT flight.flight_id FROM airport, airport_service, city, flight WHERE airport.airport_code = 'DAL' AND city.city_code = airport_service.city_code AND flight.from_airport = airport_service.airport_code AND flight.to_airport = airport.airport_code | show me the flights to DAL from all other airports | 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 code_description (
code varchar,
description text
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_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 time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
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_leg (
flight_id int,
leg_number int,
leg_flight int
)
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 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 compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE days (
days_code varchar,
day_name 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 food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant 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 city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE state (
state_code text,
state_name text,
country_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 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 location_attendance FROM table_27734286_1 WHERE team = "@ Portland" | What's the location attendance of the @ portland team? | CREATE TABLE table_27734286_1 (location_attendance VARCHAR, team VARCHAR) |
SELECT incumbent FROM table_name_47 WHERE district = "massachusetts 8" | Which Incumbent has a District of massachusetts 8? | CREATE TABLE table_name_47 (incumbent VARCHAR, district VARCHAR) |
SELECT T2.Name, COUNT(T2.Name) FROM AssignedTo AS T1 JOIN Projects AS T2 ON T1.Project = T2.Code JOIN Scientists AS T3 ON T1.Scientist = T3.SSN WHERE T3.Name LIKE '%Smith%' GROUP BY T2.Name ORDER BY T2.Name DESC | Find the name of the project for which a scientist whose name contains Smith is assigned to, and count them by a bar chart, could you order by the x-axis in descending? | CREATE TABLE Projects (
Code Char(4),
Name Char(50),
Hours int
)
CREATE TABLE Scientists (
SSN int,
Name Char(30)
)
CREATE TABLE AssignedTo (
Scientist int,
Project char(4)
) |
SELECT high_assists FROM table_27734286_7 WHERE date = "January 8" | Who had the high assist total on january 8? | CREATE TABLE table_27734286_7 (high_assists VARCHAR, date VARCHAR) |
SELECT district FROM table_name_21 WHERE first_elected > 1858 | Which District has a First elected larger than 1858? | CREATE TABLE table_name_21 (district VARCHAR, first_elected INTEGER) |
SELECT DISTINCT transport_type FROM ground_service WHERE (airport_code IN (SELECT AIRPORTalias0.airport_code FROM airport AS AIRPORTalias0 WHERE AIRPORTalias0.airport_code = 'LGA') AND city_code IN (SELECT CITYalias0.city_code FROM city AS CITYalias0 WHERE CITYalias0.city_name = 'NEW YORK')) | please list the ground transportation from LGA into NEW YORK | CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id int,
flight_number int,
from_airport varchar,
meal_code text,
stops int,
time_elapsed int,
to_airport varchar
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE 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 days (
days_code varchar,
day_name 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 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 class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_miles int,
pressurized varchar
)
CREATE TABLE 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 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 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 date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
) |
SELECT high_assists FROM table_27734286_7 WHERE game = 38 | Who had the high assists for game number 38? | CREATE TABLE table_27734286_7 (high_assists VARCHAR, game VARCHAR) |
SELECT SUM(episode) FROM table_name_20 WHERE segment_d = "manual motorcycle transmissions" | What episode has a manual motorcycle transmissions section D? | CREATE TABLE table_name_20 (episode INTEGER, segment_d VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "0" AND procedures.long_title = "Intravenous infusion of clofarabine" | what is the number of patients whose hospital stay is above 0 days and underwent procedure intravenous infusion of clofarabine? | 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
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) |
SELECT COUNT(high_points) FROM table_27734286_7 WHERE date = "January 7" | How many games did they play on january 7? | CREATE TABLE table_27734286_7 (high_points VARCHAR, date VARCHAR) |
SELECT segment_a FROM table_name_31 WHERE segment_c = "paint chip cards" | What segment A is associated with a Segment C of paint chip cards? | CREATE TABLE table_name_31 (segment_a VARCHAR, segment_c VARCHAR) |
SELECT MIN(total) FROM table_name_13 WHERE floor_exercise < 36.724 AND rank < 8 | What's the lowest total when the floor exercise is less than 36.724 and the rank is lower than 8? | CREATE TABLE table_name_13 (
total INTEGER,
floor_exercise VARCHAR,
rank VARCHAR
) |
SELECT date FROM table_27734577_11 WHERE team = "Boston" | What date did the Hawks play against Boston? | CREATE TABLE table_27734577_11 (date VARCHAR, team VARCHAR) |
SELECT segment_a FROM table_name_76 WHERE segment_d = "manual motorcycle transmissions" | What segment A is associated with a Segment D of manual motorcycle transmissions? | CREATE TABLE table_name_76 (segment_a VARCHAR, segment_d VARCHAR) |
SELECT COUNT(*) FROM table_203_536 WHERE "opponent" = '@min' | what is the total amount of times they played against opponent @min ? | CREATE TABLE table_203_536 (
id number,
"#" number,
"date" text,
"opponent" text,
"score" text,
"win" text,
"loss" text,
"save" text,
"crowd" number,
"record" text
) |
SELECT COUNT(high_assists) FROM table_27734577_2 WHERE high_rebounds = "Zaza Pachulia (6)" | List the highest number of assists when zaza pachulia (6) had the most rebounds. | CREATE TABLE table_27734577_2 (high_assists VARCHAR, high_rebounds VARCHAR) |
SELECT austria FROM table_name_13 WHERE croatia = "ireland" | What is shown for Austria when Croatia shows Ireland? | CREATE TABLE table_name_13 (austria VARCHAR, croatia VARCHAR) |
SELECT "Opponent" FROM table_36902 WHERE "Attendance" = '23,150' | Attendance of 23,150 had what opponent? | CREATE TABLE table_36902 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text,
"Record" text
) |
SELECT team FROM table_27734577_2 WHERE date = "October 21" | Which team was the opponent on october 21? | CREATE TABLE table_27734577_2 (team VARCHAR, date VARCHAR) |
SELECT MIN(102) FROM table_name_78 WHERE "friendly" = "friendly" AND austria = "greece" | What is the smallest number for 102 when Friendly of friendly, and an Austria of greece? | CREATE TABLE table_name_78 (austria VARCHAR) |
SELECT COUNT("Prod. code") FROM table_3517 WHERE "Episode #" = '73' | What is the number of production codes for episode #73? | CREATE TABLE table_3517 (
"Episode #" text,
"Season Episode #" text,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Prod. code" text
) |
SELECT high_points FROM table_27734577_2 WHERE score = "L 85–94 (OT)" | Who corned the most points for the game that ended with a score of l 85–94 (ot)? | CREATE TABLE table_27734577_2 (high_points VARCHAR, score VARCHAR) |
SELECT losing_bonus FROM table_name_89 WHERE try_bonus = "try bonus" | What is the Losing bonus with an extra try bonus? | CREATE TABLE table_name_89 (losing_bonus VARCHAR, try_bonus VARCHAR) |
SELECT "Director" FROM table_34866 WHERE "Role" = 'melissa' | Which Director has a Role of melissa? | CREATE TABLE table_34866 (
"Year" text,
"Title" text,
"Role" text,
"Producer" text,
"Director" text
) |
SELECT score FROM table_27734577_2 WHERE high_points = "Josh Powell (13)" | what was the final score of the game where josh powell (13) scored the most points? | CREATE TABLE table_27734577_2 (score VARCHAR, high_points VARCHAR) |
SELECT lost FROM table_name_92 WHERE club = "mumbles rfc" | What did the loss come from a Club of mumbles rfc? | CREATE TABLE table_name_92 (lost VARCHAR, club VARCHAR) |
SELECT COUNT(airport) FROM table_13836704_9 WHERE rank = 4 | how many airport with rank being 4 | CREATE TABLE table_13836704_9 (
airport VARCHAR,
rank VARCHAR
) |
SELECT record FROM table_27734577_8 WHERE team = "@ Miami" | What's the record of the @ miami team? | CREATE TABLE table_27734577_8 (record VARCHAR, team VARCHAR) |
SELECT method FROM table_name_88 WHERE round = "1" AND record = "10–2" | Round of 1, and a Record of 10–2 had what method? | CREATE TABLE table_name_88 (method VARCHAR, round VARCHAR, record VARCHAR) |
SELECT AVG("Pick") FROM table_51891 WHERE "Player" = 'terry cook' | When was terry cook picked? | CREATE TABLE table_51891 (
"Pick" real,
"Round" text,
"Player" text,
"Position" text,
"School" text
) |
SELECT COUNT(record) FROM table_27734577_8 WHERE date = "January 2" | How many records where in January 2? | CREATE TABLE table_27734577_8 (record VARCHAR, date VARCHAR) |
SELECT res FROM table_name_7 WHERE record = "3–1" | Record of 3–1 had what Res? | CREATE TABLE table_name_7 (res VARCHAR, record VARCHAR) |
SELECT parallel_bars FROM table_18662026_10 WHERE floor = "14.200" | If the floor number is 14.200, what is the number for the parallel bars? | CREATE TABLE table_18662026_10 (
parallel_bars VARCHAR,
floor VARCHAR
) |
SELECT high_rebounds FROM table_27734577_8 WHERE high_points = "Jamal Crawford (20)" | What are the high rebounds in the jamal crawford (20) high points? | CREATE TABLE table_27734577_8 (high_rebounds VARCHAR, high_points VARCHAR) |
SELECT res FROM table_name_49 WHERE record = "47–5 (1)" | Record of 47–5 (1) involved what res? | CREATE TABLE table_name_49 (res VARCHAR, record VARCHAR) |
SELECT "Home team" FROM table_52073 WHERE "Away team" = 'richmond' | What home team played against Richmond? | CREATE TABLE table_52073 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) |
SELECT high_rebounds FROM table_27734577_8 WHERE game = 45 | What are the high rebounds in the 45 game? | CREATE TABLE table_27734577_8 (high_rebounds VARCHAR, game VARCHAR) |
SELECT method FROM table_name_72 WHERE opponent = "sergei bondarovich" AND record = "2–0" | Opponent of sergei bondarovich, and a Record of 2–0 had what method? | CREATE TABLE table_name_72 (method VARCHAR, opponent VARCHAR, record VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "DIVORCED" AND procedures.icd9_code = "8968" | how many of the divorcee patients had icd9 code 8968? | 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 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 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 date FROM table_27734577_8 WHERE team = "New Orleans" | What's the date of the new orleans team ? | CREATE TABLE table_27734577_8 (date VARCHAR, team VARCHAR) |
SELECT opponent FROM table_name_93 WHERE method = "submission (chin in the eye)" | Method of submission (chin in the eye) had what opponent? | CREATE TABLE table_name_93 (opponent VARCHAR, method VARCHAR) |
SELECT score FROM table_name_22 WHERE player = "ky laffoon" | What is the score for Ky Laffoon? | CREATE TABLE table_name_22 (
score VARCHAR,
player VARCHAR
) |
SELECT team FROM table_27734577_8 WHERE score = "W 110–87 (OT)" | What team has a score of w 110–87 (ot)? | CREATE TABLE table_27734577_8 (team VARCHAR, score VARCHAR) |
SELECT record FROM table_name_66 WHERE opponent = "leonardo castello branco" | Opponent of leonardo castello branco had what record? | CREATE TABLE table_name_66 (record VARCHAR, opponent VARCHAR) |
SELECT Flag, COUNT(*) FROM Ship GROUP BY Flag ORDER BY Flag | Return a bar chart on what are the different ship flags, and how many ships have each?, order in asc by the bar. | CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
)
CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
) |
SELECT record FROM table_27734769_9 WHERE high_rebounds = "Marcus Camby (13)" | What was the game record if Marcus Camby (13) got the high rebounds? | CREATE TABLE table_27734769_9 (record VARCHAR, high_rebounds VARCHAR) |
SELECT mixed_doubles FROM table_name_53 WHERE year = "2008" | Who won in mixed doubles in 2008? | CREATE TABLE table_name_53 (mixed_doubles VARCHAR, year VARCHAR) |
SELECT MIN(laps) FROM table_name_17 WHERE team = "perkins engineering" | What are Perkins Engineering's fewest laps? | CREATE TABLE table_name_17 (
laps INTEGER,
team VARCHAR
) |
SELECT high_rebounds FROM table_27734769_9 WHERE team = "Minnesota" | Who did the high rebounds for the team Minnesota? | CREATE TABLE table_27734769_9 (high_rebounds VARCHAR, team VARCHAR) |
SELECT opponent FROM table_name_8 WHERE city = "belgrade" AND results¹ = "5:2" | Who was the opponent in Belgrade and had a result of 5:2? | CREATE TABLE table_name_8 (opponent VARCHAR, city VARCHAR, results¹ VARCHAR) |
SELECT "Label" FROM table_39024 WHERE "Date" = 'december 2004' | What is the label for December 2004? | CREATE TABLE table_39024 (
"Country" text,
"Date" text,
"Label" text,
"Format" text,
"Catalogue #" text
) |
SELECT COUNT(score) FROM table_27734769_9 WHERE date = "January 19" | How many scores where achieved on January 19? | CREATE TABLE table_27734769_9 (score VARCHAR, date VARCHAR) |
SELECT date FROM table_name_61 WHERE type_of_game = "friendly" AND opponent = "wales" | On what date was there a friendly game against Wales? | CREATE TABLE table_name_61 (date VARCHAR, type_of_game VARCHAR, opponent VARCHAR) |
SELECT period FROM table_name_9 WHERE player = "stanislav chistov" | In which period did Stanislav Chistov get a penalty? | CREATE TABLE table_name_9 (
period VARCHAR,
player VARCHAR
) |
SELECT lmp2_winning_driver FROM table_27743641_2 WHERE lmp1_winning_team = "No. 20 Oryx Dyson Racing" | Who was the LMP2 winner when the LMP1 winning team was No. 20 Oryx Dyson Racing? | CREATE TABLE table_27743641_2 (lmp2_winning_driver VARCHAR, lmp1_winning_team VARCHAR) |
SELECT results¹ FROM table_name_84 WHERE opponent = "egypt" | What were the results against the game against Egypt? | CREATE TABLE table_name_84 (results¹ VARCHAR, opponent VARCHAR) |
SELECT country FROM table_name_23 WHERE place = "t5" AND score = 69 - 71 = 140 | What is the home country of the player who placed t5 and had a score of 69-71=140? | CREATE TABLE table_name_23 (
country VARCHAR,
place VARCHAR,
score VARCHAR
) |
SELECT gt_winning_team FROM table_27743641_2 WHERE gtc_winning_team = "No. 54 Black Swan Racing" | Who were the GT winning team when the GTC winning team was No. 54 Black Swan Racing? | CREATE TABLE table_27743641_2 (gt_winning_team VARCHAR, gtc_winning_team VARCHAR) |
SELECT results¹ FROM table_name_61 WHERE city = "skoplje" | What were the results against the game against Skoplje? | CREATE TABLE table_name_61 (results¹ VARCHAR, city VARCHAR) |
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.formulary_drug_cd = "LOPE2" | specify the name of drug code lope2 | 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 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) |
SELECT gt_winning_team FROM table_27743641_2 WHERE results = "Report" | Who were the GT winning team when the results were "report"? | CREATE TABLE table_27743641_2 (gt_winning_team VARCHAR, results VARCHAR) |
SELECT type_of_game FROM table_name_20 WHERE results¹ = "3:1" AND opponent = "france" | What type of game was held against France with the results of 3:1? | CREATE TABLE table_name_20 (type_of_game VARCHAR, results¹ VARCHAR, opponent VARCHAR) |
SELECT "Position" FROM table_13378 WHERE "First Election" = '1988 as vice mayor 2009' | What is the Position of the person with a First Election of 1988 as Vice Mayor 2009? | CREATE TABLE table_13378 (
"Position" text,
"Name" text,
"Party" text,
"First Election" text,
"District" text
) |
SELECT date FROM table_27734769_8 WHERE high_assists = "Andre Miller (7)" | what is the date the high assists was andre miller (7)? | CREATE TABLE table_27734769_8 (date VARCHAR, high_assists VARCHAR) |
SELECT 2012 FROM table_name_55 WHERE tournament = "us open" | Name the 2012 for us open | CREATE TABLE table_name_55 (tournament VARCHAR) |
SELECT (SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-1629')) AND intakeoutput.cellpath LIKE '%intake%' AND STRFTIME('%y-%m-%d', intakeoutput.intakeoutputtime) = '2105-09-10') - (SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-1629')) AND intakeoutput.cellpath LIKE '%output%' AND STRFTIME('%y-%m-%d', intakeoutput.intakeoutputtime) = '2105-09-10') | show me the difference between patient 006-1629's total input and output volume on 09/10/2105. | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code 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 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 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 allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime 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
) |
SELECT date FROM table_27734769_8 WHERE high_points = "LaMarcus Aldridge (36)" | What is the date the high points was lamarcus aldridge (36)? | CREATE TABLE table_27734769_8 (date VARCHAR, high_points VARCHAR) |
SELECT 2012 FROM table_name_89 WHERE 2009 = "a" AND 2010 = "a" AND 2011 = "a" | Name the 2012 for 2009 of a and 2010 of a and 2011 of a | CREATE TABLE table_name_89 (Id VARCHAR) |
SELECT SUM("Drawn") FROM table_52538 WHERE "Lost" < '4' AND "Coach" = 'francis cummins' | How many Drawn did Coach Francis Cummins have with less than 4 Lost? | CREATE TABLE table_52538 (
"Competition" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Position" text,
"Coach" text,
"Captain" text,
"Main Article" text
) |
SELECT score FROM table_27734769_8 WHERE team = "Milwaukee" | What is the score when the team is milwaukee? | CREATE TABLE table_27734769_8 (score VARCHAR, team VARCHAR) |
SELECT 2012 FROM table_name_36 WHERE tournament = "us open" | Name the 2012 for us open | CREATE TABLE table_name_36 (tournament VARCHAR) |
SELECT job, MIN(age) FROM Person GROUP BY job | how old is the youngest person for each job? | CREATE TABLE Person (
name varchar(20),
age INTEGER,
city TEXT,
gender TEXT,
job TEXT
)
CREATE TABLE PersonFriend (
name varchar(20),
friend varchar(20),
year INTEGER
) |
SELECT COUNT(date) FROM table_27734769_8 WHERE high_assists = "Andre Miller (7)" | How many times was the high assists andre miller (7)? | CREATE TABLE table_27734769_8 (date VARCHAR, high_assists VARCHAR) |
SELECT tournament FROM table_name_93 WHERE 2010 = "grand slam tournaments" | Name the tournament for 2010 of grand slam tournaments | CREATE TABLE table_name_93 (tournament VARCHAR) |
SELECT "High rebounds" FROM table_21194 WHERE "High assists" = 'Raymond Felton (12)' | For High Assists of Raymond Felton (12), who were the High rebounds? | CREATE TABLE table_21194 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) |
SELECT COUNT(date) FROM table_27734769_8 WHERE high_rebounds = "Marcus Camby (18)" | How many times was the high rebounds by marcus camby (18)? | CREATE TABLE table_27734769_8 (date VARCHAR, high_rebounds VARCHAR) |
SELECT attendance FROM table_name_52 WHERE record = "17-22" | What is the attendance number for the record of 17-22? | CREATE TABLE table_name_52 (attendance VARCHAR, record VARCHAR) |
SELECT MAX("rank") FROM table_204_713 | how many rankings are there ? | CREATE TABLE table_204_713 (
id number,
"rank" number,
"bib" number,
"athlete" text,
"country" text,
"time" text,
"deficit" text
) |
SELECT date FROM table_27734769_8 WHERE high_rebounds = "LaMarcus Aldridge (6)" | What is the date the high rebounds were by lamarcus aldridge (6)? | CREATE TABLE table_27734769_8 (date VARCHAR, high_rebounds VARCHAR) |
SELECT record FROM table_name_76 WHERE loss = "westbrook (1-6)" | What is the record when the loss is westbrook (1-6)? | CREATE TABLE table_name_76 (record VARCHAR, loss VARCHAR) |
SELECT MIN("Races") FROM table_51172 WHERE "Pole" < '2' AND "Season" = '2007' | WHAT ARE THE RACES WITH A POLE SMALLER THAN 2 IN 2007? | CREATE TABLE table_51172 (
"Season" text,
"Races" real,
"Podiums" real,
"Pole" real,
"FLaps" real
) |
SELECT high_assists FROM table_27744844_7 WHERE game = 35 | Who had the most assists and how many did they have in game 35? | CREATE TABLE table_27744844_7 (high_assists VARCHAR, game VARCHAR) |
SELECT score FROM table_name_17 WHERE round = "1st round" AND club = "union luxembourg" | What is the final score of the 1st round game of club Union Luxembourg? | CREATE TABLE table_name_17 (score VARCHAR, round VARCHAR, club VARCHAR) |
SELECT COUNT(*) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '003-33922')) AND STRFTIME('%y', medication.drugstarttime) <= '2104' | calculate how many medicines were prescribed to patient 003-33922 until 2104. | CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code 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 lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
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 cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
) |
SELECT high_rebounds FROM table_27744844_7 WHERE date = "January 19" | Who had the most rebounds and how many did they have on January 19? | CREATE TABLE table_27744844_7 (high_rebounds VARCHAR, date VARCHAR) |
SELECT competition FROM table_name_58 WHERE round = "1st round" AND club = "union luxembourg" | Which competition features the 1st round of Club Union Luxembourg? | CREATE TABLE table_name_58 (competition VARCHAR, round VARCHAR, club VARCHAR) |
SELECT ACC_Road, AVG(School_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY AVG(School_ID) DESC | Show me about the distribution of ACC_Road and the average of School_ID , and group by attribute ACC_Road in a bar chart, I want to display Y in desc order. | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
) |
SELECT team FROM table_27744976_11 WHERE date = "April 9" | Which team played on April 9? | CREATE TABLE table_27744976_11 (team VARCHAR, date VARCHAR) |
SELECT competition FROM table_name_71 WHERE round = "2nd round" AND score = "1:0, 0:1 (4:3 a.p.)" | Which Competition has a 2nd round score of 1:0, 0:1 (4:3 a.p.)? | CREATE TABLE table_name_71 (competition VARCHAR, round VARCHAR, score VARCHAR) |
SELECT county, COUNT(*), SUM(enrollment) FROM school GROUP BY county | Show each county along with the number of schools and total enrollment in each county. | CREATE TABLE school (
county VARCHAR,
enrollment INTEGER
) |
SELECT high_points FROM table_27744844_5 WHERE date = "November 6" | Which player scored the most points and how many were scored on November 6? | CREATE TABLE table_27744844_5 (high_points VARCHAR, date VARCHAR) |
SELECT score FROM table_name_58 WHERE club = "fk austria wien" | What's the final score of the competition that features the club of fk Austria wien? | CREATE TABLE table_name_58 (score VARCHAR, club VARCHAR) |
SELECT "Transfer fee" FROM table_8154 WHERE "Name" = 'jimmy gibson' | What is the transfer fee for Jimmy Gibson? | CREATE TABLE table_8154 (
"Nat." text,
"Name" text,
"Moving to" text,
"Type" text,
"Transfer window" text,
"Transfer fee" text
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.