instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
earliest flight from ATLANTA to PHILADELPHIA
CREATE TABLE compartment_class (compartment varchar,class_type varchar)CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distant int,direction varchar,minutes_dist...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILA...
What is the Country of the Player with a Score of 73-71-76-70=290?
CREATE TABLE table_name_58 (country VARCHAR,score VARCHAR)
SELECT country FROM table_name_58 WHERE score = 73 - 71 - 76 - 70 = 290
When did Manchester United play against Bristol City with an H/A of A?
CREATE TABLE table_76996 ("Date" text,"Opponents" text,"H / A" text,"Result F \u2013 A" text,"Attendance" real)
SELECT "Date" FROM table_76996 WHERE "H / A" = 'a' AND "Opponents" = 'bristol city'
What is the name of the Malta vessel built after 2010 that is a GL class Panamax vessel?
CREATE TABLE table_name_56 (vessel_name VARCHAR,built VARCHAR,class VARCHAR,flag VARCHAR,type VARCHAR)
SELECT vessel_name FROM table_name_56 WHERE flag = "malta" AND type = "panamax" AND class = "gl" AND built > 2010
How many times is tries 0 and appearance less than 0?
CREATE TABLE table_76237 ("Season" text,"Appearance" real,"Tries" real,"Goals" real,"Points" real)
SELECT COUNT("Points") FROM table_76237 WHERE "Tries" = '0' AND "Appearance" < '0'
How many high assists where there for the team of caja laboral?
CREATE TABLE table_29954 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT COUNT("High assists") FROM table_29954 WHERE "Team" = 'Caja Laboral'
Name the total losses for 4 place and ties less than 0
CREATE TABLE table_name_35 (losses VARCHAR,place VARCHAR,ties VARCHAR)
SELECT COUNT(losses) FROM table_name_35 WHERE place = 4 AND ties < 0
How many schools did player number 3 play at?
CREATE TABLE table_72068 ("Player" text,"No." text,"Nationality" text,"Position" text,"Years in Toronto" text,"School/Club Team" text)
SELECT COUNT("School/Club Team") FROM table_72068 WHERE "No." = '3'
What is listed as the Tie no for Home team of Gillingham?
CREATE TABLE table_name_43 (tie_no VARCHAR,home_team VARCHAR)
SELECT tie_no FROM table_name_43 WHERE home_team = "gillingham"
how many races in 2004 , did johnny murtagh not make more than 50,000 dollars in prize money ?
CREATE TABLE table_203_282 (id number,"date" text,"racecourse" text,"distance" text,"race status" text,"race" text,"position" text,"winning distance (lengths)" number,"jockey" text,"rating" number,"going" text,"odds" text,"prize money" text)
SELECT COUNT(*) FROM table_203_282 WHERE "prize money" <= 50000
Name the most total for south korea
CREATE TABLE table_30007505_1 (total INTEGER,country_territory VARCHAR)
SELECT MAX(total) FROM table_30007505_1 WHERE country_territory = "South Korea"
how many medals does iraq have in total ?
CREATE TABLE table_204_248 (id number,"rank" number,"nation" text,"gold" number,"silver" number,"bronze" number,"total" number)
SELECT "total" FROM table_204_248 WHERE "nation" = 'iraq'
What is the winning score before 1959, with runner-up Jackie Pung?
CREATE TABLE table_45322 ("Year" real,"Championship" text,"Winning score" text,"Margin" text,"Runner(s)-up" text)
SELECT "Winning score" FROM table_45322 WHERE "Year" < '1959' AND "Runner(s)-up" = 'jackie pung'
List the names of representatives that have not participated in elections listed here.
CREATE TABLE representative (Name VARCHAR,Representative_ID VARCHAR)CREATE TABLE election (Name VARCHAR,Representative_ID VARCHAR)
SELECT Name FROM representative WHERE NOT Representative_ID IN (SELECT Representative_ID FROM election)
find the maximum age of married patients admitted in or before the year 2194.
CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ...
SELECT MAX(demographic.age) FROM demographic WHERE demographic.marital_status = "MARRIED" AND demographic.admityear >= "2194"
give me a flight from TAMPA to CHARLOTTE on sunday
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 state (state_code text,state_name text,country_name text)CREATE TABLE flight_fare (flight_id int,fare_id int)CREATE TABLE fl...
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 = 'CHARLOTTE' AND date_day.day_number = 27 AND date_day.month_number = 8 AND...
What's the IHSAA Class when the mascot was the Musketeers?
CREATE TABLE table_name_1 (ihsaa_class VARCHAR,mascot VARCHAR)
SELECT ihsaa_class FROM table_name_1 WHERE mascot = "musketeers"
What's the record of the UCS 2 - Battle at the Barn when the round was n/a?
CREATE TABLE table_name_7 (record VARCHAR,round VARCHAR,event VARCHAR)
SELECT record FROM table_name_7 WHERE round = "n/a" AND event = "ucs 2 - battle at the barn"
What was the date that the st. george-illawarra dragons lost?
CREATE TABLE table_11236195_5 (grand_finaldate VARCHAR,losingteam VARCHAR)
SELECT grand_finaldate FROM table_11236195_5 WHERE losingteam = "St. George-Illawarra Dragons"
What country does miguel ngel jim nez player for and has a score of 69?
CREATE TABLE table_name_50 (country VARCHAR,score VARCHAR,player VARCHAR)
SELECT country FROM table_name_50 WHERE score = 69 AND player = "miguel ángel jiménez"
mention the number of patients with diagnosis icd9 code 2768.
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 procedures (subject_id text,hadm_id te...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.icd9_code = "2768"
What is the total amount o teams where winnings is $1,752,299?
CREATE TABLE table_19412 ("Year" real,"Starts" real,"Wins" real,"Top 5" real,"Top 10" real,"Poles" real,"Avg. Start" text,"Avg. Finish" text,"Winnings" text,"Position" text,"Team(s)" text)
SELECT COUNT("Team(s)") FROM table_19412 WHERE "Winnings" = '$1,752,299'
what is the 2010 population density for municipio ponce?
CREATE TABLE table_name_83 (municipio VARCHAR)
SELECT 2010 AS _population_density FROM table_name_83 WHERE municipio = "ponce"
On what date did the opponent in the Toshiaki Sakai final play on a grass surface?
CREATE TABLE table_57817 ("Date" text,"Tournament" text,"Surface" text,"Opponent in the final" text,"Score" text)
SELECT "Date" FROM table_57817 WHERE "Opponent in the final" = 'toshiaki sakai' AND "Surface" = 'grass'
i'd like a TW flight from LAS VEGAS to NEW YORK nonstop
CREATE TABLE month (month_number int,month_name text)CREATE TABLE flight_fare (flight_id int,fare_id int)CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt int)CREATE TABLE airline (airline_code varchar,airline_name text,no...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ((CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'LAS VEGAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'NE...
Who was the visitor on december 15, 1976?
CREATE TABLE table_47005 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Record" text)
SELECT "Visitor" FROM table_47005 WHERE "Date" = 'december 15, 1976'
For those employees who did not have any job in the past, give me the comparison about the amount of hire_date over the hire_date bin hire_date by weekday by a bar chart, and I want to list y axis in descending order.
CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE_NUMBER varchar(20),HIRE_DATE date,JOB_ID varchar(10),SALARY decimal(8,2),COMMISSION_PCT decimal(2,2),MANAGER_ID decimal(6,0),DEPARTMENT_ID decimal(4,0))CREATE TABLE locations (LOCATION_ID decimal(4,0),S...
SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY COUNT(HIRE_DATE) DESC
Bar chart x axis date y axis total number of cloud cover
CREATE TABLE status (station_id INTEGER,bikes_available INTEGER,docks_available INTEGER,time TEXT)CREATE TABLE station (id INTEGER,name TEXT,lat NUMERIC,long NUMERIC,dock_count INTEGER,city TEXT,installation_date TEXT)CREATE TABLE weather (date TEXT,max_temperature_f INTEGER,mean_temperature_f INTEGER,min_temperature_f...
SELECT date, SUM(cloud_cover) FROM weather
stated they had visual impairment
CREATE TABLE table_train_257 ("id" int,"serum_bicarbonate" int,"plasma_glucose_concentration" int,"hemoglobin_a1c_hba1c" float,"platelets" int,"visual_impairment" bool,"NOUSE" float)
SELECT * FROM table_train_257 WHERE visual_impairment = 1
When 312 is of which currently forests, km what is the land formation?
CREATE TABLE table_22898 ("land formation" text,"area,km\u00b2" real,"of which currently forests,km\u00b2" real,"% forests" text,"habitat type" text)
SELECT "land formation" FROM table_22898 WHERE "of which currently forests, km\u00b2" = '312'
What is the CFL Team with Will Grant?
CREATE TABLE table_39811 ("Pick #" real,"CFL Team" text,"Player" text,"Position" text,"College" text)
SELECT "CFL Team" FROM table_39811 WHERE "Player" = 'will grant'
Find the names of the items that did not receive any review.
CREATE TABLE item (i_id number,title text)CREATE TABLE review (a_id number,u_id number,i_id number,rating number,rank number)CREATE TABLE useracct (u_id number,name text)CREATE TABLE trust (source_u_id number,target_u_id number,trust number)
SELECT title FROM item WHERE NOT i_id IN (SELECT i_id FROM review)
Tell me the Actor's name for film name of sara
CREATE TABLE table_31779 ("Nomination" text,"Actor's Name" text,"Film Name" text,"Director" text,"Country" text)
SELECT "Actor's Name" FROM table_31779 WHERE "Film Name" = 'sara'
What is the largest ration with an ordinary value of 84 zolotnik?
CREATE TABLE table_name_85 (ratio INTEGER,ordinary_value VARCHAR)
SELECT MAX(ratio) FROM table_name_85 WHERE ordinary_value = "84 zolotnik"
which year was the last time broxburn athletic topped the east region south division tables ?
CREATE TABLE table_204_428 (id number,"season" text,"east superleague" text,"east premier league" text,"east region south division" text,"east region central division" text,"east region north division" text)
SELECT MAX("season") FROM table_204_428 WHERE "east region south division" = 'broxburn athletic'
What team was the away team when the home team was Grimsby Town?
CREATE TABLE table_name_24 (away_team VARCHAR,home_team VARCHAR)
SELECT away_team FROM table_name_24 WHERE home_team = "grimsby town"
What is the Time with a Record that is 15-7?
CREATE TABLE table_name_98 (time VARCHAR,record VARCHAR)
SELECT time FROM table_name_98 WHERE record = "15-7"
What was the crowd total on the day the home team scored 12.12 (84)?
CREATE TABLE table_54831 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT SUM("Crowd") FROM table_54831 WHERE "Home team score" = '12.12 (84)'
what were the top three most frequent diagnoses that were given to patients during the same hospital visit after receiving the c. difficile toxin since 2104?
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...
SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'c. di...
What is the lowest pick # of John Ayres?
CREATE TABLE table_name_15 (pick__number INTEGER,name VARCHAR)
SELECT MIN(pick__number) FROM table_name_15 WHERE name = "john ayres"
If the country of Origin is South Africa, who is the primary user?
CREATE TABLE table_26389588_1 (primary_user VARCHAR,country_of_origin VARCHAR)
SELECT primary_user FROM table_26389588_1 WHERE country_of_origin = "South Africa"
How many bronzes for the nation ranked 14th, with over 14 golds and over 25 silvers?
CREATE TABLE table_name_79 (bronze VARCHAR,silver VARCHAR,gold VARCHAR,rank VARCHAR)
SELECT COUNT(bronze) FROM table_name_79 WHERE gold > "14" AND rank = "14" AND silver > 25
Which wind farm is in the USA and is noted as having multiple farms?
CREATE TABLE table_name_58 (wind_farm VARCHAR,country VARCHAR,notes VARCHAR)
SELECT wind_farm FROM table_name_58 WHERE country = "usa" AND notes = "multiple farms"
What year had a pole smaller than 0 and in 77th position?
CREATE TABLE table_name_57 (year INTEGER,position VARCHAR,poles VARCHAR)
SELECT MAX(year) FROM table_name_57 WHERE position = "77th" AND poles < 0
what are the four most commonly diagnosed diagnoses for patients who had previously received opn chest cardiac massag within 2 months this year?
CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE...
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissi...
How many positions have 9 as a drawn, 5 as a difference, with a lost less than 14?
CREATE TABLE table_name_9 (position VARCHAR,lost VARCHAR,drawn VARCHAR,difference VARCHAR)
SELECT COUNT(position) FROM table_name_9 WHERE drawn = 9 AND difference = "5" AND lost < 14
How many points did the Wildcats get when Baylor was an opponent?
CREATE TABLE table_26933 ("Game" real,"Date" text,"Opponent" text,"Result" text,"Wildcats points" real,"Opponents" real,"Record" text)
SELECT "Wildcats points" FROM table_26933 WHERE "Opponent" = 'Baylor'
what are your flights from DALLAS to BALTIMORE
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 compartment_class (compartment varchar,class_ty...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMO...
what is the number of football classes lafayette high school has ?
CREATE TABLE table_204_624 (id number,"school" text,"team name" text,"town" text,"county" text,"enrollment (2010-11 & 2011-12)" number,"primary mshsaa class*" number,"football class" number)
SELECT "football class" FROM table_204_624 WHERE "school" = 'lafayette high school'
how many have times of 6
CREATE TABLE table_13512105_3 (fastest_lap VARCHAR,rnd VARCHAR)
SELECT COUNT(fastest_lap) FROM table_13512105_3 WHERE rnd = 6
since 4 years ago, what were the three most frequently diagnosed conditions?
CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate t...
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t1.icd9_code FROM (SELECT diagnoses_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnoses_icd WHERE DATETIME(diagnoses_icd.charttime) >= DATETIME(CURRENT_TIME(), '-4 year') GROUP BY diagnoses_icd....
What was the total attendance of aalesund which had a capacity with more than 96.14%?
CREATE TABLE table_75345 ("Team" text,"Stadium" text,"Capacity" real,"Turf" text,"Total" real,"Games" real,"Average" real,"% of Capacity" real)
SELECT MAX("Total") FROM table_75345 WHERE "Team" = 'aalesund' AND "% of Capacity" > '96.14'
Billy Ray Brown plays for what country?
CREATE TABLE table_name_9 (country VARCHAR,player VARCHAR)
SELECT country FROM table_name_9 WHERE player = "billy ray brown"
How many entries are shown for high points when the score was l 87 89 (ot)?
CREATE TABLE table_3862 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT COUNT("High points") FROM table_3862 WHERE "Score" = 'L 87–89 (OT)'
Name the lmp 1 winning team for rnd being 2 and adrian fern ndez luis d az
CREATE TABLE table_23088 ("Rnd" real,"Circuit" text,"LMP1 Winning Team" text,"LMP2 Winning Team" text,"GT2 Winning Team" text,"Challenge Winning Team" text,"Results" text)
SELECT "LMP1 Winning Team" FROM table_23088 WHERE "Rnd" = '2' AND "LMP2 Winning Team" = 'Adrian Fernández Luis Díaz'
Who won the 17 staged event in 1987?
CREATE TABLE table_name_83 (winner VARCHAR,stages VARCHAR,year VARCHAR)
SELECT winner FROM table_name_83 WHERE stages = "17" AND year = "1987"
What was the venue where there were 62 runs?
CREATE TABLE table_name_97 (venue VARCHAR,runs VARCHAR)
SELECT venue FROM table_name_97 WHERE runs = "62"
What is the origin of the constellation that can be abbreviated to tele?
CREATE TABLE table_287159_1 (origin VARCHAR,other_abbreviation VARCHAR)
SELECT origin FROM table_287159_1 WHERE other_abbreviation = "Tele"
what is the number of patients whose age is less than 59 and diagnoses short title is open wound of head nec?
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 ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "59" AND diagnoses.short_title = "Open wound of head NEC"
Tell me the sum of silver for liechtenstein and bronze more than 4
CREATE TABLE table_55258 ("Rank" real,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real)
SELECT SUM("Silver") FROM table_55258 WHERE "Nation" = 'liechtenstein' AND "Bronze" > '4'
What was the maximum value that Christer Tornell gave when Trine Dehli Cleve gave a 9?
CREATE TABLE table_4078 ("Couple" text,"Style" text,"Music" text,"Trine Dehli Cleve" real,"Tor Fl\u00f8ysvik" real,"Karianne Gulliksen" real,"Christer Tornell" real,"Total" real)
SELECT MAX("Christer Tornell") FROM table_4078 WHERE "Trine Dehli Cleve" = '9'
what comes after kf la i and what is their wins
CREATE TABLE table_204_623 (id number,"opponent" text,"goals" text,"wins" number,"draws" number,"losses" number,"+- goals" number,"matches" number,"qualified" number,"eliminated" number)
SELECT "opponent", "wins" FROM table_204_623 WHERE id = (SELECT id FROM table_204_623 WHERE "opponent" = 'kf laci') + 1
what are the top four of the most frequent output event in 2100?
CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,dr...
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 WHERE STRFTIME('%y', outputevents.charttime) = '2100' GROUP BY outputevents.itemid) AS t1 WHERE t1.c1 <= 4)
Name the young rider classification for giuseppe saronni at stage 6
CREATE TABLE table_10723 ("Stage" text,"Winner" text,"General classification" text,"Points classification" text,"Mountains classification" text,"Young rider classification" text,"Trofeo Fast Team" text)
SELECT "Young rider classification" FROM table_10723 WHERE "General classification" = 'giuseppe saronni' AND "Stage" = '6'
What is the year that Hale Irwin won with 285 points?
CREATE TABLE table_name_80 (year_s__won VARCHAR,total VARCHAR,player VARCHAR)
SELECT year_s__won FROM table_name_80 WHERE total = 285 AND player = "hale irwin"
What is the English name of g sh xi n?
CREATE TABLE table_4031 ("English Name" text,"Simplified" text,"Traditional" text,"Pinyin" text,"Area" real,"Population" real,"Density" real)
SELECT "English Name" FROM table_4031 WHERE "Pinyin" = 'Gùshǐ Xiàn'
Which city includes the Target Center arena?
CREATE TABLE table_75106 ("Conference" text,"Division" text,"Team" text,"City" text,"Home Arena" text)
SELECT "City" FROM table_75106 WHERE "Home Arena" = 'target center'
The trend about the the number of season of different Home_team over the season, display by the X from low to high.
CREATE TABLE game (stadium_id int,id int,Season int,Date text,Home_team text,Away_team text,Score text,Competition text)CREATE TABLE injury_accident (game_id int,id int,Player text,Injury text,Number_of_matches text,Source text)CREATE TABLE stadium (id int,name text,Home_Games int,Average_Attendance real,Total_Attendan...
SELECT Season, COUNT(Season) FROM game GROUP BY Home_team ORDER BY Season
Name the mission name for 21 november 1969
CREATE TABLE table_1558077_8 (mission_name VARCHAR,lunar_blastoff_date VARCHAR)
SELECT mission_name FROM table_1558077_8 WHERE lunar_blastoff_date = "21 November 1969"
how did patient 8569 get last admission to the hospital during this year?
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 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 ...
SELECT admissions.admission_type FROM admissions WHERE admissions.subject_id = 8569 AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') ORDER BY admissions.admittime DESC LIMIT 1
What was the outcome on August 5, 2007?
CREATE TABLE table_name_59 (outcome VARCHAR,date VARCHAR)
SELECT outcome FROM table_name_59 WHERE date = "august 5, 2007"
Who is the captain of the team coached by Giles White?
CREATE TABLE table_name_28 (captain VARCHAR,coach VARCHAR)
SELECT captain FROM table_name_28 WHERE coach = "giles white"
What is the P max (bar) of the pistol with a P1 diameter of 12.09 mm?
CREATE TABLE table_29167 ("Chambering" text,"P1 diameter (mm)" text,"A external (cm 2)" text,"P max (bar)" real,"F bolt (kgf)" real,"F bolt" text)
SELECT "P max ( bar )" FROM table_29167 WHERE "P1 diameter (mm)" = '12.09'
What is the attendance in a week larter than 4, on December 6, 1992?
CREATE TABLE table_name_80 (attendance VARCHAR,week VARCHAR,date VARCHAR)
SELECT attendance FROM table_name_80 WHERE week > 4 AND date = "december 6, 1992"
What is the highest roll number of the school in Te puna with a decile larger than 2?
CREATE TABLE table_name_85 (roll INTEGER,decile VARCHAR,area VARCHAR)
SELECT MAX(roll) FROM table_name_85 WHERE decile > 2 AND area = "te puna"
What is the Volume:Issue number of the George McCrae song that spent less than 2 weeks on top of the charts?
CREATE TABLE table_name_96 (volume VARCHAR,weeks_on_top VARCHAR,artist VARCHAR)
SELECT volume AS :issue FROM table_name_96 WHERE weeks_on_top < 2 AND artist = "george mccrae"
Name the timeslot for 6.51 viewers
CREATE TABLE table_19834691_4 (timeslot VARCHAR,viewers__millions_ VARCHAR)
SELECT timeslot FROM table_19834691_4 WHERE viewers__millions_ = "6.51"
What kind of animal corresponds to the accession number xp_852505.1?
CREATE TABLE table_20071 ("Genus/Species" text,"Common Name" text,"Accession Number" text,"Length" text,"Similarity" text,"Identity" text)
SELECT "Common Name" FROM table_20071 WHERE "Accession Number" = 'XP_852505.1'
Who is the player when the highest score is 84?
CREATE TABLE table_30783 ("Player" text,"Matches" real,"Innings" real,"Runs" real,"Average" text,"Highest Score" text,"100s" real,"50s" real)
SELECT "Player" FROM table_30783 WHERE "Highest Score" = '84'
What was Kaine's (D) percentage in the Rasmussen poll on October 24, 2005?
CREATE TABLE table_61994 ("Source" text,"Date" text,"Kaine (D)" text,"Kilgore (R)" text,"Potts (I)" text)
SELECT "Kaine (D)" FROM table_61994 WHERE "Source" = 'rasmussen' AND "Date" = 'october 24, 2005'
For those employees who do not work in departments with managers that have ids between 100 and 200, visualize a line chart about the change of manager_id over hire_date , list in desc by the x axis.
CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE_NUMBER varchar(20),HIRE_DATE date,JOB_ID varchar(10),SALARY decimal(8,2),COMMISSION_PCT decimal(2,2),MANAGER_ID decimal(6,0),DEPARTMENT_ID decimal(4,0))CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE va...
SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY HIRE_DATE DESC
Show names of musicals and the number of actors who have appeared in the musicals in a bar chart, sort Y-axis in desc order.
CREATE TABLE actor (Actor_ID int,Name text,Musical_ID int,Character text,Duration text,age int)CREATE TABLE musical (Musical_ID int,Name text,Year int,Award text,Category text,Nominee text,Result text)
SELECT T2.Name, COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID ORDER BY COUNT(*) DESC
what is the number of patients whose ethnicity is hispanic or latino and item id is 51229?
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 demographic (subject_id text,hadm_id text,name text,marita...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "HISPANIC OR LATINO" AND lab.itemid = "51229"
how many patients of black/cape verdean ethinicity have been diagnosed with sternal wound infection?
CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,sho...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND demographic.diagnosis = "STERNAL WOUND INFECTION"
Show all headquarters without a company in banking industry.
CREATE TABLE company (company_id number,rank number,company text,headquarters text,main_industry text,sales_billion number,profits_billion number,assets_billion number,market_value number)CREATE TABLE station_company (station_id number,company_id number,rank_of_the_year number)CREATE TABLE gas_station (station_id numbe...
SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry = 'Banking'
Give me the comparison about the average of Team_ID over the ACC_Road , and group by attribute ACC_Road by a bar chart, and sort by the bar in descending.
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)CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,En...
SELECT ACC_Road, AVG(Team_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY ACC_Road DESC
What is the highest geohash length when there is a ng error of 0.00017, and a lng bits smaller than 20?
CREATE TABLE table_7442 ("geohash length" real,"lat bits" real,"lng bits" real,"lat error" text,"lng error" text,"km error" text)
SELECT MAX("geohash length") FROM table_7442 WHERE "lng error" = '±0.00017' AND "lng bits" < '20'
what are the top four most often ordered procedures since 6 years ago?
CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE d_items (row_id number,itemid number,label text,lin...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM procedures_icd WHERE DATETIME(procedures_icd.charttime) >= DATETIME(CURRENT_TIME(), '-6 year') GROUP BY procedur...
Which Notes have a Date of 2008-01-27?
CREATE TABLE table_38589 ("Distance" text,"Time" text,"Date" text,"Location" text,"Notes" text)
SELECT "Notes" FROM table_38589 WHERE "Date" = '2008-01-27'
What was the pick number in round 228 for Mike Ford?
CREATE TABLE table_name_44 (pick INTEGER,player VARCHAR,round VARCHAR)
SELECT MAX(pick) FROM table_name_44 WHERE player = "mike ford" AND round > 228
What is the Set 1 with a Set 2 of 15 5, and a Set 3 with 15 3?
CREATE TABLE table_52873 ("Date" text,"Score" text,"Set 1" text,"Set 2" text,"Set 3" text,"Total" text)
SELECT "Set 1" FROM table_52873 WHERE "Set 2" = '15–5' AND "Set 3" = '15–3'
how many patients whose primary disease is coronary artery disease/coronary artery bypass graft/sda were admitted in the emergency room?
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...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT /SDA"
What is the Purpose of the Callsign with a Freq currently of 4gld?
CREATE TABLE table_name_59 (purpose VARCHAR,freq_currently VARCHAR)
SELECT purpose FROM table_name_59 WHERE freq_currently = "4gld"
What is the Weight of the Player with a Date of Birth of 1979-09-26?
CREATE TABLE table_name_54 (weight VARCHAR,date_of_birth VARCHAR)
SELECT weight FROM table_name_54 WHERE date_of_birth = "1979-09-26"
A bar chart for finding the number of the latest logon date of the students whose family name is 'Jaskolski' or 'Langosh', show in ascending by the Y.
CREATE TABLE Students (student_id INTEGER,date_of_registration DATETIME,date_of_latest_logon DATETIME,login_name VARCHAR(40),password VARCHAR(10),personal_name VARCHAR(40),middle_name VARCHAR(40),family_name VARCHAR(40))CREATE TABLE Courses (course_id INTEGER,author_id INTEGER,subject_id INTEGER,course_name VARCHAR(120...
SELECT date_of_latest_logon, COUNT(date_of_latest_logon) FROM Students WHERE family_name = "Jaskolski" OR family_name = "Langosh" ORDER BY COUNT(date_of_latest_logon)
what were the four most commonly prescribed drugs for patients, who were also prescribed with cefazolin at the same time during this year?
CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabe...
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'cefazolin' AND DATETIME(medication.drugstarttime, '...
What is the score for 04 september 2006?
CREATE TABLE table_68554 ("Outcome" text,"Date" text,"Tournament" text,"Surface" text,"Opponent" text,"Score" text)
SELECT "Score" FROM table_68554 WHERE "Date" = '04 september 2006'
What is the name of the player with an overall less than 209 for the Victoriaville tigres (qmjhl), and a Round of 1?
CREATE TABLE table_name_85 (player VARCHAR,round VARCHAR,overall VARCHAR,club_team VARCHAR)
SELECT player FROM table_name_85 WHERE overall < 209 AND club_team = "victoriaville tigres (qmjhl)" AND round = 1
what is the schedule of ground transportation from the airport in PHILADELPHIA into downtown
CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)CREATE TABLE fare (fare_id int,from_airport varchar,to_airport varchar,fare_basis_code text,fare_airline text,restriction_code text,one_direction_cost int,round_trip_cost int,round_trip_required varchar)CREATE TABLE month (month_number int,month_name ...
SELECT DISTINCT ground_service.transport_type FROM airport, airport_service, city AS CITY_0, city AS CITY_1, ground_service WHERE airport.airport_code = airport_service.airport_code AND CITY_0.city_code = airport_service.city_code AND CITY_0.city_name = 'PHILADELPHIA' AND CITY_1.city_name = 'PHILADELPHIA' AND ground_se...
List the names of phones that are not on any market.
CREATE TABLE phone_market (market_id number,phone_id text,num_of_stock number)CREATE TABLE phone (name text,phone_id number,memory_in_g number,carrier text,price number)CREATE TABLE market (market_id number,district text,num_of_employees number,num_of_shops number,ranking number)
SELECT name FROM phone WHERE NOT phone_id IN (SELECT phone_id FROM phone_market)