table stringlengths 33 7.14k | question stringlengths 4 1.06k | output stringlengths 2 4.44k ⌀ |
|---|---|---|
CREATE TABLE table_19248 (
"Year" real,
"Boys singles" text,
"Girls singles" text,
"Boys doubles" text,
"Girls doubles" text,
"Mixed doubles" text
) | When the girls doubles is ayu pratiwi anggi widia what is the boys doubles? | SELECT "Boys doubles" FROM table_19248 WHERE "Girls doubles" = 'Ayu Pratiwi Anggi Widia' |
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 (
Scho... | Draw a bar chart about the distribution of ACC_Road and the amount of ACC_Road , and group by attribute ACC_Road, and order by the ACC_Road in desc. | SELECT ACC_Road, COUNT(ACC_Road) FROM basketball_match GROUP BY ACC_Road ORDER BY ACC_Road DESC |
CREATE TABLE table_name_51 (
equipment VARCHAR,
position VARCHAR,
points VARCHAR
) | What is Equipment, when Position is greater than 28, and when Points is greater than 10? | SELECT equipment FROM table_name_51 WHERE position > 28 AND points > 10 |
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 medication (
medi... | when did patient 007-2498 last receive a diagnosis of encephalopathy since 5 years ago? | 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 = '007-2498')) AND diagnosis.diagnosisname = 'encephalopathy' AND DA... |
CREATE TABLE table_11381701_3 (
date VARCHAR,
bada VARCHAR
) | On which dates was the value of Bada 0.05%? | SELECT date FROM table_11381701_3 WHERE bada = "0.05%" |
CREATE TABLE table_61900 (
"Year" real,
"Edition" text,
"Round" text,
"Date" text,
"Location" text,
"Surface" text,
"Against" text,
"Opponent(s)" text,
"Score" text,
"Result" text
) | Which Year has a Date of 5 6 february? | SELECT AVG("Year") FROM table_61900 WHERE "Date" = '5–6 february' |
CREATE TABLE table_2311410_5 (
erin_and_jake VARCHAR,
week VARCHAR
) | Name the erin and jake for week 4 | SELECT erin_and_jake FROM table_2311410_5 WHERE week = 4 |
CREATE TABLE table_51527 (
"Round" real,
"Overall" real,
"Player" text,
"Nationality" text,
"Club team" text
) | Name the nationality of the player with an overall of 74 | SELECT "Nationality" FROM table_51527 WHERE "Overall" = '74' |
CREATE TABLE employment (
Company_ID int,
People_ID int,
Year_working int
)
CREATE TABLE company (
Company_ID real,
Name text,
Headquarters text,
Industry text,
Sales_in_Billion real,
Profits_in_Billion real,
Assets_in_Billion real,
Market_Value_in_Billion real
)
CREATE TAB... | Show the number of headquarters from each headquarters | SELECT Headquarters, COUNT(Headquarters) FROM company GROUP BY Headquarters |
CREATE TABLE table_23952 (
"Position" real,
"Race number" text,
"Sail number" text,
"Yacht" text,
"State/country" text,
"Yacht type" text,
"LOA (Metres)" text,
"Skipper" text,
"Elapsed time d:hh:mm:ss" text
) | What are the LOA (metres) of boat with sail number M10? | SELECT "LOA (Metres)" FROM table_23952 WHERE "Sail number" = 'M10' |
CREATE TABLE table_name_44 (
venue VARCHAR,
competition VARCHAR,
result VARCHAR
) | What venue were the 1986 Asian games resulting in 2-0 played at? | SELECT venue FROM table_name_44 WHERE competition = "1986 asian games" AND result = "2-0" |
CREATE TABLE table_24899 (
"Code & location" text,
"Missile Type" text,
"Defense Area" text,
"Dates" text,
"Control Site condition/owner" text,
"Launch Site condition/owner" text
) | When is every date that control site condition or owner is machine shop on Martin Dr.? | SELECT "Dates" FROM table_24899 WHERE "Control Site condition/owner" = 'machine shop on Martin Dr.' |
CREATE TABLE table_13463790_2 (
city VARCHAR,
name VARCHAR
) | how many city with name being providence tower | SELECT COUNT(city) FROM table_13463790_2 WHERE name = "Providence Tower" |
CREATE TABLE table_65129 (
"Heat" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" text
) | What's Bulgaria's lane? | SELECT AVG("Lane") FROM table_65129 WHERE "Nationality" = 'bulgaria' |
CREATE TABLE table_name_34 (
nfl_club VARCHAR,
pick VARCHAR,
position VARCHAR
) | What is the NFL club of the cornerback player with a pick greater than 63? | SELECT nfl_club FROM table_name_34 WHERE pick > 63 AND position = "cornerback" |
CREATE TABLE table_name_41 (
outcome VARCHAR,
opponent VARCHAR
) | What was the outcome in mari andersson's tournament? | SELECT outcome FROM table_name_41 WHERE opponent = "mari andersson" |
CREATE TABLE student (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
tot_cred numeric(3,0)
)
CREATE TABLE advisor (
s_ID varchar(5),
i_ID varchar(5)
)
CREATE TABLE instructor (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
salary numeric(8,2)
)
CREATE TABLE... | Find the total number of students in each department. Show bar chart. | SELECT dept_name, COUNT(*) FROM student GROUP BY dept_name |
CREATE TABLE table_train_94 (
"id" int,
"mini_mental_state_examination_mmse" int,
"substance_dependence" bool,
"psychiatric_disease" bool,
"modified_hachinski_ischemia_scale" int,
"smoking" bool,
"alcohol_abuse" bool,
"NOUSE" float
) | the subject has a recent history ( within 2 years ) of alcohol or substance abuse / dependence. | SELECT * FROM table_train_94 WHERE alcohol_abuse = 1 OR substance_dependence = 1 OR substance_dependence = 1 |
CREATE TABLE table_name_39 (
date VARCHAR,
shooter VARCHAR
) | What is the Date of Shooter New Targets from 1989's record? | SELECT date FROM table_name_39 WHERE shooter = "new targets from 1989" |
CREATE TABLE instruments (
songid number,
bandmateid number,
instrument text
)
CREATE TABLE tracklists (
albumid number,
position number,
songid number
)
CREATE TABLE band (
id number,
firstname text,
lastname text
)
CREATE TABLE performance (
songid number,
bandmate numbe... | What are the song titles on the album 'A Kiss Before You Go: Live in Hamburg'? | SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE T1.title = "A Kiss Before You Go: Live in Hamburg" |
CREATE TABLE table_78212 (
"Date" text,
"Competition" text,
"Venue" text,
"Result" text,
"Score" text,
"Tries" text,
"Goals" text
) | What were the goals on 3/10/97? | SELECT "Goals" FROM table_78212 WHERE "Date" = '3/10/97' |
CREATE TABLE table_name_33 (
debut INTEGER,
player VARCHAR,
years_played VARCHAR
) | what is the debut when the play er is radoslava topalova and the years played is less than 2? | SELECT AVG(debut) FROM table_name_33 WHERE player = "radoslava topalova" AND years_played < 2 |
CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
)
CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
) | What is the average age of captains in different classes?, order by the bars from high to low. | SELECT Class, AVG(age) FROM captain GROUP BY Class ORDER BY Class DESC |
CREATE TABLE table_name_2 (
score VARCHAR,
surface VARCHAR,
opponent_in_the_final VARCHAR
) | What is the score of the match played on a hard surface with an opponent in the final of Elena Likhovtseva? | SELECT score FROM table_name_2 WHERE surface = "hard" AND opponent_in_the_final = "elena likhovtseva" |
CREATE TABLE Addresses (
address_id INTEGER,
line_1 VARCHAR(120),
line_2 VARCHAR(120),
line_3 VARCHAR(120),
city VARCHAR(80),
zip_postcode VARCHAR(20),
state_province_county VARCHAR(50),
country VARCHAR(50),
other_address_details VARCHAR(255)
)
CREATE TABLE Behavior_Incident (
i... | A bar chart about the number of end dates for incidents with incident type code 'NOISE' and bin by month. | SELECT date_incident_end, COUNT(date_incident_end) FROM Behavior_Incident WHERE incident_type_code = "NOISE" |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE TagSynonyms (
Id number... | Test - top 20 viewcount. | SELECT Id AS "post_link", Score, Tags, OwnerUserId, OwnerDisplayName, ParentId FROM Posts ORDER BY ViewCount DESC LIMIT 20 |
CREATE TABLE table_4572 (
"Commodity" text,
"2001-02" text,
"2002-03" text,
"2003-04" text,
"2004-05" text,
"2005-06" text,
"2006-07" text
) | What was the production in 2002-03 for the commodity that produced 1,725 in 2001-02? | SELECT "2002-03" FROM table_4572 WHERE "2001-02" = '1,725' |
CREATE TABLE table_22669375_1 (
race_name VARCHAR,
date VARCHAR
) | Name the race name for june 6 | SELECT race_name FROM table_22669375_1 WHERE date = "June 6" |
CREATE TABLE table_37314 (
"Club" text,
"Played" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text
) | What were the points for a team that 414 points against? | SELECT "Points for" FROM table_37314 WHERE "Points against" = '414' |
CREATE TABLE table_15329 (
"County" text,
"Kerry %" text,
"Kerry #" real,
"Bush %" text,
"Bush #" real,
"Others %" text,
"Others #" real
) | How many votes did Other receive where Bush received less than 154,204 votes, and Kerry received 41.7% and more than 98,066 votes? | SELECT COUNT("Others #") FROM table_15329 WHERE "Bush #" < '154,204' AND "Kerry %" = '41.7%' AND "Kerry #" > '98,066' |
CREATE TABLE table_76670 (
"Driver" text,
"Team" text,
"Race 1" text,
"Race 2" text,
"Points" real
) | Which driver for Bob Holden Motors has fewer than 36 points and placed 7 in race 1? | SELECT "Driver" FROM table_76670 WHERE "Points" < '36' AND "Team" = 'bob holden motors' AND "Race 1" = '7' |
CREATE TABLE station (
id number,
name text,
lat number,
long number,
dock_count number,
city text,
installation_date text
)
CREATE TABLE weather (
date text,
max_temperature_f number,
mean_temperature_f number,
min_temperature_f number,
max_dew_point_f number,
mean_... | What are the names of stations that are located in Palo Alto city but have never been the ending point of trips more than 100 times? | SELECT name FROM station WHERE city = "Palo Alto" EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING COUNT(*) > 100 |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | provide the number of patients whose ethnicity is asian and drug name is talc? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "ASIAN" AND prescriptions.drug = "Talc" |
CREATE TABLE COURSE (
CRS_CODE varchar(10),
DEPT_CODE varchar(10),
CRS_DESCRIPTION varchar(35),
CRS_CREDIT float(8)
)
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE va... | Show the number of courses for each instructor in a bar chart. | SELECT EMP_FNAME, COUNT(EMP_FNAME) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM JOIN COURSE AS T3 ON T1.CRS_CODE = T3.CRS_CODE JOIN PROFESSOR AS T4 ON T2.EMP_NUM = T4.EMP_NUM GROUP BY EMP_FNAME |
CREATE TABLE table_29626583_1 (
pick__number INTEGER,
mls_team VARCHAR
) | how many pick# does the chivas usa mls team have | SELECT MAX(pick__number) FROM table_29626583_1 WHERE mls_team = "Chivas USA" |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE outputevents (
... | what were the first potassium from patient 29309 since 01/2103? | SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 29309) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'potassium') AND STRFTIME('%y-%m', labevents.charttime) >= '2103-01' ORDER BY lab... |
CREATE TABLE table_50767 (
"Position" real,
"Played" real,
"Points" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Goal Difference" real
) | What is the lowest Goals, when Played is greater than 30? | SELECT MIN("Goals for") FROM table_50767 WHERE "Played" > '30' |
CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varchar(12),
EMP_INITIAL varchar(1),
EMP_JOBCODE varchar(5),
EMP_HIREDATE datetime,
EMP_DOB datetime
)
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION v... | How many students taking a course who received an A or C? Group by students' last name with a bar chart, and display by the STU_LNAME in desc. | SELECT STU_LNAME, COUNT(STU_LNAME) FROM STUDENT AS T1 JOIN ENROLL AS T2 ON T1.STU_NUM = T2.STU_NUM WHERE T2.ENROLL_GRADE = 'C' OR T2.ENROLL_GRADE = 'A' GROUP BY STU_LNAME ORDER BY STU_LNAME DESC |
CREATE TABLE table_name_34 (
zan_1 VARCHAR,
nor_1 VARCHAR
) | What is the zan 1 that has 11 as the nor 1? | SELECT zan_1 FROM table_name_34 WHERE nor_1 = "11" |
CREATE TABLE table_16083 (
"Headstamp ID" text,
"Primer Annulus Color" text,
"Bullet Tip Color" text,
"Other Features" text,
"Functional Type" text
) | How many primers annulus colors were there when the color of the bullet tip was white? | SELECT COUNT("Primer Annulus Color") FROM table_16083 WHERE "Bullet Tip Color" = 'White' |
CREATE TABLE table_25352324_5 (
points VARCHAR,
player VARCHAR
) | How many values for points have Sophia Witherspoon as the player? | SELECT COUNT(points) FROM table_25352324_5 WHERE player = "Sophia Witherspoon" |
CREATE TABLE table_30090 (
"No. in series" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (millions)" text
) | What episode number of the series is 'open water'? | SELECT "No. in series" FROM table_30090 WHERE "Title" = 'Open Water' |
CREATE TABLE addresses (
address_id number,
line_1_number_building text,
city text,
zip_postcode text,
state_province_county text,
country text
)
CREATE TABLE customers (
customer_id number,
customer_address_id number,
customer_status_code text,
date_became_customer time,
da... | How long is the total lesson time taught by staff with first name as Janessa and last name as Sawayn? | SELECT SUM(lesson_time) FROM lessons AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn" |
CREATE TABLE mountain (
id int,
name text,
Height real,
Prominence real,
Range text,
Country text
)
CREATE TABLE camera_lens (
id int,
brand text,
name text,
focal_length_mm real,
max_aperture real
)
CREATE TABLE photos (
id int,
camera_lens_id int,
mountain_id ... | Please draw a bar chart to show the total number of different color. | SELECT color, COUNT(color) FROM photos GROUP BY color |
CREATE TABLE table_64581 (
"Wager" text,
"Winner" text,
"Loser" text,
"Location" text,
"Date" text
) | What is the date of the match where vampiro was the winner in Mexico City? | SELECT "Date" FROM table_64581 WHERE "Location" = 'mexico city' AND "Winner" = 'vampiro' |
CREATE TABLE table_204_833 (
id number,
"game" number,
"date" text,
"team" text,
"score" text,
"high points" text,
"high rebounds" text,
"high assists" text,
"location\nattendance" text,
"record" text
) | how many games was loss ? | SELECT COUNT(*) FROM table_204_833 WHERE "score" = 'l' |
CREATE TABLE table_50336 (
"Team" text,
"Winners" real,
"Runners-Up" real,
"Years Won" text,
"Years Runner-Up" text
) | When the Runners-Up is larger than 0, what's the sum of winners? | SELECT SUM("Winners") FROM table_50336 WHERE "Runners-Up" > '0' |
CREATE TABLE table_203_36 (
id number,
"parish" text,
"locality" text,
"parish priest" text,
"founded" number,
"closed" number
) | how many parishes had fr frank thorpe as their parish priest ? | SELECT COUNT("parish") FROM table_203_36 WHERE "parish priest" = 'fr frank thorpe' |
CREATE TABLE table_78709 (
"Ending" text,
"American" text,
"British" text,
"Australian" text,
"Examples" text
) | Which Australian has British of s? | SELECT "Australian" FROM table_78709 WHERE "British" = 'ɒs' |
CREATE TABLE table_19948664_1 (
countries_sampled INTEGER,
ranking_la__2_ VARCHAR,
author___editor___source VARCHAR,
year_of_publication VARCHAR
) | How many countries were sampled in the index created by The Economist, published in 2007 and ranked 2nd in the LA Ranking? | SELECT MAX(countries_sampled) FROM table_19948664_1 WHERE author___editor___source = "The Economist" AND year_of_publication = "2007" AND ranking_la__2_ = "2nd" |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellv... | how many times did patient 002-62161 receive the -polys test in 2105? | SELECT COUNT(*) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-62161')) AND lab.labname = '-polys' AND STRFTIME('%y', lab.labresulttime) = '2105' |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | how many patients died after having been diagnosed with hemorrhage within the same hospital visit until 1 year ago? | SELECT COUNT(DISTINCT t2.uniquepid) FROM (SELECT t1.uniquepid, t1.diagnosistime, t1.patienthealthsystemstayid FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = ... |
CREATE TABLE table_name_79 (
year INTEGER,
name VARCHAR
) | What is the total time for one south broad? | SELECT SUM(year) FROM table_name_79 WHERE name = "one south broad" |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | in 08/last year, what organism was found in patient 031-23724's last blood, venipuncture test? | SELECT microlab.organism FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-23724')) AND microlab.culturesite = 'blood, venipuncture' AND DATETIM... |
CREATE TABLE table_62064 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | Which To par has a Place of t2, and a Player of mark james? | SELECT "To par" FROM table_62064 WHERE "Place" = 't2' AND "Player" = 'mark james' |
CREATE TABLE table_76724 (
"Date" text,
"Home team" text,
"Score" text,
"Away team" text,
"Venue" text,
"Box Score" text,
"Report" text
) | What was the box score during a game that had a score of 86-96? | SELECT "Box Score" FROM table_76724 WHERE "Score" = '86-96' |
CREATE TABLE table_name_84 (
songwriter_s_ VARCHAR,
production_credits VARCHAR,
track VARCHAR
) | Who was the songwriter for Track 4, produced by nigel wright and john smits? | SELECT songwriter_s_ FROM table_name_84 WHERE production_credits = "nigel wright and john smits" AND track = 4 |
CREATE TABLE table_51556 (
"Player" text,
"Position" text,
"Date of Birth (Age)" text,
"Caps" real,
"Club/province" text
) | What club/province does the prop player with over 45 caps play for? | SELECT "Club/province" FROM table_51556 WHERE "Caps" > '45' AND "Position" = 'prop' |
CREATE TABLE table_35411 (
"Constituency" text,
"Electorate" real,
"Turnout" text,
"Spoilt" text,
"Valid Poll" real,
"Quota" text,
"Seats" real,
"Candidates" real
) | What is the smallest electorate with 78,076 quota and less than 13 candidates? | SELECT MIN("Electorate") FROM table_35411 WHERE "Quota" = '78,076' AND "Candidates" < '13' |
CREATE TABLE table_60383 (
"Tournament" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
) | Can you tell me the 2010 that has the 2008 of grand slam tournaments? | SELECT "2010" FROM table_60383 WHERE "2008" = 'grand slam tournaments' |
CREATE TABLE table_62290 (
"Outcome" text,
"Date" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
) | What was the surface when the opponent was sergiy stakhovsky mikhail youzhny? | SELECT "Surface" FROM table_62290 WHERE "Opponents" = 'sergiy stakhovsky mikhail youzhny' |
CREATE TABLE table_55137 (
"Year" real,
"Award" text,
"Category" text,
"Nominated work" text,
"Result" text
) | Which category was the berlin file up to win in 2013? | SELECT "Category" FROM table_55137 WHERE "Year" = '2013' AND "Nominated work" = 'the berlin file' |
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
) | For those products with a price between 60 and 120, return a bar chart about the distribution of name and code , and I want to rank by the x-axis in asc. | SELECT Name, Code FROM Products WHERE Price BETWEEN 60 AND 120 ORDER BY Name |
CREATE TABLE table_62586 (
"Medal" text,
"Name" text,
"Games" text,
"Sport" text,
"Event" text
) | In what Event did Dorcus Inzikuru compete? | SELECT "Event" FROM table_62586 WHERE "Name" = 'dorcus inzikuru' |
CREATE TABLE table_name_24 (
nationality VARCHAR,
college_junior_club_team VARCHAR,
player VARCHAR
) | What nationality is Mark Hirth from Michigan State University (NCAA)? | SELECT nationality FROM table_name_24 WHERE college_junior_club_team = "michigan state university (ncaa)" AND player = "mark hirth" |
CREATE TABLE table_name_46 (
year INTEGER,
version VARCHAR
) | What year was Mother's Live remix created? | SELECT SUM(year) FROM table_name_46 WHERE version = "mother's live remix" |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | count the number of patients whose lab test fluid is blood. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.fluid = "Blood" |
CREATE TABLE manufacturers (
code number,
name text,
headquarter text,
founder text,
revenue number
)
CREATE TABLE products (
code number,
name text,
price number,
manufacturer number
) | What is the average price of products with manufacturer codes equal to 2? | SELECT AVG(price) FROM products WHERE manufacturer = 2 |
CREATE TABLE table_20924 (
"Country" text,
"Region" text,
"Joined OPEC" real,
"Population (July 2012)" real,
"Area (km\u00b2)" real,
"Production ( bbl /day)" text
) | Which regions had a production (bbl/day) of 1,213,000 (21st)? | SELECT "Region" FROM table_20924 WHERE "Production ( bbl /day)" = '1,213,000 (21st)' |
CREATE TABLE table_3842 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | Who had high assists in the game played at Oklahoma city arena 17,509? | SELECT "High assists" FROM table_3842 WHERE "Location Attendance" = 'Oklahoma City Arena 17,509' |
CREATE TABLE table_2226817_8 (
written_by VARCHAR,
no_in_season VARCHAR
) | Who is the writer of episode 13? | SELECT COUNT(written_by) FROM table_2226817_8 WHERE no_in_season = 13 |
CREATE TABLE table_35779 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
) | What is the record of the Hartford Whalers home team with the April 13 game date? | SELECT "Record" FROM table_35779 WHERE "Home" = 'hartford whalers' AND "Date" = 'april 13' |
CREATE TABLE table_27599216_6 (
founded INTEGER,
team VARCHAR
) | What is the year founded for the team Dinos? | SELECT MAX(founded) FROM table_27599216_6 WHERE team = "Dinos" |
CREATE TABLE table_name_84 (
home VARCHAR,
guest VARCHAR
) | Who was the home team when FK kom were the guests? | SELECT home FROM table_name_84 WHERE guest = "fk kom" |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID... | For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of hire_date and the sum of department_id bin hire_date by weekday, order from low to high by the Y please. | SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SUM(DEPARTMENT_ID) |
CREATE TABLE table_name_67 (
qual VARCHAR,
laps VARCHAR
) | When completing 182 laps, what was the qual.? | SELECT qual FROM table_name_67 WHERE laps = 182 |
CREATE TABLE table_34459 (
"Date" text,
"City" text,
"Opponent" text,
"Results\u00b9" text,
"Type of game" text
) | what game was played on june 14 | SELECT "Type of game" FROM table_34459 WHERE "Date" = 'june 14' |
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 demographic ... | what is the number of patients whose gender is f and admission type is newborn? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.admission_type = "NEWBORN" |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime ti... | what is patient 42757's age during their first hospital visit? | SELECT admissions.age FROM admissions WHERE admissions.subject_id = 42757 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1 |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | provide the number of patients whose admission location is clinic referral/premature and diagnoses short title is chr tot occlus cor artry? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND diagnoses.short_title = "Chr tot occlus cor artry" |
CREATE TABLE table_name_6 (
electorate VARCHAR,
member VARCHAR,
state VARCHAR,
party VARCHAR
) | Which Electorate is from vic, a labor party, and is David Charles a member of? | SELECT electorate FROM table_name_6 WHERE state = "vic" AND party = "labor" AND member = "david charles" |
CREATE TABLE table_29250534_1 (
manager VARCHAR,
club VARCHAR
) | Who is the manager for the fc inter club? | SELECT manager FROM table_29250534_1 WHERE club = "FC Inter" |
CREATE TABLE book (
Title VARCHAR,
Book_ID VARCHAR
)
CREATE TABLE publication (
Publication_Date VARCHAR,
Book_ID VARCHAR
) | Show the title and publication dates of books. | SELECT T1.Title, T2.Publication_Date FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetake... | how many days have elapsed since patient 006-158338 had received an ph lab test for the first time in the current hospital encounter? | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', lab.labresulttime)) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-158338' AND patient.hosp... |
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE flight_fare (
flight_id int,
f... | am flights from ATLANTA to PHILADELPHIA | 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... |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod tim... | what were the four most frequently prescribed drugs to the patients aged 20s within 2 months after they had been diagnosed with diaphragmatic hernia until 1 year ago? | 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 ... |
CREATE TABLE table_name_88 (
precincts VARCHAR,
g_hager VARCHAR
) | Which Precincts has a G. Hager of 2,260 (15%)? | SELECT precincts FROM table_name_88 WHERE g_hager = "2,260 (15%)" |
CREATE TABLE table_name_12 (
broadcaster VARCHAR,
territory VARCHAR
) | Who broadcasts in malaysia? | SELECT broadcaster FROM table_name_12 WHERE territory = "malaysia" |
CREATE TABLE table_name_18 (
position VARCHAR,
college VARCHAR,
overall VARCHAR
) | Which Position has a College of washington, and an Overall of 46? | SELECT position FROM table_name_18 WHERE college = "washington" AND overall = 46 |
CREATE TABLE table_25085059_1 (
cfl_team VARCHAR,
position VARCHAR,
college VARCHAR
) | What CFL team obtained a draft pick from North Dakota who plays OL position? | SELECT cfl_team FROM table_25085059_1 WHERE position = "OL" AND college = "North Dakota" |
CREATE TABLE tweets (
followers INTEGER,
UID VARCHAR
)
CREATE TABLE user_profiles (
followers INTEGER,
UID VARCHAR
) | Find the average number of followers for the users who do not have any tweet. | SELECT AVG(followers) FROM user_profiles WHERE NOT UID IN (SELECT UID FROM tweets) |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | provide me the number of patients taking base type drug prescription who have diagnoses icd9 code 28860. | 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 = "28860" AND prescriptions.drug_type = "BASE" |
CREATE TABLE table_38971 (
"Year" text,
"Men's singles" text,
"Women's singles" text,
"Men's doubles" text,
"Women's doubles" text,
"Mixed doubles" text
) | Name the men's doubles for 2010 | SELECT "Men's doubles" FROM table_38971 WHERE "Year" = '2010' |
CREATE TABLE table_name_21 (
home_team VARCHAR,
venue VARCHAR
) | What is the home team of Lake Oval? | SELECT home_team FROM table_name_21 WHERE venue = "lake oval" |
CREATE TABLE Faculty_Participates_in (
FacID INTEGER,
actid 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 Activity (
actid INTEGER,
a... | Show me a bar chart for how many faculty members do we have for each faculty rank? | SELECT Rank, COUNT(*) FROM Faculty GROUP BY Rank |
CREATE TABLE submission (
Submission_ID int,
Scores real,
Author text,
College text
)
CREATE TABLE workshop (
Workshop_ID int,
Date text,
Venue text,
Name text
)
CREATE TABLE Acceptance (
Submission_ID int,
Workshop_ID int,
Result text
) | For each submission, group its acceptance result and count them Visualize them in a bar chart, and could you order by the Y in desc? | SELECT Result, COUNT(Result) FROM Acceptance GROUP BY Result ORDER BY COUNT(Result) DESC |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | Give me the comparison about School_ID over the Team_Name . | SELECT Team_Name, School_ID FROM basketball_match |
CREATE TABLE table_57415 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Date" text
) | Who has an away team score of 2.2 (14)? | SELECT "Home team" FROM table_57415 WHERE "Away team score" = '2.2 (14)' |
CREATE TABLE table_18843 (
"Autonomous Community" text,
"Hydroelectric power" real,
"Wind power" real,
"Solar power" real,
"Biomass power" real,
"Solid waste power" real,
"Total Renewable Generation" real,
"Total Electricity Demand" real,
"% Renewable of Total Electricity Demand" tex... | What is the lowest numbered hydroelectric power when the renewable electricity demand is 21.5%? | SELECT MIN("Hydroelectric power") FROM table_18843 WHERE "% Renewable of Total Electricity Demand" = '21.5%' |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | what is drug route of drug name influenza virus vaccine? | SELECT prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Influenza Virus Vaccine" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.