table stringlengths 33 7.14k | question stringlengths 4 1.06k | output stringlengths 2 4.44k ⌀ |
|---|---|---|
CREATE TABLE table_name_82 (
acquisition_via VARCHAR,
school_club_team VARCHAR
) | Which is the acquisition via that has a school or club team of state? | SELECT acquisition_via FROM table_name_82 WHERE school_club_team = "state" |
CREATE TABLE table_40981 (
"Rank" real,
"Name" text,
"Years" text,
"Matches" real,
"Goals" real
) | What is the Rank for Viktors Dobrecovs with less than 325 Matches? | SELECT AVG("Rank") FROM table_40981 WHERE "Name" = 'viktors dobrecovs' AND "Matches" < '325' |
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total... | The 200 -level classes , are they available in Spring or Summer terms ? | SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'department0' AND course.number BETWEEN 200 AND 200 + 100 AND semester.semester IN ('SP', 'SU', 'SS') AND semester.semester_i... |
CREATE TABLE table_47383 (
"Name" text,
"Born-Died" text,
"Term start" text,
"Term end" text,
"Political Party" text
) | What is the Term Start date of the Progressive Party Prime Minister? | SELECT "Term start" FROM table_47383 WHERE "Political Party" = 'progressive party' |
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... | Find suggested duplicates that haven't led to question closure in a tag. Locate old dupe suggestions where the flag has timed out | SELECT p.Id AS "post_link", p.CreationDate FROM Comments AS c JOIN Posts AS p ON c.PostId = p.Id JOIN PostTags AS pt ON pt.PostId = p.Id JOIN Tags AS t ON t.Id = pt.TagId WHERE c.Text LIKE '%possible duplicate%' AND p.ClosedDate IS NULL AND p.PostTypeId = 1 AND t.TagName = @Tag ORDER BY p.Id |
CREATE TABLE table_66073 (
"Period" text,
"Internet Explorer" text,
"Firefox" text,
"Chrome" text,
"Safari" text,
"Opera" text,
"Other Mozilla" text,
"Mobile" text
) | What percentage of users were using mobile browsers during the period in which 9.00% were using Chrome? | SELECT "Mobile" FROM table_66073 WHERE "Chrome" = '9.00%' |
CREATE TABLE table_66747 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Time" text,
"Att." real,
"Record" text
) | Who was the opponent with the time 3:59? | SELECT "Opponent" FROM table_66747 WHERE "Time" = '3:59' |
CREATE TABLE table_73724 (
"Stage" real,
"Winner" text,
"General Classification" text,
"Youth Classification" text,
"Mountains Classification" text,
"Sprint Classification" text,
"Most Courageous" text,
"Team Classification" text
) | When Brett Lancaster won the general classification, who won the team calssification? | SELECT "Team Classification" FROM table_73724 WHERE "General Classification" = 'Brett Lancaster' |
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... | How many patients aged below 79 years have lab test fluid as urine? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "79" AND lab.fluid = "Urine" |
CREATE TABLE table_42497 (
"Year" real,
"Winner" text,
"School" text,
"Position" text,
"Points" text,
"% of Points Possible" text
) | What is the year of the winner from the army school, plays the halfback position, and has a % of points possible of 39.01%? | SELECT SUM("Year") FROM table_42497 WHERE "School" = 'army' AND "Position" = 'halfback' AND "% of Points Possible" = '39.01%' |
CREATE TABLE table_name_94 (
romaji_title VARCHAR,
japanese_title VARCHAR
) | Which romaji title, has Japanese title of 3? | SELECT romaji_title FROM table_name_94 WHERE japanese_title = "菊次郎とさき 3" |
CREATE TABLE table_49456 (
"Year" real,
"Album" text,
"Artist" text,
"Song" text,
"Note" text
) | Which artist was 2003? | SELECT "Artist" FROM table_49456 WHERE "Year" = '2003' |
CREATE TABLE table_36337 (
"ISSN" text,
"Language" text,
"Country" text,
"Frequency" text,
"Publication range" text,
"Status" text,
"Document Type" text
) | What is the language for a journal that has a frequency of 3 times per year and has an ISSN number of 1136-7385? | SELECT "Language" FROM table_36337 WHERE "Frequency" = '3 times per year' AND "ISSN" = '1136-7385' |
CREATE TABLE table_name_14 (
tournament VARCHAR,
date VARCHAR
) | what is the tournament on august 17, 2008? | SELECT tournament FROM table_name_14 WHERE date = "august 17, 2008" |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
U... | Questions with answers more than 5. | SELECT Q.Id AS QId, Q.Title AS QTitle, Q.Body AS QBody, G.Id AS GId, G.Body AS GBody, Q.Score AS QScore, G.Score AS GScore, Q.ViewCount AS QViewCount, G.ViewCount AS GViewCount, Q.Tags AS QTags, G.Title AS GTitle FROM Posts AS G, (SELECT * FROM Posts WHERE ParentId IS NULL AND AnswerCount >= 5) AS Q WHERE G.ParentId = ... |
CREATE TABLE table_25549 (
"Year" real,
"Dates" text,
"Champion" text,
"Country" text,
"Score" text,
"Margin of victory" text,
"Tournament location" text,
"Purse ( $ )" real,
"Winners share ($)" real
) | What was the winner share (in $) in the year when Se Ri Pak (2) was the champion? | SELECT MIN("Winners share ($)") FROM table_25549 WHERE "Champion" = 'Se Ri Pak (2)' |
CREATE TABLE table_name_35 (
call_sign VARCHAR,
frequency_mhz VARCHAR,
erp_w VARCHAR
) | What is the call sign of the MHz Frequency less than 94.9 and an ERP W of 170? | SELECT call_sign FROM table_name_35 WHERE frequency_mhz < 94.9 AND erp_w = 170 |
CREATE TABLE table_name_39 (
michelle INTEGER,
discipline VARCHAR
) | How did michelle do in archery? | SELECT AVG(michelle) FROM table_name_39 WHERE discipline = "archery" |
CREATE TABLE table_28498999_6 (
reset_points VARCHAR,
player VARCHAR
) | what is the number of pieces where the person is charley hoffman | SELECT COUNT(reset_points) FROM table_28498999_6 WHERE player = "Charley Hoffman" |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime t... | did patient 027-85328 excreted any output (ml)-urethral catheter diana acuna, rn latex;straight-tip 14 fr. since 09/2105? | SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-85328')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutpu... |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperio... | when was patient 018-20179 first admitted to the hospital through the operating room since 1 year ago? | SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '018-20179' AND patient.hospitaladmitsource = 'operating room' AND DATETIME(patient.hospitaladmittime) >= DATETIME(CURRENT_TIME(), '-1 year') ORDER BY patient.hospitaladmittime LIMIT 1 |
CREATE TABLE table_name_28 (
to_par VARCHAR,
finish VARCHAR
) | When the finish was t31 what was the To par? | SELECT to_par FROM table_name_28 WHERE finish = "t31" |
CREATE TABLE table_204_775 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | how many gold and silver medals in total did china receive ? | SELECT "gold" + "silver" FROM table_204_775 WHERE "nation" = 'china' |
CREATE TABLE Courses (
course_id INTEGER,
author_id INTEGER,
subject_id INTEGER,
course_name VARCHAR(120),
course_description VARCHAR(255)
)
CREATE TABLE Student_Course_Enrolment (
registration_id INTEGER,
student_id INTEGER,
course_id INTEGER,
date_of_enrolment DATETIME,
date_o... | Which tests have 'Pass' results? Return the dates when the tests were taken, and count them by a line chart, and I want to display by the X-axis in asc. | SELECT date_test_taken, COUNT(date_test_taken) FROM Student_Tests_Taken WHERE test_result = "Pass" ORDER BY date_test_taken |
CREATE TABLE table_52319 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What is the score of the Home team of geelong? | SELECT "Home team score" FROM table_52319 WHERE "Home team" = 'geelong' |
CREATE TABLE table_name_32 (
number VARCHAR,
season VARCHAR
) | What number has 2002-2003 as the season? | SELECT number FROM table_name_32 WHERE season = "2002-2003" |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | give me the number of patients whose diagnoses short title is routine circumcision and drug type is additive? | 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.short_title = "Routine circumcision" AND prescriptions.drug_type = "ADDITIVE" |
CREATE TABLE table_59996 (
"Election" text,
"First member" text,
"First party" text,
"Second member" text,
"Second party" text
) | What is the first party with second member Hon. Rowland Hill, in the 1857 election? | SELECT "First party" FROM table_59996 WHERE "Second member" = 'hon. rowland hill' AND "Election" = '1857' |
CREATE TABLE table_12094300_1 (
interview VARCHAR,
preliminaries VARCHAR
) | What is the interview score when the preliminaries score is 8.400? | SELECT interview FROM table_12094300_1 WHERE preliminaries = "8.400" |
CREATE TABLE table_25061 (
"Name" text,
"#" real,
"Position" text,
"Height" text,
"Weight" real,
"Year" text,
"Home Town" text,
"High School" text
) | How many height entries are there for players from lagos, nigeria? | SELECT COUNT("Height") FROM table_25061 WHERE "Home Town" = 'Lagos, Nigeria' |
CREATE TABLE table_name_10 (
date VARCHAR,
home_team VARCHAR
) | On what date is Hawthorn the home team? | SELECT date FROM table_name_10 WHERE home_team = "hawthorn" |
CREATE TABLE table_16519 (
"Team" text,
"Stadium" text,
"Capacity" real,
"Highest" real,
"Lowest" real,
"Average" real
) | What is the lowest attendance that East End Park has ever had? | SELECT MIN("Lowest") FROM table_16519 WHERE "Stadium" = 'East End Park' |
CREATE TABLE table_20730 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Ground" text,
"Crowd" real,
"Date" text,
"Time" text
) | How many days was the away team's score 11.8 (74)? | SELECT COUNT("Date") FROM table_20730 WHERE "Away team score" = '11.8 (74)' |
CREATE TABLE table_name_60 (
rank INTEGER,
player VARCHAR
) | What's jim colbert's highest rank? | SELECT MAX(rank) FROM table_name_60 WHERE player = "jim colbert" |
CREATE TABLE airports (
apid number,
name text,
city text,
country text,
x number,
y number,
elevation number,
iata text,
icao text
)
CREATE TABLE airlines (
alid number,
name text,
iata text,
icao text,
callsign text,
country text,
active text
)
CREATE ... | What is the number of airports per country, ordered from most to least? | SELECT COUNT(*), country FROM airports GROUP BY country ORDER BY COUNT(*) DESC |
CREATE TABLE table_name_94 (
partner VARCHAR,
score_in_final VARCHAR
) | Which Partner has a Score in Final of 6 1, 6 2? | SELECT partner FROM table_name_94 WHERE score_in_final = "6–1, 6–2" |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | count the number of patients whose language is cape and admission location is phys referral/normal deli? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "CAPE" AND demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" |
CREATE TABLE table_64018 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the average number of golds for teams with 1 bronze, less than 3 silver, and a total over 2? | SELECT AVG("Gold") FROM table_64018 WHERE "Bronze" = '1' AND "Total" > '2' AND "Silver" < '3' |
CREATE TABLE table_16341 (
"Model" text,
"RU" real,
"Max processors" text,
"Processor frequency" text,
"Max memory" text,
"Max disk capacity" text,
"GA Date" text
) | What ga date do the models with 1.0, 1.2, 1.4ghz processor frequencies have? | SELECT "GA Date" FROM table_16341 WHERE "Processor frequency" = '1.0, 1.2, 1.4GHz' |
CREATE TABLE table_29046 (
"Date" text,
"Time" text,
"Visiting team" text,
"Home team" text,
"Site" text,
"Broadcast" text,
"Result" text,
"Attendance" real
) | What was the result in the game broadcast on the Big East Network? | SELECT "Result" FROM table_29046 WHERE "Broadcast" = 'Big East Network' |
CREATE TABLE table_38173 (
"Tournament" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) | Which tournament had a 2009 result of 1R? | SELECT "Tournament" FROM table_38173 WHERE "2009" = '1r' |
CREATE TABLE table_203_521 (
id number,
"year" number,
"division" number,
"league" text,
"regular season" text,
"playoffs" text,
"open cup" text
) | what is the only year that did not qualify appears under the playoffs column ? | SELECT "year" FROM table_203_521 WHERE "playoffs" = 'did not qualify' |
CREATE TABLE table_7779 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Notes" text
) | What competition took place in a year later than 2009 with team notes? | SELECT "Competition" FROM table_7779 WHERE "Year" > '2009' AND "Notes" = 'team' |
CREATE TABLE table_name_64 (
race INTEGER,
flap VARCHAR,
podium VARCHAR,
pole VARCHAR
) | How many races had 4 podiums, 5 poles and more than 3 Flaps? | SELECT SUM(race) FROM table_name_64 WHERE podium = 4 AND pole = 5 AND flap > 3 |
CREATE TABLE table_74416 (
"Name" text,
"Country" text,
"Years" text,
"Games" real,
"Minutes" real,
"Conceded" real,
"Shutouts" real,
"Int. caps" real
) | What is the lowest overall amount of shutouts? | SELECT MIN("Shutouts") FROM table_74416 |
CREATE TABLE table_name_41 (
previous_conference VARCHAR,
school VARCHAR
) | The school of Portage was in what conference previous? | SELECT previous_conference FROM table_name_41 WHERE school = "portage" |
CREATE TABLE table_name_12 (
channel INTEGER,
aspect VARCHAR,
psip_short_name VARCHAR
) | Name the highest Channel with an Aspect of 4:3, and a PSIP Short Name of ibc-tv? | SELECT MAX(channel) FROM table_name_12 WHERE aspect = "4:3" AND psip_short_name = "ibc-tv" |
CREATE TABLE table_65125 (
"Player" text,
"Int'l Debut" text,
"Year" text,
"Cross Code Debut" text,
"Date" text,
"Position" text
) | What year did Coenraad Breytenbach have their Int'l Debut? | SELECT "Year" FROM table_65125 WHERE "Player" = 'coenraad breytenbach' |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostsWithDe... | Where did X rant the most?. | SELECT p.Id AS "post_link", LENGTH(p.Body) AS "length", p.Score AS "score" FROM Users AS u JOIN Posts AS p ON p.OwnerUserId = u.Id WHERE u.Id = '##UserId##' ORDER BY 'score', 'length' DESC |
CREATE TABLE table_38292 (
"Pos." real,
"Car #" real,
"Driver" text,
"Make" text,
"Team" text
) | How many Car numbers have a Driver of erik darnell, and a Pos smaller than 2? | SELECT COUNT("Car #") FROM table_38292 WHERE "Driver" = 'erik darnell' AND "Pos." < '2' |
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
)
CREATE TABLE Statements (
Statement_ID INTEGER,
Statement_Details VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Typ... | Show the number of accounts for different statement details in a bar chart, and could you show y-axis in ascending order? | SELECT Statement_Details, COUNT(Statement_Details) FROM Accounts AS T1 JOIN Statements AS T2 ON T1.Statement_ID = T2.Statement_ID GROUP BY Statement_Details ORDER BY COUNT(Statement_Details) |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,... | Where accepted answer does not have the highest score. | SELECT COUNT(P2.Id) AS "numquestions" FROM Posts AS P JOIN Posts AS P2 ON (P2.Id = P.ParentId) JOIN Posts AS P3 ON (P3.ParentId = P2.Id) WHERE P.Score > 1 AND P.PostTypeId = 2 AND P2.PostTypeId = 1 AND P3.PostTypeId = 2 AND P.Score > P3.Score AND P2.AcceptedAnswerId = P3.Id AND P2.CreationDate BETWEEN '2012-10-01' AND ... |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | Give the number of patients whose primary disease is overdose and died in or before year 2168. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "OVERDOSE" AND demographic.dod_year <= "2168.0" |
CREATE TABLE table_36553 (
"Year" real,
"Title" text,
"Format" text,
"Label" text,
"Catalogno" text,
"Remark" text
) | What catalogno was in 1971 and had a remark of #27 us? | SELECT "Catalogno" FROM table_36553 WHERE "Year" = '1971' AND "Remark" = '#27 us' |
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... | Comments that are 600 characters long. | SELECT c.Id AS "comment_link", u.Id AS "user_link" FROM Comments AS c JOIN Users AS u ON (u.Id = UserId) WHERE LENGTH(Text) = 600 |
CREATE TABLE table_26173063_2 (
× VARCHAR,
faisaly VARCHAR
) | what is x when faisaly is 0-0? | SELECT × FROM table_26173063_2 WHERE faisaly = "0-0" |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | what is the name of the intake that patient 19428 first had the previous day? | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT inputevents_cv.itemid 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 = 19428)) AND DATETIME(inputevents_cv.... |
CREATE TABLE table_24786958_2 (
attendance INTEGER,
game_site VARCHAR
) | How many people attended the game at Jahn-sportpark? | SELECT MIN(attendance) FROM table_24786958_2 WHERE game_site = "Jahn-Sportpark" |
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
)
... | provide the number of patients whose year of birth is less than 2182 and drug route is inhalation? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2182" AND prescriptions.route = "INHALATION" |
CREATE TABLE table_40464 (
"Rank by average" text,
"Place" text,
"Perfect 40s" text,
"Total" text,
"Number of dances" text,
"Season" text,
"Average" text
) | What was the place in season 8 with a rank by average at 139? | SELECT "Place" FROM table_40464 WHERE "Season" = '8' AND "Rank by average" = '139' |
CREATE TABLE table_19475 (
"Date Released" text,
"Polling institute" text,
"Socialist" text,
"Social Democratic" text,
"Peoples Party" text,
"Green-Communist" text,
"Left Bloc" text,
"Lead" text
) | When was there 8.9% Green-Communist? | SELECT "Date Released" FROM table_19475 WHERE "Green-Communist" = '8.9%' |
CREATE TABLE table_name_67 (
bob_dole VARCHAR,
george_hw_bush VARCHAR,
pat_robertson VARCHAR
) | When George H.W. Bush had 81%, and Pat Robertson had 9%, what did Bob Dole have? | SELECT bob_dole FROM table_name_67 WHERE george_hw_bush = "81%" AND pat_robertson = "9%" |
CREATE TABLE table_31873 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | I want the score for 30 april 1977 | SELECT "Score" FROM table_31873 WHERE "Date" = '30 april 1977' |
CREATE TABLE table_204_228 (
id number,
"year" number,
"title" text,
"credit" text,
"role" text,
"notes" text
) | which was released in 2011 , undefeated or freakonomics ? | SELECT "title" FROM table_204_228 WHERE "title" IN ('undefeated', 'freakonomics') AND "year" = 2011 |
CREATE TABLE table_name_11 (
team VARCHAR,
year VARCHAR,
versus VARCHAR
) | what team played against zimbabwe in 1999? | SELECT team FROM table_name_11 WHERE year = 1999 AND versus = "zimbabwe" |
CREATE TABLE table_43402 (
"Nation" text,
"Skip" text,
"Third" text,
"Second" text,
"Lead" text,
"Alternate" text,
"Club" text
) | What was the Skip for Germany? | SELECT "Skip" FROM table_43402 WHERE "Nation" = 'germany' |
CREATE TABLE table_7750 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the sum of Gold, when Total is less than 1? | SELECT SUM("Gold") FROM table_7750 WHERE "Total" < '1' |
CREATE TABLE table_69574 (
"Player" text,
"Country" text,
"Year(s) Won" text,
"Total" real,
"To par" text,
"Finish" text
) | What is the highest total with a t12 finish? | SELECT MAX("Total") FROM table_69574 WHERE "Finish" = 't12' |
CREATE TABLE table_12454 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Record" text,
"Attendance" real
) | What is the result week 1? | SELECT "Result" FROM table_12454 WHERE "Week" = '1' |
CREATE TABLE table_203_538 (
id number,
"flight" text,
"date" text,
"payload nickname" text,
"payload" text,
"orbit" text,
"result" text
) | what h ii flight took place last ? | SELECT "flight" FROM table_203_538 ORDER BY "date" DESC LIMIT 1 |
CREATE TABLE table_12887260_1 (
main_developer VARCHAR,
first_release VARCHAR,
console VARCHAR
) | Which main developer made their first release in 1991 and created the Mega Drive/Genesis console? | SELECT main_developer FROM table_12887260_1 WHERE first_release = 1991 AND console = "Mega Drive/Genesis" |
CREATE TABLE table_8055 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Falcons points" real,
"Opponents" real,
"Record" text
) | Who is the opponent with 16 points? | SELECT "Opponent" FROM table_8055 WHERE "Opponents" = '16' |
CREATE TABLE table_25724294_2 (
extra_points VARCHAR,
player VARCHAR
) | Jack Loell had how many extra points? | SELECT extra_points FROM table_25724294_2 WHERE player = "Jack Loell" |
CREATE TABLE table_17751942_4 (
final_losses VARCHAR,
Semi INTEGER,
team VARCHAR
) | What is the total number of semi-final losses for the Kitchener Rangers? | SELECT MAX(Semi) - final_losses FROM table_17751942_4 WHERE team = "Kitchener Rangers" |
CREATE TABLE table_1133844_4 (
senator VARCHAR,
state__linked_to_summaries_below_ VARCHAR
) | who won the senate seat in arkansas | SELECT senator FROM table_1133844_4 WHERE state__linked_to_summaries_below_ = "Arkansas" |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (... | give me the number of patients whose age is less than 41 and lab test fluid is pleural? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "41" AND lab.fluid = "Pleural" |
CREATE TABLE table_68437 (
"Season" real,
"Date" text,
"Location" text,
"Race" text,
"Place" text
) | What place result was the 1996 season at Lake Louise, Canada? | SELECT "Place" FROM table_68437 WHERE "Season" = '1996' AND "Location" = 'lake louise, canada' |
CREATE TABLE table_33869 (
"Rank" text,
"Player" text,
"Goals" text,
"Assists" text,
"Points" text,
"Years" text
) | What years had players who scored 36 goals? | SELECT "Years" FROM table_33869 WHERE "Goals" = '36' |
CREATE TABLE table_204_23 (
id number,
"#" number,
"wrestlers" text,
"reign" number,
"date" text,
"days held" number,
"location" text,
"event" text,
"notes" text
) | what is the total days held on # 1st ? | SELECT "days held" FROM table_204_23 WHERE "#" = 1 |
CREATE TABLE table_name_88 (
length VARCHAR,
track VARCHAR
) | What is the lengtho f track 16? | SELECT length FROM table_name_88 WHERE track = "16" |
CREATE TABLE table_62276 (
"Year" real,
"Award" text,
"Category" text,
"Nominee" text,
"Result" text
) | What is Category, when Result is 'Nominated', when Award is 'Drama Desk Award', and when Nominee is 'Nathan Lane'? | SELECT "Category" FROM table_62276 WHERE "Result" = 'nominated' AND "Award" = 'drama desk award' AND "Nominee" = 'nathan lane' |
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostLin... | Questions which are closed and favorited. | SELECT Id AS "post_link", FavoriteCount, Score, CreationDate FROM Posts WHERE (PostTypeId = 1) AND (NOT ClosedDate IS NULL) AND (FavoriteCount > 0) ORDER BY CreationDate DESC |
CREATE TABLE table_name_24 (
rank INTEGER,
gross VARCHAR
) | Which Rank is the lowest one that has a Gross of $54,215,416? | SELECT MIN(rank) FROM table_name_24 WHERE gross = "$54,215,416" |
CREATE TABLE table_204_123 (
id number,
"week" number,
"date" text,
"kickoff" text,
"opponent" text,
"results\nfinal score" text,
"results\nteam record" text,
"game site" text,
"attendance" number
) | which opponent had the lowest amount of points in one game ? | SELECT "opponent" FROM table_204_123 ORDER BY "results\nfinal score" LIMIT 1 |
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airlin... | give me the flights from PHOENIX to MILWAUKEE on wednesday | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MILWAUKEE' AND date_day.day_number = 23 AND date_day.month_number = 4 AND... |
CREATE TABLE table_23331 (
"District" real,
"Representative" text,
"Party" text,
"Residence" text,
"Counties represented" text,
"Term ends" real,
"First Elected" real
) | Name the district for newtown square | SELECT MIN("District") FROM table_23331 WHERE "Residence" = 'Newtown Square' |
CREATE TABLE table_name_59 (
win__percentage VARCHAR
) | WHat in 2005 has a Win % of 82.61? | SELECT 2005 FROM table_name_59 WHERE win__percentage = "82.61" |
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 varchar,
minor varchar,
internship varch... | Which courses are offered in the next 6 semesters ? | SELECT DISTINCT course.name, course.number, semester.semester, semester.year FROM course, course_offering, semester WHERE ((semester.semester = 'FA' AND semester.year = 2016) OR (semester.semester = 'FA' AND semester.year = 2017) OR (semester.semester = 'FA' AND semester.year = 2018) OR (semester.semester = 'WN' AND se... |
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE gsi (
c... | Which 2 or 3 lectures a week usually are there in 353 ? | SELECT DISTINCT course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday, semester.semester, semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND c... |
CREATE TABLE table_73674 (
"Club" text,
"Home city" text,
"Stadium" text,
"First season in the Serie A" real,
"First season in current spell" real,
"Last title" text
) | Name the last title for cuenca | SELECT "Last title" FROM table_73674 WHERE "Home city" = 'Cuenca' |
CREATE TABLE has_amenity (
dormid VARCHAR,
amenid VARCHAR
)
CREATE TABLE dorm_amenity (
amenid VARCHAR,
amenity_name VARCHAR
)
CREATE TABLE dorm (
dorm_name VARCHAR,
dormid VARCHAR
) | Find the name of dorms which have both TV Lounge and Study Room as amenities. | SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' INTERSECT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3... |
CREATE TABLE table_78228 (
"Peak" text,
"Height (m)" real,
"Prom. (m)" real,
"Class" text,
"Parent" text
) | What is the lowest height for Parent grasmoor when it has a Prom larger than 117? | SELECT MIN("Height (m)") FROM table_78228 WHERE "Parent" = 'grasmoor' AND "Prom. (m)" > '117' |
CREATE TABLE table_name_52 (
away_team VARCHAR,
home_team VARCHAR
) | When Collingwood was the home team who was the opposing away team? | SELECT away_team FROM table_name_52 WHERE home_team = "collingwood" |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_co... | what are the five most frequently prescribed drugs for patients who have a previous diagnosis of dmii neuro nt st uncntrl during the same hospital encounter, in 2104? | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id 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_... |
CREATE TABLE table_38815 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
) | What was the attendance for july 18? | SELECT COUNT("Attendance") FROM table_38815 WHERE "Date" = 'july 18' |
CREATE TABLE table_name_73 (
original_title VARCHAR,
director VARCHAR,
film_title_used_in_nomination VARCHAR
) | What is the Original Title, when Director is 'Ting Shan-Si', and when Film Title Used In Nomination is 'The 800 Heroes'? | SELECT original_title FROM table_name_73 WHERE director = "ting shan-si" AND film_title_used_in_nomination = "the 800 heroes" |
CREATE TABLE table_20400 (
"Player" text,
"Matches" real,
"Overs" text,
"Maidens" real,
"Runs" real,
"Wickets" real,
"Average" text,
"Economy" text,
"5w" real,
"10w" real,
"Best Bowling" text
) | What is the highest number of maidens when the bowling best was 1/13? | SELECT MAX("Maidens") FROM table_20400 WHERE "Best Bowling" = '1/13' |
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 te... | what is the number of male patients with drug code bag? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "M" AND prescriptions.formulary_drug_cd = "BAG" |
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE program (
program_id int,
name varchar,
... | Which of these classes can be taken as Other next semester ? | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program, program_course, semester WHERE course.course_id = course_offering.course_id AND program_course.category LIKE '%Other%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.program... |
CREATE TABLE table_40305 (
"Year" real,
"Award" text,
"Result" text,
"Category" text,
"Film" text
) | Who was awarded after 1947 in the category of, the best actor in a leading role? | SELECT "Award" FROM table_40305 WHERE "Year" > '1947' AND "Category" = 'best actor in a leading role' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.