table
stringlengths
33
7.14k
question
stringlengths
4
1.06k
output
stringlengths
2
4.44k
⌀
CREATE TABLE table_36921 ( "Nation" text, "Skip" text, "Third" text, "Second" text, "Lead" text )
What is Spain's skip?
SELECT "Skip" FROM table_36921 WHERE "Nation" = 'spain'
CREATE TABLE table_name_78 ( attendance VARCHAR, date VARCHAR )
What was the attendance on October 6?
SELECT attendance FROM table_name_78 WHERE date = "october 6"
CREATE TABLE table_204_664 ( id number, "rank" number, "bib" number, "name" text, "nationality" text, "start" text, "penalties (p+p+s+s)" text, "time" text, "deficit" text )
how many took at least 35:00 to finish ?
SELECT COUNT(*) FROM table_204_664 WHERE "time" >= 35
CREATE TABLE table_34397 ( "Date" text, "Tournament" text, "Location" text, "Winner" text, "Score" text, "1st prize ( $ )" text )
What is the name of the Winner in north carolina at the greater greensboro open?
SELECT "Winner" FROM table_34397 WHERE "Location" = 'north carolina' AND "Tournament" = 'greater greensboro open'
CREATE TABLE table_1341884_45 ( first_elected VARCHAR, district VARCHAR )
how many voted in the texas 6 section
SELECT first_elected FROM table_1341884_45 WHERE district = "Texas 6"
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 lab ( subject_id text, hadm_id text, ...
What is maximum age of hispanic, latino, or puerto rican patients whose duration of hospital stay was 14 days?
SELECT MAX(demographic.age) FROM demographic WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND demographic.days_stay = "14"
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswer...
SOpt - Number of active posts last month per mod.
SELECT COUNT(*) AS PostsLastMonth, 6 AS Moderators, (COUNT(*) / 6) AS PostsLastMonthPerMod FROM Posts WHERE LastActivityDate >= DATEADD(month, -1, (SELECT MAX(LastActivityDate) FROM Posts))
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 food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE...
which flight between PITTSBURGH and BALTIMORE on 7 19 has the smallest seating capacity
SELECT DISTINCT FLIGHT_0.flight_id FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, airport_service AS AIRPORT_SERVICE_3, city AS CITY_0, city AS CITY_1, city AS CITY_2, city AS CITY_3, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days A...
CREATE TABLE table_13650 ( "Round" real, "Dates" text, "Rally Name" text, "Rally HQ" text, "Support Category" text, "Surface" text )
Which Rally Name has a Surface of asphalt and gravel?
SELECT "Rally Name" FROM table_13650 WHERE "Surface" = 'asphalt and gravel'
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE icustays ( row_id number, ...
what is the maximum daily number of people diagnosed with streptococcal septicemia the last year?
SELECT MAX(t1.c1) FROM (SELECT COUNT(DISTINCT diagnoses_icd.hadm_id) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'streptococcal septicemia') AND DATETIME(diagnoses_icd.charttime, 'start of year') = DATETIME(CURRENT_T...
CREATE TABLE table_name_47 ( location_attendance VARCHAR, date VARCHAR )
What was the location attendance on January 19?
SELECT location_attendance FROM table_name_47 WHERE date = "january 19"
CREATE TABLE musical ( Musical_ID int, Name text, Year int, Award text, Category text, Nominee text, Result text ) CREATE TABLE actor ( Actor_ID int, Name text, Musical_ID int, Character text, Duration text, age int )
Give me a histogram for how many musicals has each nominee been nominated for?
SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee
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, ...
give me the list of patients with lab test item id 50824 who died in or before 2115.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2115.0" AND lab.itemid = "50824"
CREATE TABLE table_2509202_2 ( tipuani_municipality VARCHAR, tacacoma_municipality VARCHAR )
tipuani municipality when tacacoma municipality is 6?
SELECT tipuani_municipality FROM table_2509202_2 WHERE tacacoma_municipality = "6"
CREATE TABLE table_15188 ( "Year" real, "Population (Total)" real, "(Barcaldine)" real, "(Aramac)" real, "(Jericho)" real )
What is the average (Jericho) with a Population (Total) less than 4,059 in 1986 and a (Barcaldine) higher than 1,779?
SELECT AVG("(Jericho)") FROM table_15188 WHERE "Population (Total)" < '4,059' AND "Year" = '1986' AND "(Barcaldine)" > '1,779'
CREATE TABLE table_name_86 ( score VARCHAR, place VARCHAR, country VARCHAR )
What Score has a Place of t8, and a Country of scotland?
SELECT score FROM table_name_86 WHERE place = "t8" AND country = "scotland"
CREATE TABLE table_72699 ( "Date" text, "Cover model" text, "Centerfold model" text, "Interview subject" text, "20 Questions" text, "Pictorials" text )
List the pictorals from issues when lindsey roeper was the cover model.
SELECT "Pictorials" FROM table_72699 WHERE "Cover model" = 'Lindsey Roeper'
CREATE TABLE table_79640 ( "Round" real, "Date" text, "Home Team" text, "Away Team" text, "Attendance" real, "Stadium" text )
What is the least round for the game played at Members Equity Stadium in from of 12,581 people?
SELECT MIN("Round") FROM table_79640 WHERE "Stadium" = 'members equity stadium' AND "Attendance" < '12,581'
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE labev...
what were the four most frequently prescribed drugs at the same time, since 4 years ago, among the patients who were prescribed with heparin flush port (10units/ml)?
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'heparin flush port (10units/ml)' AND DATETIME(prescriptions.start...
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic (...
How many of the patients with icd9 code 598 died in or before the 2115?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2155.0" AND procedures.icd9_code = "598"
CREATE TABLE table_204_672 ( id number, "year" number, "title" text, "label" text, "uk singles chart" number, "u.s. billboard hot 100 chart" number )
what was the last single from this music group ?
SELECT "title" FROM table_204_672 ORDER BY id DESC LIMIT 1
CREATE TABLE table_65330 ( "Position" text, "Height (cm)" real, "Weight (kg)" real, "Birthplace" text, "2009\u201310 team" text )
What is the sum of the heights for the Cornell Big Red?
SELECT SUM("Height (cm)") FROM table_65330 WHERE "2009\u201310 team" = 'cornell big red'
CREATE TABLE table_29368 ( "Episode #" real, "Title" text, "Directed by" text, "Written by" text, "Originalairdate" text, "Ratings" text )
What were the ratings for 'episode 6'?
SELECT "Ratings" FROM table_29368 WHERE "Title" = 'Episode 6'
CREATE TABLE table_train_137 ( "id" int, "hbv" bool, "systolic_blood_pressure_sbp" int, "hemoglobin_a1c_hba1c" float, "substance_dependence" bool, "hcv" bool, "schizophrenia" bool, "neutrophil_count" int, "renal_disease" bool, "creatinine_clearance_cl" float, "platelet_count"...
subject has a history of primary psychotic disorder ( e.g. schizophrenia, schizoaffective disorder, delusional disorder ) or bipolar disorder.
SELECT * FROM table_train_137 WHERE primary_psychotic_disorder = 1 OR schizophrenia = 1 OR schizoaffective_disorder = 1 OR delusional_disorder = 1 OR bipolar_disorder = 1
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_Per...
Show me team_id by acc regular season in a histogram, list by the Y-axis in desc.
SELECT ACC_Regular_Season, Team_ID FROM basketball_match ORDER BY Team_ID DESC
CREATE TABLE table_17069 ( "Player" text, "Position" text, "School" text, "Hometown" text, "College" text )
WHAT SCHOOL DID THE PLAYER FROM SOUTH CAROLINA ATTEND?
SELECT "School" FROM table_17069 WHERE "College" = 'South Carolina'
CREATE TABLE table_name_64 ( zone INTEGER, stations VARCHAR )
Name the average zone for waddon marsh tram stop
SELECT AVG(zone) FROM table_name_64 WHERE stations = "waddon marsh tram stop"
CREATE TABLE table_143579_1 ( area___ha__ INTEGER, island VARCHAR )
What is the area of Colonsay Island?
SELECT MIN(area___ha__) FROM table_143579_1 WHERE island = "Colonsay"
CREATE TABLE table_22328 ( "Serial No." real, "District" text, "Headquartered City" text, "City Population (2009)" real, "City Area(km 2 )" real )
In what district is the city listed in Serial number 9?
SELECT COUNT("District") FROM table_22328 WHERE "Serial No." = '9'
CREATE TABLE table_name_98 ( date VARCHAR, away_team VARCHAR )
On what Date is Carlton the Away Team?
SELECT date FROM table_name_98 WHERE away_team = "carlton"
CREATE TABLE Customer_Contact_Channels ( customer_id INTEGER, channel_code VARCHAR(15), active_from_date DATETIME, active_to_date DATETIME, contact_number VARCHAR(50) ) CREATE TABLE Order_Items ( order_id INTEGER, product_id INTEGER, order_quantity VARCHAR(15) ) CREATE TABLE Customer_A...
Find the number of orders in each day and bin the number of orders by customers in a line chart.
SELECT order_date, COUNT(order_date) FROM Customers AS t1 JOIN Customer_Orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = "Delivered" GROUP BY customer_name
CREATE TABLE table_651 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "U.S. viewers (millions)" text )
What's the series number of the episode that's written by Elizabeth Devine?
SELECT MIN("No. in series") FROM table_651 WHERE "Written by" = 'Elizabeth Devine'
CREATE TABLE table_31751 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Venue" text, "Start Time" text, "Attendance" text )
Tell me the number of weeks for december 5, 2005
SELECT COUNT("Week") FROM table_31751 WHERE "Date" = 'december 5, 2005'
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_Per...
Find the total student enrollment for different affiliation type schools Plot them as bar chart, could you rank by the names from high to low?
SELECT Affiliation, SUM(Enrollment) FROM university GROUP BY Affiliation ORDER BY Affiliation DESC
CREATE TABLE table_15187735_6 ( segment_a VARCHAR, segment_c VARCHAR )
What is the Segment A for when Segment C is s Sailboard?
SELECT segment_a FROM table_15187735_6 WHERE segment_c = "s Sailboard"
CREATE TABLE table_name_69 ( venue VARCHAR, competition VARCHAR )
Competition of fa cup rd 1 had what venue?
SELECT venue FROM table_name_69 WHERE competition = "fa cup rd 1"
CREATE TABLE table_31813 ( "Nomination" text, "Actor's Name" text, "Film Name" text, "Director" text, "Country" text )
Tell me the actor's name for escho raz o voyne
SELECT "Actor's Name" FROM table_31813 WHERE "Film Name" = 'escho raz o voyne'
CREATE TABLE table_name_50 ( year INTEGER, play VARCHAR, recipient VARCHAR )
Name the average year for much ado about nothing and recipient of ray virta
SELECT AVG(year) FROM table_name_50 WHERE play = "much ado about nothing" AND recipient = "ray virta"
CREATE TABLE table_64399 ( "Season" real, "Series" text, "Team" text, "Races" text, "Wins" text, "Poles" text, "F/Laps" text, "Podiums" text, "Points" text, "Position" text )
What Podiums listing has a World Rally Championship series entry?
SELECT "Podiums" FROM table_64399 WHERE "Series" = 'world rally championship'
CREATE TABLE table_7541 ( "Date" text, "Opponent" text, "Location" text, "Result" text, "Attendance" real )
Where did they play against Clemson?
SELECT "Location" FROM table_7541 WHERE "Opponent" = 'clemson'
CREATE TABLE table_name_89 ( release_date VARCHAR, country VARCHAR, release_format VARCHAR )
How many release dates have a Country of west germany, and a Release format of vinyl?
SELECT COUNT(release_date) FROM table_name_89 WHERE country = "west germany" AND release_format = "vinyl"
CREATE TABLE table_203_798 ( id number, "party" text, "votes" text, "%" number, "swing" number, "seats" number, "change" number )
how many votes did the independent party have ?
SELECT "votes" FROM table_203_798 WHERE "party" = 'independent'
CREATE TABLE table_name_16 ( res VARCHAR, round VARCHAR, opponent VARCHAR )
What was the result when there were less than 3 rounds against Gil Rael?
SELECT res FROM table_name_16 WHERE round < 3 AND opponent = "gil rael"
CREATE TABLE table_name_17 ( award VARCHAR, year VARCHAR, result VARCHAR )
What is the name of the award in a year more than 2005, and the Result of nominated?
SELECT award FROM table_name_17 WHERE year > 2005 AND result = "nominated"
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId...
Get Title, ViewCount for all posts.
SELECT Title, ViewCount FROM Posts
CREATE TABLE table_name_19 ( team VARCHAR, high_assists VARCHAR, date VARCHAR )
Which team was played against on the game where Earl Watson (6) had the highest assists on January 19?
SELECT team FROM table_name_19 WHERE high_assists = "earl watson (6)" AND date = "january 19"
CREATE TABLE table_10930 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
How many laps have a Time/Retired of +12.5 secs?
SELECT COUNT("Laps") FROM table_10930 WHERE "Time/Retired" = '+12.5 secs'
CREATE TABLE table_12014 ( "Rider" text, "Horse" text, "Faults" text, "Round 1 + 2A Points" text, "Total" real )
Tell me the highest total when the horse is spender s
SELECT MAX("Total") FROM table_12014 WHERE "Horse" = 'spender s'
CREATE TABLE Students_in_Detention ( student_id INTEGER, detention_id INTEGER, incident_id INTEGER ) CREATE TABLE Ref_Address_Types ( address_type_code VARCHAR(15), address_type_description VARCHAR(80) ) CREATE TABLE Students ( student_id INTEGER, address_id INTEGER, first_name VARCHAR...
Visualize a bar chart about the distribution of other_details and the average of monthly_rental , and group by attribute other_details.
SELECT other_details, AVG(monthly_rental) FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental DESC
CREATE TABLE Participants_in_Events ( Event_ID INTEGER, Participant_ID INTEGER ) CREATE TABLE Participants ( Participant_ID INTEGER, Participant_Type_Code CHAR(15), Participant_Details VARCHAR(255) ) CREATE TABLE Services ( Service_ID INTEGER, Service_Type_Code CHAR(15) ) CREATE TABLE Eve...
Draw a bar chart for what are the ids and details of events that have more than one participants?, and show in asc by the Y.
SELECT T1.Event_Details, T1.Event_ID FROM Events AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID = T2.Event_ID GROUP BY T1.Event_Details ORDER BY T1.Event_ID
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 d_icd_diagnoses ( row_id number, icd9_code text, sh...
give me the top four of the most common output events?
SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT t1.itemid FROM (SELECT outputevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM outputevents GROUP BY outputevents.itemid) AS t1 WHERE t1.c1 <= 4)
CREATE TABLE table_name_36 ( balls VARCHAR, strike_rate VARCHAR )
When the strike rate is 70.10, what is the balls?
SELECT balls FROM table_name_36 WHERE strike_rate = "70.10"
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, ...
how many single patients are diagnosed with migrne unsp wo ntrc mgrn?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "SINGLE" AND diagnoses.short_title = "Migrne unsp wo ntrc mgrn"
CREATE TABLE procedures ( 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 diagnoses ( ...
what is lab test abnormal status of subject id 6983?
SELECT lab.flag FROM lab WHERE lab.subject_id = "6983"
CREATE TABLE table_16815824_1 ( round5 VARCHAR, total_points VARCHAR )
What was the round 5 score if the team's total points where 212?
SELECT round5 FROM table_16815824_1 WHERE total_points = 212
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 ) C...
what is date of death and discharge time of subject id 94762?
SELECT demographic.dod, demographic.dischtime FROM demographic WHERE demographic.subject_id = "94762"
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 aircraft (...
show me the flights arriving at DAL from all other airports
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
CREATE TABLE table_name_52 ( score VARCHAR, game VARCHAR )
What was the score of game 30?
SELECT score FROM table_name_52 WHERE game = 30
CREATE TABLE table_203_593 ( id number, "tenure" text, "coach" text, "years" number, "record" text, "pct." number, "ncaa tournament" number )
who was the first coach to reach the ncaa tournament ?
SELECT "coach" FROM table_203_593 WHERE NOT "ncaa tournament" IS NULL ORDER BY "tenure" LIMIT 1
CREATE TABLE table_19704392_1 ( rpm VARCHAR, standard_speed__6th_gear_ VARCHAR )
when standard speed (6th gear) is 88, what is the rpm?
SELECT rpm FROM table_19704392_1 WHERE standard_speed__6th_gear_ = "88"
CREATE TABLE table_47742 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Attendance" real, "Record" text, "Points" real )
What home is dated march 19?
SELECT "Home" FROM table_47742 WHERE "Date" = 'march 19'
CREATE TABLE diagnoses ( 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, ...
metion the age and primary disease of gonzalo wasson.
SELECT demographic.age, demographic.diagnosis FROM demographic WHERE demographic.name = "Gonzalo Wasson"
CREATE TABLE table_4420 ( "Pick" text, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text )
I want the NHL team for wade belak
SELECT "NHL team" FROM table_4420 WHERE "Player" = 'wade belak'
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CR...
what is the difference in arterial bp [diastolic] in patient 3125's last measured on the current icu visit compared to the value first measured on the current icu visit.
SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3125) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_it...
CREATE TABLE table_204_868 ( id number, "outcome" text, "no." number, "date" text, "tournament" text, "surface" text, "opponent" text, "score" text )
what is the number of victories this player has had on hard surfaces ?
SELECT COUNT(*) FROM table_204_868 WHERE "surface" = 'hard'
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,...
what is the last flight leaving SAN FRANCISCO going to WASHINGTON on friday
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, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHINGTON' AND date_day.day_number = 25 AND date_day.month_number = 6 A...
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 t...
provide the number of patients whose gender is f and procedure long title is atrial cardioversion?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "F" AND procedures.long_title = "Atrial cardioversion"
CREATE TABLE Rating ( rID int, mID int, stars int, ratingDate date ) CREATE TABLE Reviewer ( rID int, name text ) CREATE TABLE Movie ( mID int, title text, year int, director text )
Compare the lowest rating among all movies by each director using a bar chart.
SELECT director, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY director
CREATE TABLE table_61162 ( "Lince" text, "Leopard 2A4" text, "Leclerc" text, "M1A1 Abrams" text, "M60A3 Patton" text )
What's the lince when Leclerc was Hp (kw)?
SELECT "Lince" FROM table_61162 WHERE "Leclerc" = 'hp (kw)'
CREATE TABLE table_name_22 ( events INTEGER, earnings VARCHAR, average VARCHAR )
Which Events has Earnings of $113,259, and an Average larger than 229.5?
SELECT MAX(events) FROM table_name_22 WHERE earnings = "$113,259" AND average > 229.5
CREATE TABLE table_12250 ( "Round" real, "Date" text, "Event" text, "Circuit" text, "Winning Driver" text, "Winning Team" text )
Which Circuit has an Event of international procar meeting?
SELECT "Circuit" FROM table_12250 WHERE "Event" = 'international procar meeting'
CREATE TABLE table_16799784_7 ( diameter__km_ VARCHAR, longitude VARCHAR )
what is the diameter (km) of longitude 170.1e
SELECT diameter__km_ FROM table_16799784_7 WHERE longitude = "170.1E"
CREATE TABLE table_57955 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
What is the low lap total for a grid of 14?
SELECT MIN("Laps") FROM table_57955 WHERE "Grid" = '14'
CREATE TABLE table_16372911_1 ( acc_home VARCHAR, acc__percentage VARCHAR )
what was the ACC home game record for the team who's ACC winning percentage was .813?
SELECT acc_home FROM table_16372911_1 WHERE acc__percentage = ".813"
CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE prescriptions ( row_id number, subject_id number, h...
how many patients have undergone vaccination nec within 2 months after first receiving inj/inf platelet inhibit?
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime 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 = 'inj/inf pla...
CREATE TABLE table_25695 ( "Player" text, "Games Played" real, "Minutes" real, "Field Goals" real, "Three Pointers" real, "Free Throws" real, "Rebounds" real, "Assists" real, "Blocks" real, "Steals" real, "Points" real )
Name the most free throws for 4 steals
SELECT MAX("Free Throws") FROM table_25695 WHERE "Steals" = '4'
CREATE TABLE table_55565 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What's the crowd population of the home team located in Richmond?
SELECT SUM("Crowd") FROM table_55565 WHERE "Home team" = 'richmond'
CREATE TABLE people ( Hometown VARCHAR, People_ID VARCHAR ) CREATE TABLE gymnast ( Gymnast_ID VARCHAR, Total_Points INTEGER )
What are the distinct hometowns of gymnasts with total points more than 57.5?
SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T1.Total_Points > 57.5
CREATE TABLE table_train_70 ( "id" int, "pregnancy_or_lactation" bool, "white_blood_cell_count_wbc" int, "systolic_blood_pressure_sbp" int, "mean_arterial_pressure_map" int, "temperature" float, "oliguria" bool, "surgery" bool, "heart_rate" int, "systemic_inflammatory_response" b...
pregnant or breast feeding female
SELECT * FROM table_train_70 WHERE pregnancy_or_lactation = 1
CREATE TABLE table_17723 ( "Year" real, "Population (Region total)" real, "Population (Stanthorpe)" real, "Population (Warwick)" real, "Population (Allora)" real, "Population (Glengallan)" real, "Population (Rosenthal)" real )
What is the maximum population size in the town of Glengallen?
SELECT MAX("Population (Glengallan)") FROM table_17723
CREATE TABLE table_9511 ( "Position" real, "Team" text, "Played" real, "Drawn" real, "Lost" real, "Goals For" real, "Goals Against" real, "Goal Difference" text, "Points 1" text )
What is the highest number of goals for for teams with 25 losses?
SELECT MAX("Goals For") FROM table_9511 WHERE "Lost" = '25'
CREATE TABLE table_36338 ( "Volume" text, "Discs" real, "Episodes" real, "Region 1 release" text, "Region 2 release" text, "Region 4 release" text )
What is the region 4 release that has july 20, 2009 as the region 2?
SELECT "Region 4 release" FROM table_36338 WHERE "Region 2 release" = 'july 20, 2009'
CREATE TABLE table_38396 ( "Name" text, "Years of Operation" text, "Location" text, "Historical Photos" text, "Year Clubhouse Constructed" text, "Sign-in/Bicker" text, "Year co-ed" text )
When was the Clubhouse built with a Sign-in/Bicker of bicker, and Named cannon club?
SELECT "Year Clubhouse Constructed" FROM table_38396 WHERE "Sign-in/Bicker" = 'bicker' AND "Name" = 'cannon club'
CREATE TABLE table_26418 ( "Outcome" text, "Year" real, "Championship" text, "Surface" text, "Partner" text, "Opponents" text, "Score" text )
Name the score for san diego
SELECT "Score" FROM table_26418 WHERE "Championship" = 'San Diego'
CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE program ( program_id int, name v...
What MDE classes are offered next Winter ?
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id WHERE program_cour...
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,...
calculate the minimum days for which patients who were admitted on or after 2179 were hospitalized.
SELECT MIN(demographic.days_stay) FROM demographic WHERE demographic.admityear >= "2179"
CREATE TABLE table_204_667 ( id number, "year" number, "film title" text, "genre" text, "cast" text, "notes" text )
what is the title listed after parva ?
SELECT "film title" FROM table_204_667 WHERE id = (SELECT id FROM table_204_667 WHERE "film title" = 'parva') + 1
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 t...
give the number of patients whose diagnosis icd9 code is v5416 and lab test fluid is pleural.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "V5416" AND lab.fluid = "Pleural"
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, ...
count the number of patients who have already undergone a sputum, expectorated microbiology test until 1 year ago.
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT microlab.patientunitstayid FROM microlab WHERE microlab.culturesite = 'sputum, expectorated' AND DATETIME(microlab.culturetakentime) <= DATETIME(CURRENT_TIME(), '-1 year'))
CREATE TABLE table_62264 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
What is Visitor, when Date is 'May 9'?
SELECT "Visitor" FROM table_62264 WHERE "Date" = 'may 9'
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 ) ...
what is maximum age of patients whose insurance is self pay and primary disease is hypoxia?
SELECT MAX(demographic.age) FROM demographic WHERE demographic.insurance = "Self Pay" AND demographic.diagnosis = "HYPOXIA"
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, v...
what are the five most frequent lab tests patients have taken within the same month after being diagnosed with senile dementia uncomp?
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, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.i...
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decima...
For those employees who did not have any job in the past, show me about the distribution of hire_date and the sum of manager_id bin hire_date by time in a bar chart, and rank from high to low by the y axis.
SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(MANAGER_ID) DESC
CREATE TABLE table_13606 ( "General election" real, "Name" text, "Share of votes" text, "Seats" real, "Share of seats" text )
Which Share of seats has Seats smaller than 52, and a Name of sdp liberal alliance, and a General election of 1983?
SELECT "Share of seats" FROM table_13606 WHERE "Seats" < '52' AND "Name" = 'sdp–liberal alliance' AND "General election" = '1983'
CREATE TABLE table_43858 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Attendance" real, "Record" text, "Points" real )
What attendance is dated february 27?
SELECT AVG("Attendance") FROM table_43858 WHERE "Date" = 'february 27'
CREATE TABLE table_name_25 ( born_died VARCHAR, term_start VARCHAR )
What is Born-Died, when Term Start is 4 December 1941?
SELECT born_died FROM table_name_25 WHERE term_start = "4 december 1941"
CREATE TABLE table_name_61 ( translation VARCHAR, composer VARCHAR )
WhatTranslation has a Composer of jacques brel, rod mckuen?
SELECT translation FROM table_name_61 WHERE composer = "jacques brel, rod mckuen"
CREATE TABLE table_10305 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What is the name of the venue where the away team scored 17.12 (114)?
SELECT "Venue" FROM table_10305 WHERE "Away team score" = '17.12 (114)'
CREATE TABLE table_54569 ( "Round" real, "Pick" real, "Player" text, "Position" text, "College" text )
What is the average round for players from california?
SELECT AVG("Round") FROM table_54569 WHERE "College" = 'california'
CREATE TABLE table_65044 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text )
Who was the opponent in week 6?
SELECT "Opponent" FROM table_65044 WHERE "Week" = '6'