instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
Name the mens singles when womens singles is wang lin and mixed doubles is joachim fischer nielsen christinna pedersen | CREATE TABLE table_19375 ("Tour" text,"Mens singles" text,"Womens singles" text,"Mens doubles" text,"Womens doubles" text,"Mixed doubles" text) | SELECT "Mens singles" FROM table_19375 WHERE "Womens singles" = 'Wang Lin' AND "Mixed doubles" = 'Joachim Fischer Nielsen Christinna Pedersen' |
The Other requirement is satisfied by which courses in Experimental Philosophy ? | CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE student (student_id int,lastname varchar,firstname varchar,program_id int,declare_major varchar,total_credit int,total_gpa float,entered_as varchar,admit_term int,predicted_graduation_semester int,degree... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%Experimental Philosophy%' OR course.description LIKE '%Experimental Philosophy%' OR course.name ... |
Which game did New Jersey Devils played in? | CREATE TABLE table_name_54 (game VARCHAR,opponent VARCHAR) | SELECT game FROM table_name_54 WHERE opponent = "new jersey devils" |
What is the brand of the Sigma 30mm f2.8 DN, which has a maximum aperture of f /2.8 and a focal length of 30mm? | CREATE TABLE table_79373 ("Brand" text,"Product Name" text,"Focal Length" text,"35mm EFL and equivalent aperture" text,"Max. aperture" text) | SELECT "Brand" FROM table_79373 WHERE "Max. aperture" = 'f /2.8' AND "Focal Length" = '30mm' AND "Product Name" = 'sigma 30mm f2.8 dn' |
What is the average number of hosts for parties? | CREATE TABLE party (Number_of_hosts INTEGER) | SELECT AVG(Number_of_hosts) FROM party |
What is the total population from the 2000 census for the municipality that has a 464.5 square km area and a population density in 2010 larger than 1840? | CREATE TABLE table_name_58 (population_2000_census VARCHAR,area__km²_ VARCHAR,population_density_2010___km²_ VARCHAR) | SELECT COUNT(population_2000_census) FROM table_name_58 WHERE area__km²_ = 464.5 AND population_density_2010___km²_ > 1840 |
How long has it been since the school started offering MACROMOL 995 ? | CREATE TABLE program_course (program_id int,course_id int,workload int,category varchar)CREATE TABLE jobs (job_id int,job_title varchar,description varchar,requirement varchar,city varchar,state varchar,country varchar,zip int)CREATE TABLE course (course_id int,name varchar,department varchar,number varchar,credits var... | SELECT DISTINCT semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'MACROMOL' AND course.number = 995 AND semester.semester_id = course_offering.semester ORDER BY semester.year LIMIT 1 |
Tell me the lowest pick number for new england revolution | CREATE TABLE table_4435 ("Pick #" real,"MLS team" text,"Player" text,"Position" text,"Affiliation" text) | SELECT MIN("Pick #") FROM table_4435 WHERE "MLS team" = 'new england revolution' |
previous history of schizophrenia, mania, or major depression. | CREATE TABLE table_train_128 ("id" int,"vascular" bool,"mania" bool,"pulmonary_disease" bool,"cardiac" bool,"stroke" bool,"substance_dependence" bool,"schizophrenia" bool,"cerebrovascular_disease" bool,"hematologic_disease" bool,"adverse_reactions_venlaflaxine" bool,"traumatic_brain_injury" bool,"focal_brain_lesion" bo... | SELECT * FROM table_train_128 WHERE schizophrenia = 1 OR mania = 1 OR major_depression = 1 |
Name the score for jos juan barea (8) | CREATE TABLE table_74181 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "Score" FROM table_74181 WHERE "High assists" = 'José Juan Barea (8)' |
provide the number of patients whose diagnoses icd9 code is 4280 and drug type is main? | 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 prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "4280" AND prescriptions.drug_type = "MAIN" |
What are the phone numbers for each employee, and count them by a bar chart | CREATE TABLE Genre (GenreId integer,Name varchar(120))CREATE TABLE Employee (EmployeeId integer,LastName varchar(20),FirstName varchar(20),Title varchar(30),ReportsTo integer,BirthDate datetime,HireDate datetime,Address varchar(70),City varchar(40),State varchar(40),Country varchar(40),PostalCode varchar(10),Phone varc... | SELECT Phone, COUNT(Phone) FROM Employee GROUP BY Phone |
Which origin has most number of flights? | CREATE TABLE Flight (origin VARCHAR) | SELECT origin FROM Flight GROUP BY origin ORDER BY COUNT(*) DESC LIMIT 1 |
When did the airplane with tail number RA-85282 crash? | CREATE TABLE table_25616 ("date (dd.mm.yyyy)" text,"Tail number" text,"Location" text,"Fatalities" text,"Brief description" text) | SELECT "date (dd.mm.yyyy)" FROM table_25616 WHERE "Tail number" = 'RA-85282' |
What is the total number of Points 1, when Lost is less than 20, and when Goals For is greater than 92? | CREATE TABLE table_name_10 (points_1 VARCHAR,lost VARCHAR,goals_for VARCHAR) | SELECT COUNT(points_1) FROM table_name_10 WHERE lost < 20 AND goals_for > 92 |
What city is Kara Ali Acar Sport Hall located in? | CREATE TABLE table_name_4 (city VARCHAR,arena VARCHAR) | SELECT city FROM table_name_4 WHERE arena = "kara ali acar sport hall" |
Where is the player from that has a Jersey Number(s) greater than 0 in the year 2003? | CREATE TABLE table_43972 ("Player" text,"Nationality" text,"Jersey Number(s)" real,"Position" text,"Years" text,"From" text) | SELECT "From" FROM table_43972 WHERE "Jersey Number(s)" > '0' AND "Years" = '2003' |
HOW MUCH IS THE PERCENTAGE OF GLOBAL TOTAL EMISSIONS IN THE COUNTRY THAT PRODUCED 4.9 TONS PER PERSON IN 2007? | CREATE TABLE table_16585 ("Country" text,"Carbon dioxide emissions per year (10 6 Tons) (2006)" real,"Percentage of global total" text,"Avg. emission per km 2 of its land (tons)" real,"Carbon dioxide emissions per year (Tons per person) (2007)" text) | SELECT "Percentage of global total" FROM table_16585 WHERE "Carbon dioxide emissions per year (Tons per person) (2007)" = '4.9' |
What is the sum of Gold, when Total is greater than 2, when Bronze is greater than 1, and when Silver is less than 1? | CREATE TABLE table_7749 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT SUM("Gold") FROM table_7749 WHERE "Total" > '2' AND "Bronze" > '1' AND "Silver" < '1' |
what is the first country listed on this chart ? | CREATE TABLE table_204_136 (id number,"year" number,"final" text,"semi" text) | SELECT "final" FROM table_204_136 WHERE id = 1 |
What is the lowest league goals that has fw as the position, total goals greater than 9, with league cup goals greater than 4? | CREATE TABLE table_65841 ("Name" text,"Position" text,"League Apps" text,"League Goals" real,"FA Cup Apps" text,"FA Cup Goals" real,"League Cup Apps" text,"League Cup Goals" real,"Total Apps" text,"Total Goals" real) | SELECT MIN("League Goals") FROM table_65841 WHERE "Position" = 'fw' AND "Total Goals" > '9' AND "League Cup Goals" > '4' |
What is the number of finishes associated with 13 starts, more than 169 points, and 96 stage wins? | CREATE TABLE table_13667 ("Driver" text,"Starts" real,"Finishes" real,"Wins" real,"Podiums" real,"Stage wins" real,"Points" real) | SELECT "Finishes" FROM table_13667 WHERE "Starts" = '13' AND "Points" > '169' AND "Stage wins" = '96' |
What is the average age for a male in each job Visualize by bar chart, and sort X-axis from low to high order. | CREATE TABLE PersonFriend (name varchar(20),friend varchar(20),year INTEGER)CREATE TABLE Person (name varchar(20),age INTEGER,city TEXT,gender TEXT,job TEXT) | SELECT job, AVG(age) FROM Person WHERE gender = 'male' GROUP BY job ORDER BY job |
what was patient 031-22988's first tested specimen until 24 months ago? | CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissio... | SELECT microlab.culturesite FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-22988')) AND DATETIME(microlab.culturetakentime) <= DATETIME(CURRE... |
Bar graph to show the total number from different team | CREATE TABLE Elimination (Elimination_ID text,Wrestler_ID text,Team text,Eliminated_By text,Elimination_Move text,Time text)CREATE TABLE wrestler (Wrestler_ID int,Name text,Reign text,Days_held text,Location text,Event text) | SELECT Team, COUNT(*) FROM Elimination GROUP BY Team |
What is the greatest goals for Curtis Davies if ends is greater than 2012? | CREATE TABLE table_78636 ("Nat." text,"Name" text,"Since" real,"App(GS/Sub)" text,"Goals" real,"Ends" real,"Transfer fee" text) | SELECT MAX("Goals") FROM table_78636 WHERE "Name" = 'curtis davies' AND "Ends" > '2012' |
orthostatic hypotension defined as standing bp < 100 / 60 or postural fall of sbp > 20 or dbp > 10 | CREATE TABLE table_train_234 ("id" int,"orthostatic_hypotension" bool,"systolic_blood_pressure_sbp" int,"estimated_glomerular_filtration_rate_egfr" int,"postural_fall_of_dbp" int,"diastolic_blood_pressure_dbp" int,"postural_fall_of_sbp" int,"allergy_to_sglt_2_inhibitors" bool,"body_mass_index_bmi" float,"NOUSE" float) | SELECT * FROM table_train_234 WHERE orthostatic_hypotension = 1 OR (systolic_blood_pressure_sbp < 100 OR diastolic_blood_pressure_dbp < 60 OR postural_fall_of_sbp > 20 OR postural_fall_of_dbp > 10) |
For each year, bin the year into day of the week interval, and return the total number of times the team Boston Red Stockings won in the postseasons using a line chart, could you list in ascending by the X? | CREATE TABLE pitching (player_id TEXT,year INTEGER,stint INTEGER,team_id TEXT,league_id TEXT,w INTEGER,l INTEGER,g INTEGER,gs INTEGER,cg INTEGER,sho INTEGER,sv INTEGER,ipouts NUMERIC,h INTEGER,er INTEGER,hr INTEGER,bb INTEGER,so INTEGER,baopp NUMERIC,era NUMERIC,ibb NUMERIC,wp NUMERIC,hbp NUMERIC,bk INTEGER,bfp NUMERIC... | SELECT year, SUM(COUNT(*)) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' ORDER BY year |
What's the standard of the country who won its first title in 1992? | CREATE TABLE table_85 ("Country" text,"Players" real,"Standard" real,"Minor" real,"First title" real,"Last title" real) | SELECT MAX("Standard") FROM table_85 WHERE "First title" = '1992' |
Which Runner-Up has a Total of 31,200? | CREATE TABLE table_37399 ("Year" text,"Winner" text,"Runner-Up" text,"Semi-Finalists" text,"Quarter-Finalists" text,"Last 16" text,"Last 32" text,"Last 64" text,"Total" text) | SELECT "Runner-Up" FROM table_37399 WHERE "Total" = '£31,200' |
When was Laurent-Marie-Joseph Imbert / St. Imbert, who was beatified after 1909 and canonised after 1984, martyred? | CREATE TABLE table_name_65 (martyred INTEGER,canonised VARCHAR,beatified VARCHAR,name VARCHAR) | SELECT MAX(martyred) FROM table_name_65 WHERE beatified > 1909 AND name = "laurent-marie-joseph imbert / st. imbert" AND canonised > 1984 |
What is the US cash box before 1978 with a US billboard of 35? | CREATE TABLE table_79016 ("Year" real,"US Billboard" real,"US Cash Box" text,"US AC" text,"CAN AC" text,"Title" text) | SELECT "US Cash Box" FROM table_79016 WHERE "Year" < '1978' AND "US Billboard" = '35' |
What province has the Chinese translation ? | CREATE TABLE table_20847 ("City" text,"Chinese" text,"Pinyin" text,"Province" text,"Urban Population (2010)" real,"Administrative Population (2010)" real) | SELECT COUNT("Province") FROM table_20847 WHERE "Chinese" = '重庆' |
What was the original air date of Stargate SG-1 written by Peter Deluise? | CREATE TABLE table_20079 ("No. in season" real,"No. disc" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text) | SELECT "Original air date" FROM table_20079 WHERE "Written by" = 'Peter DeLuise' |
What is the status of the Eng Country from the Maynard name? | CREATE TABLE table_name_28 (status VARCHAR,country VARCHAR,name VARCHAR) | SELECT status FROM table_name_28 WHERE country = "eng" AND name = "maynard" |
What is the smallest rate of burglary when forcible rape is 39.1 and motor vehicle theft is less than 568.8? | CREATE TABLE table_61065 ("State" text,"City" text,"Population" real,"Violent Crime" text,"Murder and Non-Negligent Manslaughter" real,"Forcible Rape" text,"Robbery" real,"Aggravated Assault" real,"Property Crime" text,"Burglary" real,"Larceny-Theft" text,"Motor Vehicle Theft" real) | SELECT MIN("Burglary") FROM table_61065 WHERE "Forcible Rape" = '39.1' AND "Motor Vehicle Theft" < '568.8' |
A bar chart shows the distribution of All_Neutral and School_ID , and rank by the bars in descending please. | 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_Perce... | SELECT All_Neutral, School_ID FROM basketball_match ORDER BY All_Neutral DESC |
serum triglyceride greater than 500 mg / dl | CREATE TABLE table_train_270 ("id" int,"gender" string,"allergy_to_omega_3" bool,"serum_low_density_lipoprotein_cholesterol" int,"stimulated_c_peptide" float,"allergy_to_dha" bool,"allergy_to_vitamin_d" bool,"serum_triglyceride" int,"age" float,"NOUSE" float) | SELECT * FROM table_train_270 WHERE serum_triglyceride > 500 |
When michigan technological university (ncaa) is the college, junior, or club team what is the nationality? | CREATE TABLE table_23132 ("Pick #" real,"Player" text,"Position" text,"Nationality" text,"NHL team" text,"College/junior/club team" text) | SELECT "Nationality" FROM table_23132 WHERE "College/junior/club team" = 'Michigan Technological University (NCAA)' |
did patient 002-40703 get a prescription for percocet, albuterol 90 mcg, or trazodone since 04/2104? | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight... | SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-40703')) AND medication.drugname IN ('percocet', 'albuterol 90 mcg', '... |
provide the number of patients whose age is less than 50 and item id is 50903? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "50" AND lab.itemid = "50903" |
bmi range: > 25 kg / m^2 and < 45 kg / m^2 | CREATE TABLE table_train_274 ("id" int,"gender" string,"serum_bicarbonate" int,"randomization_bg" int,"positive_serum" bool,"diabetic_ketoacidosis" bool,"urinary_ketones" bool,"diastolic_blood_pressure_dbp" int,"heart_rate" int,"body_mass_index_bmi" float,"age" float,"NOUSE" float) | SELECT * FROM table_train_274 WHERE body_mass_index_bmi > 25 AND body_mass_index_bmi < 45 |
List the name of all products along with the number of complaints that they have received with a bar chart, and I want to rank by the x axis in ascending please. | CREATE TABLE Complaints (complaint_id INTEGER,product_id INTEGER,customer_id INTEGER,complaint_outcome_code VARCHAR(20),complaint_status_code VARCHAR(20),complaint_type_code VARCHAR(20),date_complaint_raised DATETIME,date_complaint_closed DATETIME,staff_id INTEGER)CREATE TABLE Staff (staff_id INTEGER,gender VARCHAR(1),... | SELECT product_name, COUNT(*) FROM Products AS t1 JOIN Complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name ORDER BY product_name |
i'd like to fly CO between BOSTON and PHILADELPHIA | CREATE TABLE code_description (code varchar,description text)CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt 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 ... | 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 = 'PHILADELPHIA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = '... |
what is the score that has tie number 27 | CREATE TABLE table_8421 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Date" text) | SELECT "Score" FROM table_8421 WHERE "Tie no" = '27' |
Who was the leading scorer that was a visitor of the Trail Blazers? | CREATE TABLE table_name_35 (leading_scorer VARCHAR,visitor VARCHAR) | SELECT leading_scorer FROM table_name_35 WHERE visitor = "trail blazers" |
Which venue has a crowd over 16,000 and a home team score of 7.7 (49)? | CREATE TABLE table_74606 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Venue" FROM table_74606 WHERE "Crowd" > '16,000' AND "Home team score" = '7.7 (49)' |
For those records from the products and each product's manufacturer, give me the comparison about the sum of code over the founder , and group by attribute founder by a bar chart, and show Y in descending order. | CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL)CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER) | SELECT T2.Founder, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Founder ORDER BY T1.Code DESC |
1950 larger than 80, and a 1960 of 196, and a 1990 larger than 131 what is the lowest 1996[2]? | CREATE TABLE table_36164 ("1950" real,"1960" real,"1970" real,"1980" real,"1990" real,"1996[2]" real) | SELECT MIN("1996[2]") FROM table_36164 WHERE "1950" > '80' AND "1960" = '196' AND "1990" > '131' |
What is Pole Position, when Circuit is Adelaide Street Circuit, and when Winning Team is Piccola Scuderia Corse? | CREATE TABLE table_name_71 (pole_position VARCHAR,circuit VARCHAR,winning_team VARCHAR) | SELECT pole_position FROM table_name_71 WHERE circuit = "adelaide street circuit" AND winning_team = "piccola scuderia corse" |
Who was the losing team on June 16? | CREATE TABLE table_name_25 (losing_team VARCHAR,date VARCHAR) | SELECT losing_team FROM table_name_25 WHERE date = "june 16" |
What was the tie number when the away team was Wrexham? | CREATE TABLE table_8267 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Attendance" text) | SELECT "Tie no" FROM table_8267 WHERE "Away team" = 'wrexham' |
What i/o buses are associated with the LGA 1155 socket, a code name of Sandy Bridge (desktop) and a brand name of Core i3-21xx? | CREATE TABLE table_24538587_11 (i_o_bus VARCHAR,brand_name__list_ VARCHAR,socket VARCHAR,codename__main_article_ VARCHAR) | SELECT i_o_bus FROM table_24538587_11 WHERE socket = "LGA 1155" AND codename__main_article_ = "Sandy Bridge (Desktop)" AND brand_name__list_ = "Core i3-21xx" |
Which nationality has left wing as the position and college/junior/team is portland winterhawks (whl)? | CREATE TABLE table_2886617_3 (nationality VARCHAR,position VARCHAR,college_junior_club_team VARCHAR) | SELECT nationality FROM table_2886617_3 WHERE position = "Left Wing" AND college_junior_club_team = "Portland Winterhawks (WHL)" |
Which Lead has a Second of katrin kuusk? | CREATE TABLE table_36918 ("Nation" text,"Skip" text,"Third" text,"Second" text,"Lead" text) | SELECT "Lead" FROM table_36918 WHERE "Second" = 'katrin kuusk' |
Tell me the winning driver for avusrennen | CREATE TABLE table_name_70 (winning_driver VARCHAR,name VARCHAR) | SELECT winning_driver FROM table_name_70 WHERE name = "avusrennen" |
Who is the opponent in the Tournament of Lahore final? | CREATE TABLE table_name_90 (opponent_in_the_final VARCHAR,tournament VARCHAR) | SELECT opponent_in_the_final FROM table_name_90 WHERE tournament = "lahore" |
tell me the name and days for which patient with patient id 2560 was admitted in hospital. | 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 demographic.name, demographic.days_stay FROM demographic WHERE demographic.subject_id = "2560" |
Which date did 64,443 people attend a game? | CREATE TABLE table_name_47 (date VARCHAR,attendance VARCHAR) | SELECT date FROM table_name_47 WHERE attendance = "64,443" |
Name the most number in season for leslie hill | CREATE TABLE table_25604014_9 (no_in_season INTEGER,directed_by VARCHAR) | SELECT MAX(no_in_season) FROM table_25604014_9 WHERE directed_by = "Leslie Hill" |
what is the four drug most frequently prescribed to the patients aged 40s within 2 months after they have been diagnosed with sepsis - severe since 5 years ago? | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'sepsis - severe' AND DATETIME(diagnosis.diagnosist... |
What is the nationality of the person drafted to Position F from Kentucky State? | CREATE TABLE table_name_7 (nationality VARCHAR,position VARCHAR,college_high_school_club VARCHAR) | SELECT nationality FROM table_name_7 WHERE position = "f" AND college_high_school_club = "kentucky state" |
Name the most runs scored | CREATE TABLE table_24408 ("Name" text,"Career" text,"Matches" real,"Innings" real,"Not Out" real,"Runs scored" real,"High Score" text,"50s" real,"100s" real,"Average" text) | SELECT MAX("Runs scored") FROM table_24408 |
In what race did Buddy Rice hav fastest lap? | CREATE TABLE table_2454550_1 (race_name VARCHAR,fastest_lap VARCHAR) | SELECT race_name FROM table_2454550_1 WHERE fastest_lap = "Buddy Rice" |
What competition was played at Shay Stadium? | CREATE TABLE table_52919 ("Date" text,"Competition" text,"Venue" text,"Result" text,"Score" text,"Goals" text) | SELECT "Competition" FROM table_52919 WHERE "Venue" = 'shay stadium' |
What are the ids of the stations in San Francisco that normally have more than 10 bikes available? | CREATE TABLE weather (date text,max_temperature_f number,mean_temperature_f number,min_temperature_f number,max_dew_point_f number,mean_dew_point_f number,min_dew_point_f number,max_humidity number,mean_humidity number,min_humidity number,max_sea_level_pressure_inches number,mean_sea_level_pressure_inches number,min_se... | SELECT id FROM station WHERE city = "San Francisco" INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING AVG(bikes_available) > 10 |
find the average age of black haitian patients who are single. | 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 AVG(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.ethnicity = "BLACK/HAITIAN" |
The fastest shots on the west. | CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE TagSynonyms (Id number,SourceTagName text,TargetTagName text,CreationDate time,OwnerUserId number,AutoRenameCount number,LastAutoRename time,Score number,ApprovedByUserId number,ApprovalDate time)CREATE TABLE FlagTypes ... | SELECT Q.Id AS "post_link", Q.CreationDate AS Asked, A.LastEditDate AS Answered, CAST((JULIANDAY(A.LastEditDate) - JULIANDAY(Q.CreationDate)) AS INT) AS Seconds FROM Posts AS Q, Posts AS A WHERE A.ParentId = Q.Id AND A.OwnerUserId != Q.OwnerUserId AND A.OwnerUserId >= 1 AND Q.OwnerUserId >= 1 AND A.LastEditDate >= Q.Cr... |
What is the time of the peachtree road race in kenya? | CREATE TABLE table_43996 ("Rank" text,"Time" text,"Athlete" text,"Nation" text,"Date" text,"Race" text) | SELECT "Time" FROM table_43996 WHERE "Nation" = 'kenya' AND "Race" = 'peachtree road race' |
what is the number of patients whose diagnoses long title is twin birth, mate liveborn, born in hospital, delivered by cesarean section and drug type is base? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marita... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Twin birth, mate liveborn, born in hospital, delivered by cesarean section" AND prescriptio... |
Loss of de la rosa (8 8) has what average attendance? | CREATE TABLE table_37912 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" real,"Record" text) | SELECT AVG("Attendance") FROM table_37912 WHERE "Loss" = 'de la rosa (8–8)' |
.9% normal saline had been given to patient 8098 ever until 03/20/2104? | CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,va... | SELECT COUNT(*) > 0 FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8098)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = '.9% norma... |
Who were the panelists on episode number 4? | CREATE TABLE table_41166 ("Episode Number" real,"Air Date" text,"Guest Host" text,"Musical Guest (Song performed)" text,"Who knows the most about the guest host? panelists" text) | SELECT "Who knows the most about the guest host? panelists" FROM table_41166 WHERE "Episode Number" = '4' |
how many hours has elapsed since the last time patient 006-133605 had a per iv flush: forearm l intake on the current icu visit? | 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 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', intakeoutput.intakeoutputtime)) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid ... |
What has Dr. Brian Zikmund-fisher taught ? | CREATE TABLE course (course_id int,name varchar,department varchar,number varchar,credits varchar,advisory_requirement varchar,enforced_requirement varchar,description varchar,num_semesters int,num_enrolled int,has_discussion varchar,has_lab varchar,has_projects varchar,has_exams varchar,num_reviews int,clarity_score i... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course_offering.semester < (SELECT SEMESTERalias0.semester_id FROM semester AS SEMESTERalias0 WHERE SEMESTERalias0.semester = 'WN' AND SEMESTERalias0.year = 2016) AND course.course_id = cour... |
Which Event resulted in a Win for Opponent, Shane Ott? | CREATE TABLE table_31935 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" text) | SELECT "Event" FROM table_31935 WHERE "Res." = 'win' AND "Opponent" = 'shane ott' |
Which one of the easiest ULCS courses has the biggest class size ? | CREATE TABLE jobs (job_id int,job_title varchar,description varchar,requirement varchar,city varchar,state varchar,country varchar,zip int)CREATE TABLE area (course_id int,area varchar)CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varchar,transfer_source varchar,earn_credit va... | SELECT DISTINCT department, name, number FROM course WHERE course_id IN (SELECT PROGRAM_COURSE_ID FROM program_course AS PROGRAM_COURSE WHERE PROGRAM_WORKLOAD = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 WHERE PROGRAM_COURSEalias1.category LIKE '%ULCS%')) AND num_enrolled = (... |
For each director, return the director's name together with the value of that rating and ignore movies whose director is NULL. Could you plot the result with a bar chart? | CREATE TABLE Movie (mID int,title text,year int,director text)CREATE TABLE Reviewer (rID int,name text)CREATE TABLE Rating (rID int,mID int,stars int,ratingDate date) | SELECT director, stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE director <> "null" |
show me the airlines that fly from TORONTO to SAN FRANCISCO | CREATE TABLE date_day (month_number int,day_number int,year int,day_name varchar)CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distant int,direction varchar,minutes_distant int)CREATE TABLE air... | SELECT DISTINCT airline.airline_code FROM airline, 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 = 'TORONTO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_n... |
How many silver medals does Cuba have? | CREATE TABLE table_name_15 (silver INTEGER,nation VARCHAR) | SELECT SUM(silver) FROM table_name_15 WHERE nation = "cuba" |
What were the total receipts when the money raised in 2Q was $33,120,440? | CREATE TABLE table_55347 ("Candidate" text,"Money Raised,2Q" text,"Loans Received,2Q" text,"Money Spent,2Q" text,"Total Receipts" text,"Cash On Hand" text) | SELECT "Total Receipts" FROM table_55347 WHERE "Money Raised, 2Q" = '$33,120,440' |
Where was Steve Stricker from? | CREATE TABLE table_name_10 (place VARCHAR,player VARCHAR) | SELECT place FROM table_name_10 WHERE player = "steve stricker" |
Which Score has a Record of 36 61? | CREATE TABLE table_37943 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" real,"Record" text) | SELECT "Score" FROM table_37943 WHERE "Record" = '36–61' |
Who is the rider whose time/retired is accident? | CREATE TABLE table_44666 ("Rider" text,"Manufacturer" text,"Laps" text,"Time/Retired" text,"Grid" text) | SELECT "Rider" FROM table_44666 WHERE "Time/Retired" = 'accident' |
What is the team 1 with cementarnica as team 2? | CREATE TABLE table_60076 ("Team 1" text,"Agg." text,"Team 2" text,"1st leg" text,"2nd leg" text) | SELECT "Team 1" FROM table_60076 WHERE "Team 2" = 'cementarnica' |
Number of 10+ score posts per month. Android questions per day in 2011 | CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,OwnerDisplayName text,LastEditorUserId number,LastEditorDisplayName text,LastEditDate time,LastActivityDate time,Title text,Tags text,Ans... | SELECT YEAR(q.CreationDate) + MONTH(q.CreationDate) / 12.0 AS "QDate", COUNT(CreationDate) AS Count FROM Posts AS q WHERE Score >= 10 AND q.CreationDate > 2014 GROUP BY YEAR(q.CreationDate) + MONTH(q.CreationDate) / 12.0 ORDER BY YEAR(q.CreationDate) + MONTH(q.CreationDate) / 12.0 |
What Player is from the west Division and the Team of special teams and is from the School Toledo Western Michigan? | CREATE TABLE table_name_21 (player VARCHAR,school VARCHAR,division VARCHAR,team VARCHAR) | SELECT player FROM table_name_21 WHERE division = "west" AND team = "special teams" AND school = "toledo western michigan" |
What is the total number of silver medals of the nation with more than 16 total medals? | CREATE TABLE table_name_40 (silver VARCHAR,total INTEGER) | SELECT COUNT(silver) FROM table_name_40 WHERE total > 16 |
count the number of patients who have been discharged from a hospital in 2101. | CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,ce... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE NOT patient.hospitaldischargetime IS NULL AND STRFTIME('%y', patient.hospitaldischargetime) = '2101' |
What month and year was 'storm warning (part one)' filmed? | CREATE TABLE table_26288 ("Episode #" real,"Prod #" real,"Title" text,"Directed by" text,"Written by" text,"Originalairdate" text,"Filmed" text) | SELECT "Filmed" FROM table_26288 WHERE "Title" = 'Storm Warning (part one)' |
What's the smallest amount of laps that suzuki ran with a grid value of 8? | CREATE TABLE table_name_26 (laps INTEGER,manufacturer VARCHAR,grid VARCHAR) | SELECT MIN(laps) FROM table_name_26 WHERE manufacturer = "suzuki" AND grid = 8 |
All My Answers Sorted by Votes. | CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,P... | SELECT COUNT(*) AS UpVotes, p2.Title FROM Posts AS p INNER JOIN Votes AS v ON v.PostId = p.Id INNER JOIN Posts AS p2 ON p2.Id = p.ParentId AND p2.PostTypeId = 1 WHERE p.OwnerUserId = @UserId AND p.PostTypeId = 2 AND v.VoteTypeId = 2 GROUP BY p2.Title ORDER BY UpVotes DESC |
What is the highest round that has a player selected from Clarkson University? | CREATE TABLE table_name_15 (round INTEGER,college_junior_club_team__league_ VARCHAR) | SELECT MAX(round) FROM table_name_15 WHERE college_junior_club_team__league_ = "clarkson university" |
what is the highest gold when the nation is total and the total is less than 24? | CREATE TABLE table_46555 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT MAX("Gold") FROM table_46555 WHERE "Nation" = 'total' AND "Total" < '24' |
what are the four most frequent procedures that followed in the same hospital visit for the patients who were diagnosed with bone fracture(s) - right lower extremity in this year? | CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,ob... | SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'bone ... |
What home team has an Away team of richmond? | CREATE TABLE table_77954 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Home team" FROM table_77954 WHERE "Away team" = 'richmond' |
count the number of patients whose insurance is self pay and diagnoses long title is other hamartoses, not elsewhere classified? | 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 (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Self Pay" AND diagnoses.long_title = "Other hamartoses, not elsewhere classified" |
What is the score of the match with anders j rryd as the runner-up? | CREATE TABLE table_36733 ("Year" text,"Champion" text,"Runner-up" text,"Score" text,"Surface" text) | SELECT "Score" FROM table_36733 WHERE "Runner-up" = 'anders järryd' |
For those records from the products and each product's manufacturer, draw a bar chart about the distribution of headquarter and the average of manufacturer , and group by attribute headquarter. | CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER)CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL) | SELECT Headquarter, AVG(Manufacturer) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter |
how many black/cape verdean newborn patients were in the hospital? | 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,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "NEWBORN" AND demographic.ethnicity = "BLACK/CAPE VERDEAN" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.