instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
Tell me the college for jason holland | CREATE TABLE table_31547 ("Pick" text,"Player" text,"Position" text,"Nationality" text,"NHL team" text,"College/junior/club team" text) | SELECT "College/junior/club team" FROM table_31547 WHERE "Player" = 'jason holland' |
What was the week 5 opponent for the year with a week 10 opponent of Maryland (6-2)? | CREATE TABLE table_38962 ("Week 2 Sept 7" text,"Week 3 Sept 14" text,"Week 4 Sept 21" text,"Week 5 Sept 28" text,"Week 6 Oct 5" text,"Week 7 Oct 12" text,"Week 10 Nov 2" text,"Week 12 Nov 16" text,"Week 14 Nov 30" text,"Week 15 Dec 7" text,"Week 16 (Final) Jan 9" text) | SELECT "Week 5 Sept 28" FROM table_38962 WHERE "Week 10 Nov 2" = 'maryland (6-2)' |
What is the least population with more than 78,748 households in Davis County? | CREATE TABLE table_5141 ("County" text,"Per capita income" text,"Median household income" text,"Median family income" text,"Population" real,"Number of households" real) | SELECT MIN("Population") FROM table_5141 WHERE "Number of households" > '78,748' AND "County" = 'davis' |
How much did the away team Melbourne score? | CREATE TABLE table_name_64 (away_team VARCHAR) | SELECT away_team AS score FROM table_name_64 WHERE away_team = "melbourne" |
Name the least dismissals for 4 rank | CREATE TABLE table_23316034_23 (dismissals INTEGER,rank VARCHAR) | SELECT MAX(dismissals) FROM table_23316034_23 WHERE rank = 4 |
what is the least laps when the grid is 5? | CREATE TABLE table_55862 ("Driver" text,"Constructor" text,"Laps" real,"Time/Retired" text,"Grid" real) | SELECT MIN("Laps") FROM table_55862 WHERE "Grid" = '5' |
Corey Maggette from the United States plays what position? | CREATE TABLE table_name_70 (position VARCHAR,nationality VARCHAR,player VARCHAR) | SELECT position FROM table_name_70 WHERE nationality = "united states" AND player = "corey maggette" |
What is the Best of the racer with a Qual 2 of 1:00.588? | CREATE TABLE table_name_31 (best VARCHAR,qual_2 VARCHAR) | SELECT best FROM table_name_31 WHERE qual_2 = "1:00.588" |
What country is new orleans in? | CREATE TABLE table_30198 ("Sponsored name" text,"Non-sponsored name" text,"Sponsor" text,"Stadium" text,"City" text,"Country" text,"Sport" text,"Sponsorship Ended" real) | SELECT "Country" FROM table_30198 WHERE "City" = 'New Orleans' |
Name the name origin for 54.0e | CREATE TABLE table_16799784_2 (name VARCHAR,longitude VARCHAR) | SELECT name AS origin FROM table_16799784_2 WHERE longitude = "54.0E" |
What is the lowest A Score when the B Score is 9.15, and total is 16.05? | CREATE TABLE table_name_61 (a_score INTEGER,b_score VARCHAR,total VARCHAR) | SELECT MIN(a_score) FROM table_name_61 WHERE b_score = 9.15 AND total = 16.05 |
How many items appear in the viewers column when the draw is 2? | CREATE TABLE table_27994983_8 (viewers VARCHAR,draw VARCHAR) | SELECT COUNT(viewers) FROM table_27994983_8 WHERE draw = 2 |
WHAT IS THE DRAW FOR u ritmu ljubavi, POINTS LARGER THAN 87? | CREATE TABLE table_name_73 (draw INTEGER,song VARCHAR,points VARCHAR) | SELECT MAX(draw) FROM table_name_73 WHERE song = "u ritmu ljubavi" AND points > 87 |
How many copies of scouting for girls were sold? | CREATE TABLE table_name_31 (sales VARCHAR,album_title VARCHAR) | SELECT COUNT(sales) FROM table_name_31 WHERE album_title = "scouting for girls" |
Who's average is 24.8? | CREATE TABLE table_21157 ("Player" text,"GP" real,"K. Ret." real,"KR Yds" real,"KR Avg." text,"KR TD" real,"KR LG" real,"P. Ret." real,"PR Yds" real,"PR Avg." text,"PR TD" real,"PR LG" real,"MFG Ret." real,"MFG Yds" real,"MFG Avg." text,"MFG LG" real,"MFG TD" real) | SELECT "Player" FROM table_21157 WHERE "KR Avg." = '24.8' |
Which Year Introduced has a Memory (GB) of 0.125 2? | CREATE TABLE table_name_26 (year_introduced INTEGER,memory__gb_ VARCHAR) | SELECT MAX(year_introduced) FROM table_name_26 WHERE memory__gb_ = "0.125–2" |
How many goal ratios have rank of 2 with more than 44 games? | CREATE TABLE table_75038 ("Rank" real,"Player" text,"Goals" real,"Games" real,"Goal Ratio" real) | SELECT COUNT("Goal Ratio") FROM table_75038 WHERE "Rank" = '2' AND "Games" > '44' |
Find the the name of the customers who have a loan with amount more than 3000. | CREATE TABLE loan (loan_id text,loan_type text,cust_id text,branch_id text,amount number)CREATE TABLE customer (cust_id text,cust_name text,acc_type text,acc_bal number,no_of_loans number,credit_score number,branch_id number,state text)CREATE TABLE bank (branch_id number,bname text,no_of_customers number,city text,stat... | SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE amount > 3000 |
Who was the entrant for Gabriele Tarquini with all rounds and a JH24 JH25 Chassis? | CREATE TABLE table_name_65 (entrant VARCHAR,driver VARCHAR,rounds VARCHAR,chassis VARCHAR) | SELECT entrant FROM table_name_65 WHERE rounds = "all" AND chassis = "jh24 jh25" AND driver = "gabriele tarquini" |
Show the number of games in each season and group by home team in a group line chart The x-axis is season, show Season in asc order. | CREATE TABLE stadium (id int,name text,Home_Games int,Average_Attendance real,Total_Attendance real,Capacity_Percentage real)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,Nu... | SELECT Season, COUNT(Season) FROM game GROUP BY Home_team ORDER BY Season |
Which Tournament has a 2009 of q1, and a 2008 of 1r? | CREATE TABLE table_name_28 (tournament VARCHAR) | SELECT tournament FROM table_name_28 WHERE 2009 = "q1" AND 2008 = "1r" |
datasets used for evaluating semantic parsing | CREATE TABLE keyphrase (keyphraseid int,keyphrasename varchar)CREATE TABLE paperfield (fieldid int,paperid int)CREATE TABLE venue (venueid int,venuename varchar)CREATE TABLE field (fieldid int)CREATE TABLE dataset (datasetid int,datasetname varchar)CREATE TABLE cite (citingpaperid int,citedpaperid int)CREATE TABLE auth... | SELECT DISTINCT dataset.datasetid FROM dataset, keyphrase, paperdataset, paperkeyphrase WHERE keyphrase.keyphrasename = 'semantic parsing' AND paperdataset.datasetid = dataset.datasetid AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paperkeyphrase.paperid = paperdataset.paperid |
What was the to par when the score was 71-70-72-68=281? | CREATE TABLE table_name_92 (to_par VARCHAR,score VARCHAR) | SELECT to_par FROM table_name_92 WHERE score = 71 - 70 - 72 - 68 = 281 |
Which patients are younger than 70 years old and have other specified perinatal disorder of digestive system diagnoses? | 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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "70" AND diagnoses.short_title = "Perinat GI sys dis NEC" |
what was the name of the intake, patient 027-154299 last had on this month/30? | CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE intakeoutput (intak... | SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-154299')) AND intakeoutput.cellpath LIKE '%intake%' AND ... |
With the given points of 51, what was the total number of the try bonus? | CREATE TABLE table_1750 ("Club" text,"Played" text,"Won" text,"Drawn" text,"Lost" text,"Points for" text,"Points against" text,"Tries for" text,"Tries against" text,"Try bonus" text,"Losing bonus" text,"Points" text) | SELECT COUNT("Try bonus") FROM table_1750 WHERE "Points" = '51' |
What is the order year of obi builder and 05.505 model that is 30 feet long? | CREATE TABLE table_60638 ("Order Year" text,"Builder" text,"Model" text,"Length (ft.)" text,"Engine/Transmission" text) | SELECT "Order Year" FROM table_60638 WHERE "Builder" = 'obi' AND "Length (ft.)" = '30' AND "Model" = '05.505' |
Which position has 30 points and Reiner Stuyvenberg as a passenger? | CREATE TABLE table_49010 ("Season" text,"Passenger" text,"Equipment" text,"Position" text,"Points" real,"Races" real,"Wins" text,"Second" text,"Third" text) | SELECT "Position" FROM table_49010 WHERE "Points" = '30' AND "Passenger" = 'reiner stuyvenberg' |
Evolution of the mean question score and number of questions of each week of 2015. | CREATE TABLE Users (Id number,Reputation number,CreationDate time,DisplayName text,LastAccessDate time,WebsiteUrl text,Location text,AboutMe text,Views number,UpVotes number,DownVotes number,ProfileImageUrl text,EmailHash text,AccountId number)CREATE TABLE ReviewTaskStates (Id number,Name text,Description text)CREATE T... | SELECT TIME_TO_STR(p.CreationDate, '%W') AS weekOfCreation, SUM(p.Score) AS meanQuestionScore FROM Posts AS p WHERE p.PostTypeId = 1 AND TIME_TO_STR(p.CreationDate, '%Y') = 2015 GROUP BY TIME_TO_STR(p.CreationDate, '%W') ORDER BY TIME_TO_STR(p.CreationDate, '%W') |
count the number of patients whose diagnoses long title is embolism and thrombosis of iliac artery and lab test abnormal status is delta? | 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 demographic (subject_id text,hadm_id text,name text,marital... | 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.long_title = "Embolism and thrombosis of iliac artery" AND lab.flag = "delta" |
How many Games has a Team of chicago? | CREATE TABLE table_name_55 (game VARCHAR,team VARCHAR) | SELECT COUNT(game) FROM table_name_55 WHERE team = "chicago" |
What are the average enrollment size of the universities that are founded before 1850? | CREATE TABLE basketball_match (team_id number,school_id number,team_name text,acc_regular_season text,acc_percent text,acc_home text,acc_road text,all_games text,all_games_percent number,all_home text,all_road text,all_neutral text)CREATE TABLE university (school_id number,school text,location text,founded number,affil... | SELECT AVG(enrollment) FROM university WHERE founded < 1850 |
find the number of patients with procedure icd9 code 3523 who died in or before 2165. | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2165.0" AND procedures.icd9_code = "3523" |
Tell me the proportion of the nationality of all ships. | CREATE TABLE ship (Ship_ID int,Name text,Type text,Nationality text,Tonnage int)CREATE TABLE mission (Mission_ID int,Ship_ID int,Code text,Launched_Year int,Location text,Speed_knots int,Fate text) | SELECT Nationality, COUNT(Nationality) FROM ship GROUP BY Nationality |
What city is the lamar tower 1, ranked above 5? | CREATE TABLE table_name_87 (city VARCHAR,rank VARCHAR,name VARCHAR) | SELECT city FROM table_name_87 WHERE rank < 5 AND name = "lamar tower 1" |
during the last year what was the first procedure time for patient 29806? | CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE ... | SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 29806) AND DATETIME(procedures_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY procedures_icd.charttime LIMIT 1 |
What is the latest year? | CREATE TABLE table_2522 ("Outcome" text,"Year" real,"Championship" text,"Surface" text,"Partner" text,"Opponents in the final" text,"Score in the final" text) | SELECT MAX("Year") FROM table_2522 |
What is the highest total when there is less than 1 championship? | CREATE TABLE table_name_80 (total INTEGER,championship INTEGER) | SELECT MAX(total) FROM table_name_80 WHERE championship < 1 |
WHich competition was held on Alvor with a score 1-0? | CREATE TABLE table_name_77 (competition VARCHAR,score VARCHAR,location VARCHAR) | SELECT competition FROM table_name_77 WHERE score = "1-0" AND location = "alvor" |
Which Series has Poles of 0, and Races of 17? | CREATE TABLE table_37154 ("Season" real,"Series" text,"Team Name" text,"Races" text,"Wins" text,"Poles" text,"F/Laps" text,"Podiums" text,"Points" text,"Final Placing" text) | SELECT "Series" FROM table_37154 WHERE "Poles" = '0' AND "Races" = '17' |
What time did the team from Ukraine have? | CREATE TABLE table_name_76 (time VARCHAR,country VARCHAR) | SELECT time FROM table_name_76 WHERE country = "ukraine" |
pre _ trial low _ density lipoprotein ( ldl ) cholesterol > 100 and triglycerides > 200 mg / dl with or without lipid lowering therapy | CREATE TABLE table_train_218 ("id" int,"plasma_glucose_concentration" int,"c_peptide_level" float,"body_weight" float,"diabetic" string,"single_antigen_b_sab" int,"low_density_lipoprotein_ldl_cholesterol" int,"body_mass_index_bmi" float,"triglyceride_tg" float,"NOUSE" float) | SELECT * FROM table_train_218 WHERE low_density_lipoprotein_ldl_cholesterol > 100 AND triglyceride_tg > 200 |
what is the least total when the nation is canada (can) and bronze is less than 0? | CREATE TABLE table_name_78 (total INTEGER,nation VARCHAR,bronze VARCHAR) | SELECT MIN(total) FROM table_name_78 WHERE nation = "canada (can)" AND bronze < 0 |
what was the last ward id that patient 030-44598 went in this hospital encounter? | CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE patient (uniquepid text,patienthealths... | SELECT patient.wardid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-44598' AND patient.hospitaldischargetime IS NULL) ORDER BY patient.unitadmittime DESC LIMIT 1 |
what were the three most frequent drugs that were prescribed within 2 months to the male patients aged 20s after having been diagnosed with esophageal reflux, in 2105. | CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE patients (row_id number,subject_id number,gender tex... | SELECT t3.drug FROM (SELECT t2.drug, 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.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ... |
WHAT WAS THE AMOUNT OF CARBON DIOXIDE EMISSIONS IN 2006 IN THE COUNTRY WHOSE CO2 EMISSIONS (TONS PER PERSON) REACHED 1.4 IN 2OO7? | CREATE TABLE table_11251601_2 (carbon_dioxide_emissions_per_year__10_6_tons___2006_ VARCHAR,carbon_dioxide_emissions_per_year__tons_per_person___2007_ VARCHAR) | SELECT carbon_dioxide_emissions_per_year__10_6_tons___2006_ FROM table_11251601_2 WHERE carbon_dioxide_emissions_per_year__tons_per_person___2007_ = "1.4" |
Show all publishers and the number of books for each publisher. | CREATE TABLE book_club (publisher VARCHAR) | SELECT publisher, COUNT(*) FROM book_club GROUP BY publisher |
When hany abu-assad category:articles with hcards is the director what is the result? | CREATE TABLE table_26555737_1 (result VARCHAR,director VARCHAR) | SELECT result FROM table_26555737_1 WHERE director = "Hany Abu-Assad Category:Articles with hCards" |
Name the total number of population 2011 for perlez | CREATE TABLE table_2562572_35 (population__2011_ VARCHAR,settlement VARCHAR) | SELECT COUNT(population__2011_) FROM table_2562572_35 WHERE settlement = "Perlez" |
What were his winnings when he had 14 top 10s? | CREATE TABLE table_2481 ("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 "Winnings" FROM table_2481 WHERE "Top 10" = '14' |
What position does the player from arkansas play? | CREATE TABLE table_78072 ("Player" text,"Pos." text,"From" text,"School/Country" text,"Rebs" real,"Asts" real) | SELECT "Pos." FROM table_78072 WHERE "School/Country" = 'arkansas' |
What is the name of the stone found in Andhra Pradesh, India? | CREATE TABLE table_name_13 (name_of_the_stone__sila_ VARCHAR,name_of_the_state_where_found_in_india VARCHAR) | SELECT name_of_the_stone__sila_ FROM table_name_13 WHERE name_of_the_state_where_found_in_india = "andhra pradesh" |
How many different popular vote counts were there for the candidate Rick Perry? | CREATE TABLE table_20246201_9 (popular_vote VARCHAR,candidate VARCHAR) | SELECT COUNT(popular_vote) FROM table_20246201_9 WHERE candidate = "Rick Perry" |
how much is the cost of a lab test of glucose, pleural? | CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE icustays (row_id number,subject_id number,hadm_id number,icustay_id number,first_careunit text,last_careunit text,first_wardid number,last_wardid numbe... | SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'labevents' AND cost.event_id IN (SELECT labevents.row_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'glucose, pleural')) |
What team has a player from Santa Clara? | CREATE TABLE table_11339 ("Round" text,"Pick" text,"Player" text,"Position" text,"Nationality" text,"Team" text,"College" text) | SELECT "Team" FROM table_11339 WHERE "College" = 'santa clara' |
How many times did Public Policy Polling under Republican: Jack Hoogendyk? | CREATE TABLE table_21053 ("Poll Source" text,"Dates administered" text,"Democrat: Carl Levin" text,"Republican: Jack Hoogendyk" text,"Lead Margin" real) | SELECT COUNT("Republican: Jack Hoogendyk") FROM table_21053 WHERE "Poll Source" = 'Public Policy Polling' |
What is the area of xin county? | CREATE TABLE table_2847477_2 (area VARCHAR,english_name VARCHAR) | SELECT area FROM table_2847477_2 WHERE english_name = "Xin County" |
what is admission location and diagnoses icd9 code of subject id 18372? | 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 demographic.admission_location, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "18372" |
What is the average question score per view?. http://meta.stackexchange.com/questions/279418/what-is-the-average-question-score-per-view/279421#279421 | CREATE TABLE PostsWithDeleted (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,Ta... | SELECT SUM(CAST(scores AS INT)) AS sc, SUM(CAST(views AS INT)) AS vi, SUM(CAST(upvotes AS INT)) AS uv, SUM(CAST(downvotes AS INT)) AS dv FROM (SELECT p.Id AS id, Score AS scores, ViewCount AS views, SUM(CASE WHEN v.VoteTypeId = 2 THEN 1 ELSE 0 END) AS upvotes, SUM(CASE WHEN v.VoteTypeId = 3 THEN 1 ELSE 0 END) AS downvo... |
what's the jp -210- with title and source being fun! fun! minigolf | CREATE TABLE table_13663434_1 (jp__210_ VARCHAR,title_and_source VARCHAR) | SELECT jp__210_ FROM table_13663434_1 WHERE title_and_source = "Fun! Fun! Minigolf" |
What alumni were in rw: cancun as their original season? | CREATE TABLE table_26419467_1 (alumni VARCHAR,original_season VARCHAR) | SELECT alumni FROM table_26419467_1 WHERE original_season = "RW: Cancun" |
What was the opponent on october 28? | CREATE TABLE table_75153 ("Date" text,"City" text,"Opponent" text,"Results\u00b9" text,"Type of game" text) | SELECT "Opponent" FROM table_75153 WHERE "Date" = 'october 28' |
What school did the player Ethan Bennett attend? | CREATE TABLE table_11677100_16 (school VARCHAR,player VARCHAR) | SELECT school FROM table_11677100_16 WHERE player = "Ethan Bennett" |
How many starts were there when the winnings are $690,321? | CREATE TABLE table_22584 ("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 MIN("Starts") FROM table_22584 WHERE "Winnings" = '$690,321' |
did atlantic coast conference or independent have a higher win percentage ? | CREATE TABLE table_203_187 (id number,"conference" text,"bids" number,"record" text,"win %" number,"quarterfinals" number,"semifinals" number,"final" number,"champions" number) | SELECT "conference" FROM table_203_187 WHERE "conference" IN ('atlantic coast conference', 'independent') ORDER BY "win %" DESC LIMIT 1 |
What is the average age for each dorm and what are the names of each dorm Plot them as bar chart, and show by the total number from low to high. | CREATE TABLE Has_amenity (dormid INTEGER,amenid INTEGER)CREATE TABLE Student (StuID INTEGER,LName VARCHAR(12),Fname VARCHAR(12),Age INTEGER,Sex VARCHAR(1),Major INTEGER,Advisor INTEGER,city_code VARCHAR(3))CREATE TABLE Dorm_amenity (amenid INTEGER,amenity_name VARCHAR(25))CREATE TABLE Dorm (dormid INTEGER,dorm_name VAR... | SELECT dorm_name, AVG(T1.Age) FROM Student AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid GROUP BY T3.dorm_name ORDER BY AVG(T1.Age) |
Who's the captain of the team whose stadium is Gradski Stadion? | CREATE TABLE table_2800 ("Club" text,"Location" text,"Manager" text,"Stadium" text,"Capacity" real,"Team captain" text) | SELECT "Team captain" FROM table_2800 WHERE "Stadium" = 'Gradski Stadion' |
Name the date of st albans city for result of drew 0-0 | CREATE TABLE table_31956 ("Date" text,"Opponent" text,"Venue" text,"Result" text,"Attendance" real) | SELECT "Date" FROM table_31956 WHERE "Opponent" = 'st albans city' AND "Result" = 'drew 0-0' |
What are the exact Cubic inches of the Unit of kruzhka? | CREATE TABLE table_name_86 (cubic_inches__exact_ VARCHAR,unit VARCHAR) | SELECT cubic_inches__exact_ FROM table_name_86 WHERE unit = "kruzhka" |
Who was the opponent on April 28? | CREATE TABLE table_name_60 (opponent VARCHAR,date VARCHAR) | SELECT opponent FROM table_name_60 WHERE date = "april 28" |
Which competition was ranked 9? | CREATE TABLE table_53851 ("Rank" real,"Date" text,"Stadium" text,"Opponent" text,"Competition" text,"Score Scotland's score is shown first." text) | SELECT "Competition" FROM table_53851 WHERE "Rank" = '9' |
What Playoffs were held during the years of 2007-08? | CREATE TABLE table_56519 ("Year" text,"League" text,"Reg. Season" text,"Playoffs" text,"Attendance Average" text) | SELECT "Playoffs" FROM table_56519 WHERE "Year" = '2007-08' |
what were the five most frequent lab tests that patients had within the same hospital visit after receiving a parent infus nutrit sub? | CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance text,l... | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime, admissions.hadm_id FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_i... |
how many privately insured patients have been diagnosed with unspecified shock? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Private" AND diagnoses.long_title = "Shock, unspecified" |
Of weightlifters who weighed more than 136.16, who had the highest Total? | CREATE TABLE table_51387 ("Name" text,"Bodyweight" real,"Snatch" real,"Clean & jerk" real,"Total (kg)" real) | SELECT MAX("Total (kg)") FROM table_51387 WHERE "Bodyweight" > '136.16' |
What is the frequency of hot fm? | CREATE TABLE table_1387 ("Frequency" text,"Station" text,"Operator" text,"Language" text,"Genre" text,"Coverage Area" text) | SELECT COUNT("Frequency") FROM table_1387 WHERE "Station" = 'Hot FM' |
list the fares of ML airlines flights from BOSTON to PHILADELPHIA | CREATE TABLE airline (airline_code varchar,airline_name text,note text)CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE food_service (meal_code text,meal_number int,compartment text,meal_description varchar)CREATE TABLE flig... | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city... |
Tell me the 2008 for 2012 of 4r and 2009 of a | CREATE TABLE table_name_38 (Id VARCHAR) | SELECT 2008 FROM table_name_38 WHERE 2012 = "4r" AND 2009 = "a" |
what is primary disease and admission time of subject id 9258? | 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 demographic.diagnosis, demographic.admittime FROM demographic WHERE demographic.subject_id = "9258" |
which representative was the earliest to take office ? | CREATE TABLE table_203_16 (id number,"name" text,"took office" text,"left office" text,"party" text,"district residence" text,"notes" text) | SELECT "name" FROM table_203_16 ORDER BY "took office" LIMIT 1 |
Which Result has a Date of 4 april 1993? | CREATE TABLE table_38733 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text) | SELECT "Result" FROM table_38733 WHERE "Date" = '4 april 1993' |
Who is the captain of Dave Jones' team? | CREATE TABLE table_26593762_2 (team VARCHAR,manager VARCHAR) | SELECT team AS captain FROM table_26593762_2 WHERE manager = "Dave Jones" |
R questions with no answers, no comments and score >= 2. | CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDisplayName text,UserId number,ContentLicense text)CREATE TABLE PostNotices (Id number,PostId number,PostNoticeTypeId number,CreationDate time,DeletionDate time,ExpiryDate time,Body text,OwnerUserId number,DeletionUserId number)... | SELECT p.Id AS "post_link", p.Score, p.CreationDate FROM Posts AS p INNER JOIN PostTags AS pt ON p.Id = pt.PostId INNER JOIN Tags AS t ON pt.TagId = t.Id WHERE p.PostTypeId = 1 AND p.Score >= '##MinScore:int?2##' AND p.ClosedDate IS NULL AND COALESCE(p.AnswerCount, 0) = 0 AND COALESCE(p.CommentCount, 0) = 0 AND t.TagNa... |
What is the number of rushing yards when the opponentis Indiana and the player is Denard Robinson? | CREATE TABLE table_30691 ("Rank" real,"Player" text,"Year" real,"Opponent" text,"Passing yards" real,"Rushing yards" real,"Total offense" real) | SELECT MAX("Rushing yards") FROM table_30691 WHERE "Opponent" = 'Indiana' AND "Player" = 'Denard Robinson' |
What is Position, when College is 'Houston'? | CREATE TABLE table_name_97 (position VARCHAR,college VARCHAR) | SELECT position FROM table_name_97 WHERE college = "houston" |
How many railroads have the numbers 864-873? | CREATE TABLE table_2351952_1 (railroad VARCHAR,numbers VARCHAR) | SELECT COUNT(railroad) FROM table_2351952_1 WHERE numbers = "864-873" |
Which entrant used the chassis de tomaso 505? | CREATE TABLE table_15164 ("Year" real,"Entrant" text,"Chassis" text,"Engine" text,"Points" real) | SELECT "Entrant" FROM table_15164 WHERE "Chassis" = 'de tomaso 505' |
baseline hgb < 11.7 g / dl in female | CREATE TABLE table_dev_10 ("id" int,"gender" string,"hba1c" float,"serum_creatinine" float,"alcohol_abuse" bool,"baseline_hemoglobin_hgb" float,"NOUSE" float) | SELECT * FROM table_dev_10 WHERE baseline_hemoglobin_hgb < 11.7 AND gender = 'female' |
what is the yearly maximum of heart rate for patient 808 since 05/30/2100? | CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses_icd (row_id... | SELECT MAX(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 = 808)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart ... |
On what date was the week less than 3 with a result of w 24-13? | CREATE TABLE table_name_60 (date VARCHAR,week VARCHAR,result VARCHAR) | SELECT date FROM table_name_60 WHERE week < 3 AND result = "w 24-13" |
what is the average number of points scored by opponents in the five games lost this season ? | CREATE TABLE table_204_227 (id number,"week" number,"date" text,"opponent" text,"score" text,"result" text,"record" text) | SELECT AVG("score") FROM table_204_227 WHERE "result" = 'loss' |
How many total No Results occured when the team had less than 46 wins and more than 16 matches? | CREATE TABLE table_39852 ("Matches" real,"Wins" real,"Losses" real,"No Result" real,"Success Rate" text) | SELECT SUM("No Result") FROM table_39852 WHERE "Matches" > '16' AND "Wins" < '46' |
Find the name of the department that offers the largest number of credits of all classes. | CREATE TABLE class (class_code text,crs_code text,class_section text,class_time text,class_room text,prof_num number)CREATE TABLE enroll (class_code text,stu_num number,enroll_grade text)CREATE TABLE professor (emp_num number,dept_code text,prof_office text,prof_extension text,prof_high_degree text)CREATE TABLE course ... | SELECT T3.dept_name FROM course AS T1 JOIN class AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T1.dept_code = T3.dept_code GROUP BY T1.dept_code ORDER BY SUM(T1.crs_credit) DESC LIMIT 1 |
what is the number of patients whose gender is m and age is less than 55? | 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 prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.age < "55" |
Who was the Centerfold model in the issue in which the Interview subject was Jos Napole n Duarte? | CREATE TABLE table_40080 ("Date" text,"Cover model" text,"Centerfold model" text,"Interview subject" text,"Pictorials" text) | SELECT "Centerfold model" FROM table_40080 WHERE "Interview subject" = 'josé napoleón duarte' |
Which FIS Nordic World Ski Championships has Winter Olympics of 1960? | CREATE TABLE table_name_44 (fis_nordic_world_ski_championships VARCHAR,winter_olympics VARCHAR) | SELECT fis_nordic_world_ski_championships FROM table_name_44 WHERE winter_olympics = "1960" |
last time patient 018-20179 was diagnosed with coagulopathy - heparin administration? | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,... | SELECT diagnosis.diagnosistime FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '018-20179')) AND diagnosis.diagnosisname = 'coagulopathy - hepari... |
Who sanctioned the event in lincoln, illinois? | CREATE TABLE table_72761 ("Track Name" text,"Location" text,"Length" text,"Sanction" text,"Program" text) | SELECT "Sanction" FROM table_72761 WHERE "Location" = 'Lincoln, Illinois' |
What is the destination of the rail with Dhanbad as the origin? | CREATE TABLE table_name_76 (destination VARCHAR,origin VARCHAR) | SELECT destination FROM table_name_76 WHERE origin = "dhanbad" |
Tell me the total number of date for carpet | CREATE TABLE table_name_94 (date VARCHAR,surface VARCHAR) | SELECT COUNT(date) FROM table_name_94 WHERE surface = "carpet" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.