table stringlengths 33 7.14k | question stringlengths 4 1.06k | output stringlengths 2 4.44k ⌀ |
|---|---|---|
CREATE TABLE table_11120 (
"Year" real,
"Tournament" text,
"Venue" text,
"Result" text,
"Extra" text
) | What year is the result 6th in munich, west germany? | SELECT SUM("Year") FROM table_11120 WHERE "Result" = '6th' AND "Venue" = 'munich, west germany' |
CREATE TABLE table_73836 (
"Player" text,
"Touchdowns" real,
"Extra points" real,
"Field goals" real,
"Points" real
) | Name the points for donald boor | SELECT "Points" FROM table_73836 WHERE "Player" = 'Donald Boor' |
CREATE TABLE table_11027 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | What venue will hold the 2013 Concacaf Gold Cup competition? | SELECT "Venue" FROM table_11027 WHERE "Competition" = '2013 concacaf gold cup' |
CREATE TABLE table_29743928_3 (
name VARCHAR,
country VARCHAR
) | What are the names of players from the dr congo? | SELECT name FROM table_29743928_3 WHERE country = "DR Congo" |
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... | what is the number of patients whose ethnicity is black/haitian and lab test name is plasma cells? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "BLACK/HAITIAN" AND lab.label = "Plasma Cells" |
CREATE TABLE table_1855841_1 (
running_with__in_team_ VARCHAR,
candidate VARCHAR
) | Name the running with for elizabeth falco | SELECT running_with__in_team_ FROM table_1855841_1 WHERE candidate = "Elizabeth Falco" |
CREATE TABLE table_71443 (
"Election" text,
"1st Member" text,
"1st Party" text,
"2nd Member" text,
"2nd Party" text
) | What is the 2nd party in the 1874 election? | SELECT "2nd Party" FROM table_71443 WHERE "Election" = '1874' |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
... | Highest rep without ever voting. | SELECT Id AS "user_link", * FROM Users WHERE UpVotes = 0 AND DownVotes = 0 ORDER BY Reputation DESC, Id LIMIT 110 |
CREATE TABLE table_name_70 (
pick VARCHAR,
college VARCHAR
) | What is the pick of wiley college? | SELECT pick FROM table_name_70 WHERE college = "wiley" |
CREATE TABLE table_7522 (
"Event" text,
"2006\u201307" text,
"2007\u201308" text,
"2008\u201309" text,
"2010\u201311" text
) | Which 2007 08 event has 2008 09 of dnp and an Event of players'? | SELECT "2007\u201308" FROM table_7522 WHERE "2008\u201309" = 'dnp' AND "Event" = 'players' |
CREATE TABLE station (
id int,
network_name text,
services text,
local_authority text
)
CREATE TABLE train (
id int,
train_number int,
name text,
origin text,
destination text,
time text,
interval text
)
CREATE TABLE weekly_weather (
station_id int,
day_of_week text... | Group by the local authorities and count the number of local authorities, and then group by services, order in ascending by the y-axis. | SELECT services, COUNT(services) FROM station GROUP BY local_authority, services ORDER BY COUNT(services) |
CREATE TABLE table_45718 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | Which Week has a Result of w 20-13? | SELECT AVG("Week") FROM table_45718 WHERE "Result" = 'w 20-13' |
CREATE TABLE table_43311 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) | What is the Event with a Time that is 3:06? | SELECT "Event" FROM table_43311 WHERE "Time" = '3:06' |
CREATE TABLE table_12001616_4 (
status VARCHAR,
entrant VARCHAR
) | What is the status of joe gibbs racing? | SELECT status FROM table_12001616_4 WHERE entrant = "Joe Gibbs Racing" |
CREATE TABLE table_24304 (
"Census division" text,
"Area (km\u00b2)" text,
"Pop. (2011)" real,
"Pop. (2006)" real,
"Pop. (2001)" real,
"Pop. (1996)" real
) | How many people lived in the census division spread out on 9909.31 km2 in 1996? | SELECT "Pop. (1996)" FROM table_24304 WHERE "Area (km\u00b2)" = '9909.31' |
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... | a year before was patient 007-10135 prescribed glucagon (human recombinant) 1 mg/ml solution for injection? | SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-10135')) AND medication.drugname = 'glucagon (human recombinant) 1 mg/... |
CREATE TABLE table_name_10 (
team VARCHAR,
grid VARCHAR
) | What is the team with grid 9? | SELECT team FROM table_name_10 WHERE grid = 9 |
CREATE TABLE table_32910 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | When an away team scored 11.17 (83), at which venue were they playing? | SELECT "Venue" FROM table_32910 WHERE "Away team score" = '11.17 (83)' |
CREATE TABLE table_204_835 (
id number,
"rank" number,
"lane" number,
"name" text,
"nationality" text,
"time" text,
"notes" text
) | how long did it take ryosuke irie to finish ? | SELECT "time" FROM table_204_835 WHERE "name" = 'ryosuke irie' |
CREATE TABLE table_29545 (
"District" text,
"Incumbent" text,
"Party" text,
"Elected" real,
"Status" text,
"Result" text
) | What was the result of the election with incumbent john lewis? | SELECT "Result" FROM table_29545 WHERE "Incumbent" = 'John Lewis' |
CREATE TABLE table_24028 (
"Ep." real,
"Season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Prod. Code" text
) | Name the title that aired for november 08, 1985 | SELECT "Title" FROM table_24028 WHERE "Original air date" = 'November 08, 1985' |
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TAB... | Get Users Who Accept Answers. | SELECT u.Id, SUM(CASE WHEN (q.AcceptedAnswerId = a.Id) THEN 1 END) AS number_accepted, COUNT(DISTINCT (q.Id)) AS total_number FROM Users AS u INNER JOIN Posts AS q ON (q.OwnerUserId = u.Id AND q.PostTypeId = 1 AND u.CreationDate > '2020-01-01') INNER JOIN Posts AS a ON (a.ParentId = q.Id) GROUP BY u.Id ORDER BY total_n... |
CREATE TABLE table_19515 (
"No." real,
"Station Code" text,
"Station" text,
"Arrival" text,
"Departure" text,
"Kilometers" real,
"Day" real
) | what is the arrival time for no. 14? | SELECT "Arrival" FROM table_19515 WHERE "No." = '14' |
CREATE TABLE table_name_6 (
manager VARCHAR,
year VARCHAR,
finish VARCHAR
) | who is the manager when the year is before 1994 and finish is 5th? | SELECT manager FROM table_name_6 WHERE year < 1994 AND finish = "5th" |
CREATE TABLE table_name_37 (
purse___us$__ VARCHAR,
track VARCHAR
) | What is the Purse in Sunland Park Track? | SELECT purse___us$__ FROM table_name_37 WHERE track = "sunland park" |
CREATE TABLE table_28898 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text,
"Candidates" text
) | What is the result when the candidates are alexander smyth (dr) 100% | SELECT "Result" FROM table_28898 WHERE "Candidates" = 'Alexander Smyth (DR) 100%' |
CREATE TABLE farm_competition (
Competition_ID int,
Year int,
Theme text,
Host_city_ID int,
Hosts text
)
CREATE TABLE city (
City_ID int,
Official_Name text,
Status text,
Area_km_2 real,
Population real,
Census_Ranking text
)
CREATE TABLE farm (
Farm_ID int,
Year in... | Show how many competitions are held in each year with a line chart, and could you order by the x-axis in asc? | SELECT Year, COUNT(Year) FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID ORDER BY Year |
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes nu... | Find the # Questions that contain either tag python or javascript per month in 2019 Jan and Feb. | SELECT COUNT(Id) FROM Posts WHERE (PostTypeId = 1 AND (Tags LIKE '%java%')) AND CreationDate < '2019-3-10' |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_nam... | count the number of times that during the last year patient 24547 received a insert endotracheal tube procedure. | SELECT COUNT(*) FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'insert endotracheal tube') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 24547) AND DATETIME(proced... |
CREATE TABLE table_name_33 (
goals INTEGER,
apps INTEGER
) | When the Apps were smaller than 22, what's the lowest amount of goals scored in a game? | SELECT MIN(goals) FROM table_name_33 WHERE apps < 22 |
CREATE TABLE table_203_687 (
id number,
"#" number,
"title" text,
"time" text,
"performer(s)" text,
"songwriters" text,
"producer(s)" text,
"samples and notes" text
) | which track is longer ? ny weather report or country cousins ? | SELECT "title" FROM table_203_687 WHERE "title" IN ('"ny weather report"', '"country cousins"') ORDER BY "time" DESC LIMIT 1 |
CREATE TABLE actor (
Actor_ID int,
Name text,
Musical_ID int,
Character text,
Duration text,
age int
)
CREATE TABLE musical (
Musical_ID int,
Name text,
Year int,
Award text,
Category text,
Nominee text,
Result text
) | Give me a histogram for how many musicals has each nominee been nominated for?, and display from low to high by the x axis. | SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee ORDER BY Nominee |
CREATE TABLE table_19096 (
"Call sign" text,
"Analog channel" text,
"Digital channel" text,
"Virtual channel" text,
"Network" text,
"Station Ownership" text
) | Who owns the station on channel 33.3? | SELECT "Station Ownership" FROM table_19096 WHERE "Virtual channel" = '33.3' |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE cost (
row_id number,
... | what are the ways to consume oxycodone? | SELECT DISTINCT prescriptions.route FROM prescriptions WHERE prescriptions.drug = 'oxycodone' |
CREATE TABLE table_name_56 (
launched VARCHAR,
spacecraft VARCHAR,
time_elapsed VARCHAR
) | What Launched has both a Spacecraft of Ulysses and 491 days (1 yr, 4 mo, 3 d) as Time elapsed? | SELECT launched FROM table_name_56 WHERE spacecraft = "ulysses" AND time_elapsed = "491 days (1 yr, 4 mo, 3 d)" |
CREATE TABLE table_49955 (
"Season" real,
"Date" text,
"Home team" text,
"Score" text,
"Away team" text,
"Venue" text,
"Competition round" text
) | What is the score of the copa libertadores group 3 competition round on 2 February 1994? | SELECT "Score" FROM table_49955 WHERE "Competition round" = 'copa libertadores group 3' AND "Date" = '2 february 1994' |
CREATE TABLE table_25058269_1 (
runner_up VARCHAR,
season VARCHAR
) | In season 2007 08 who is the runner-up? | SELECT runner_up FROM table_25058269_1 WHERE season = "2007–08" |
CREATE TABLE table_11960610_10 (
date VARCHAR,
high_points VARCHAR
) | What is the date deng (20) had high points? | SELECT date FROM table_11960610_10 WHERE high_points = "Deng (20)" |
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNot... | Finding the total upvotes for a specific user. | SELECT DisplayName, UpVotes FROM Users WHERE Users.Id = 22656 |
CREATE TABLE table_name_77 (
crowd INTEGER,
home_team VARCHAR
) | What was the average crowd size for the game when the Gold Coast Blaze was the home team? | SELECT AVG(crowd) FROM table_name_77 WHERE home_team = "gold coast blaze" |
CREATE TABLE table_75577 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Venue" text,
"Attendance" real
) | What is the lowest week number where they played against the Detroit Lions? | SELECT MIN("Week") FROM table_75577 WHERE "Opponent" = 'detroit lions' |
CREATE TABLE table_74345 (
"Pick #" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | What is the nationality of the draft pick player who plays centre position and is going to Calgary Flames? | SELECT "Nationality" FROM table_74345 WHERE "Position" = 'Centre' AND "NHL team" = 'Calgary Flames' |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time... | show me the top five most common diagnoses for patients with the age of 30s since 5 years ago? | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t1.icd9_code FROM (SELECT diagnoses_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN... |
CREATE TABLE table_name_82 (
nationality VARCHAR,
position VARCHAR
) | What is the nationality of the person who played small forward? | SELECT nationality FROM table_name_82 WHERE position = "small forward" |
CREATE TABLE table_name_67 (
grid INTEGER,
name VARCHAR,
points VARCHAR
) | What is the lowest grid that Paul Tracy had when he had over 4 points? | SELECT MIN(grid) FROM table_name_67 WHERE name = "paul tracy" AND points > 4 |
CREATE TABLE table_17356205_1 (
title VARCHAR,
directed_by VARCHAR
) | How many titles are given for the episode directed by Joanna Kerns? | SELECT COUNT(title) FROM table_17356205_1 WHERE directed_by = "Joanna Kerns" |
CREATE TABLE table_67448 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | What was average attendance during week 15? | SELECT AVG("Attendance") FROM table_67448 WHERE "Week" = '15' |
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 minimum age of female patients who are single ? | SELECT MIN(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.gender = "F" |
CREATE TABLE table_8243 (
"Team" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Overall" real
) | what is the average bronze when the team is northwest territories and gold is more than 34? | SELECT AVG("Bronze") FROM table_8243 WHERE "Team" = 'northwest territories' AND "Gold" > '34' |
CREATE TABLE field (
fieldid int
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE T... | semantic parsing 2016 papers | SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'semantic parsing' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year = 2016 |
CREATE TABLE table_3669 (
"#" real,
"Title" text,
"Timeslot" text,
"Air date" text,
"Viewers (000s)" real,
"Weekly Rank Sky1" real,
"Weekly Rank Virgin Media" real
) | A what time was the title aired in October 22, 2009 | SELECT "Timeslot" FROM table_3669 WHERE "Air date" = 'October 22, 2009' |
CREATE TABLE table_14342210_14 (
field_goals__5_points_ INTEGER,
total_points VARCHAR
) | How many field goals were made by the person with 100 points in total? | SELECT MAX(field_goals__5_points_) FROM table_14342210_14 WHERE total_points = 100 |
CREATE TABLE table_name_6 (
race_2 VARCHAR,
race_1 VARCHAR
) | What is Race 2, when Race 1 is 30? | SELECT race_2 FROM table_name_6 WHERE race_1 = "30" |
CREATE TABLE table_14098_1 (
area__km²___per_sqmi_ VARCHAR,
country_or_territory_with_flag VARCHAR
) | What unit of measurement for uruguay? | SELECT area__km²___per_sqmi_ FROM table_14098_1 WHERE country_or_territory_with_flag = "Uruguay" |
CREATE TABLE table_9915 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | Who is the player with a t10 place, from the United States, and has a score of 69-70-76=215? | SELECT "Player" FROM table_9915 WHERE "Place" = 't10' AND "Country" = 'united states' AND "Score" = '69-70-76=215' |
CREATE TABLE table_10075 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" real
) | What is the country with a 70-74-69=213 score? | SELECT "Country" FROM table_10075 WHERE "Score" = '70-74-69=213' |
CREATE TABLE table_13732 (
"Date" text,
"Ship" text,
"Nationality" text,
"Tonnage" real,
"Fate" text
) | What is the highest tonnage for a ship from Great Britain named Newton Ash? | SELECT MAX("Tonnage") FROM table_13732 WHERE "Nationality" = 'great britain' AND "Ship" = 'newton ash' |
CREATE TABLE table_65914 (
"Hampden FL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | What is the highest number of wins when draws are larger than 1, and byes are larger than 0? | SELECT MAX("Wins") FROM table_65914 WHERE "Draws" > '1' AND "Byes" > '0' |
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
sc... | Out of all the upper level classes , which ones don 't require 538 ? | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite, program_course WHERE NOT COURSE_1.course_id IN (SELECT course_prerequisite.pre_course_id FROM course AS COURSE_0, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.cours... |
CREATE TABLE table_282413_3 (
ethnic_group VARCHAR
) | What is the highest 2001 population when the ethnic group is white: british? | SELECT MAX(2001 AS _population) FROM table_282413_3 WHERE ethnic_group = "White: British" |
CREATE TABLE dorm_amenity (
amenid number,
amenity_name text
)
CREATE TABLE lives_in (
stuid number,
dormid number,
room_number number
)
CREATE TABLE dorm (
dormid number,
dorm_name text,
student_capacity number,
gender text
)
CREATE TABLE has_amenity (
dormid number,
amen... | What is the average age of students who are living in the dorm with the largest capacity? | SELECT 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 WHERE T3.student_capacity = (SELECT MAX(student_capacity) FROM dorm) |
CREATE TABLE table_1341472_40 (
first_elected INTEGER,
result VARCHAR
) | What is the earliest year where the result of the election was a retired republican hold? | SELECT MIN(first_elected) FROM table_1341472_40 WHERE result = "Retired Republican hold" |
CREATE TABLE table_17796 (
"Year" real,
"Road Opened" text,
"Road Closed" text,
"Freight Carried s Tonne" real,
"Super B Capacity Reached [ citation needed ]" text,
"Number of Truck Loads North" real
) | What is thea year the road closed April 13? | SELECT MAX("Year") FROM table_17796 WHERE "Road Closed" = 'April 13' |
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
star... | Which courses does Prof. Shelly Alilunas teach in addition to 672 ? | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.number <> 672 AND instructor.name LIKE '%Shelly Alilunas%' AND offering_instructor.instructor_id = instructor.instructor_id AND offeri... |
CREATE TABLE table_1914090_2 (
europe INTEGER,
australia VARCHAR
) | What is the most members Europe had when Australia had 94615? | SELECT MAX(europe) FROM table_1914090_2 WHERE australia = 94615 |
CREATE TABLE table_name_29 (
finish VARCHAR,
year VARCHAR
) | What place did Jimmy Reece finish in 1957? | SELECT finish FROM table_name_29 WHERE year = "1957" |
CREATE TABLE table_51564 (
"Country" text,
"Date" text,
"Label" text,
"Format" text,
"Catalogue #" text
) | What is the date with the catalogue # cocy-80093? | SELECT "Date" FROM table_51564 WHERE "Catalogue #" = 'cocy-80093' |
CREATE TABLE table_name_46 (
wkts INTEGER,
ovrs VARCHAR,
econ VARCHAR
) | what is the sum of the wkts when the ovrs were bigger than 2 and econ was bigger than 7.84? | SELECT SUM(wkts) FROM table_name_46 WHERE ovrs > 2 AND econ > 7.84 |
CREATE TABLE table_train_251 (
"id" int,
"gender" string,
"left_ventricular_ejection_fraction_lvef" int,
"allergy_to_rabbit_proteins" bool,
"recurring_alcohol_related_legal_problem" bool,
"hyperlipidemia" bool,
"fasting_ldl_cholesterol" int,
"baseline_hemoglobin_hgb" float,
"NOUSE" f... | hyperlipidemia ( fasting ldl cholesterol > 139 mg / dl | SELECT * FROM table_train_251 WHERE hyperlipidemia = 1 OR fasting_ldl_cholesterol > 139 |
CREATE TABLE table_26914854_3 (
incoming_manager VARCHAR,
date_of_appointment VARCHAR
) | Who is the incoming manager when the date of appointment is 9 march 2011? | SELECT incoming_manager FROM table_26914854_3 WHERE date_of_appointment = "9 March 2011" |
CREATE TABLE table_name_79 (
manufacturer VARCHAR,
time_retired VARCHAR
) | Who was the manufacter of the car with a time/retired of +0.122? | SELECT manufacturer FROM table_name_79 WHERE time_retired = "+0.122" |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_lo... | what flights from CINCINNATI to TAMPA | 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 = 'CINCINNATI' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'TAM... |
CREATE TABLE Person (
name varchar(20),
age INTEGER,
city TEXT,
gender TEXT,
job TEXT
)
CREATE TABLE PersonFriend (
name varchar(20),
friend varchar(20),
year INTEGER
) | Draw a bar chart for what is the average age for each gender?, I want to sort by the Y from high to low. | SELECT gender, AVG(age) FROM Person GROUP BY gender ORDER BY AVG(age) DESC |
CREATE TABLE Aircraft (
name VARCHAR,
distance INTEGER
) | Show names for all aircrafts with distances more than the average. | SELECT name FROM Aircraft WHERE distance > (SELECT AVG(distance) FROM Aircraft) |
CREATE TABLE table_1507431_1 (
date VARCHAR,
tournament VARCHAR
) | The tournament Buick Classic occured on what dates? | SELECT date FROM table_1507431_1 WHERE tournament = "Buick Classic" |
CREATE TABLE table_44877 (
"Name" text,
"Team" text,
"Qual 1" text,
"Qual 2" text,
"Best" text
) | What is Ryan Hunter-Reay of the Herdez Competition's Qual 2 time? | SELECT "Qual 2" FROM table_44877 WHERE "Team" = 'herdez competition' AND "Name" = 'ryan hunter-reay' |
CREATE TABLE table_19313 (
"Model" text,
"Year" text,
"Die Size (mm 2 ) [1]" text,
"Config core [2]" text,
"MTriangles/s [1]" real,
"MPixel/s [1]" real,
"Bus width ( bit )" text,
"DirectX" text,
"OpenGL" text,
"OpenGL ES" text,
"GFLOPS(@ 200MHz)" text,
"Frequency" real
) | Which version of opengl is used by model sgx520? | SELECT "OpenGL ES" FROM table_19313 WHERE "Model" = 'SGX520' |
CREATE TABLE table_name_54 (
result VARCHAR,
venue VARCHAR,
date VARCHAR
) | Which Result has a Venue of home, and a Date of 3 october 1987? | SELECT result FROM table_name_54 WHERE venue = "home" AND date = "3 october 1987" |
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 diagnosed with unspecified encephalopathy who had spinal tap lab test. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE diagnoses.long_title = "Encephalopathy, unspecified" AND procedures.short_title = "Spinal tap" |
CREATE TABLE table_24172157_3 (
date_of_appointment VARCHAR,
team VARCHAR,
incoming_manager VARCHAR
) | What was the date of appointment for incoming manager Roy Hodgson and the team is Liverpool? | SELECT date_of_appointment FROM table_24172157_3 WHERE team = "Liverpool" AND incoming_manager = "Roy Hodgson" |
CREATE TABLE table_60844 (
"Rank" real,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | Which Rank has a Gold larger than 1, and a Bronze of 4, and a Silver smaller than 1? | SELECT MAX("Rank") FROM table_60844 WHERE "Gold" > '1' AND "Bronze" = '4' AND "Silver" < '1' |
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE offering_instructor (
offering_ins... | What are the prerequisites for me before enrolling in ITALIAN 399 ? | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT... |
CREATE TABLE table_12134383_1 (
date_of_birth VARCHAR,
end_of_term VARCHAR
) | what's the date of birth with end of term being 2april1969 | SELECT date_of_birth FROM table_12134383_1 WHERE end_of_term = "2April1969" |
CREATE TABLE table_name_72 (
matches VARCHAR,
year VARCHAR
) | What is Matches, when Year is '2003'? | SELECT matches FROM table_name_72 WHERE year = "2003" |
CREATE TABLE table_55327 (
"Driver" text,
"Entrant" text,
"Constructor" text,
"Chassis" text,
"Engine" text,
"Tyre" text
) | Which engine has the entrant scuderia ferrari and is driven by Raymond Sommer? | SELECT "Engine" FROM table_55327 WHERE "Entrant" = 'scuderia ferrari' AND "Driver" = 'raymond sommer' |
CREATE TABLE review (
a_id number,
u_id number,
i_id number,
rating number,
rank number
)
CREATE TABLE item (
i_id number,
title text
)
CREATE TABLE useracct (
u_id number,
name text
)
CREATE TABLE trust (
source_u_id number,
target_u_id number,
trust number
) | How many different items were reviewed by some users? | SELECT COUNT(DISTINCT i_id) FROM review |
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,
formulary_drug_cd text,
... | provide the number of patients whose diagnoses icd9 code is 4659 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.icd9_code = "4659" AND prescriptions.drug_type = "ADDITIVE" |
CREATE TABLE table_name_88 (
byes INTEGER,
draws VARCHAR,
losses VARCHAR,
wins VARCHAR
) | Which byes are high when losses are larger than 7, wins smaller than 6, and draws are smaller than 0? | SELECT MAX(byes) FROM table_name_88 WHERE losses > 7 AND wins < 6 AND draws < 0 |
CREATE TABLE table_17466 (
"Pick #" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | What position does Jim Johnston play? | SELECT "Position" FROM table_17466 WHERE "Player" = 'Jim Johnston' |
CREATE TABLE table_38090 (
"7:00" text,
"7:30" text,
"8:00" text,
"8:30" text,
"9:00" text,
"9:30" text,
"10:00" text,
"10:30" text
) | What is the 7:30 feature with an 8:30 feature Melrose Place? | SELECT "7:30" FROM table_38090 WHERE "8:30" = 'melrose place' |
CREATE TABLE table_name_98 (
year VARCHAR,
nominated_work_title VARCHAR,
organisation VARCHAR,
result VARCHAR
) | what is the year when then organisation is star awards, the result is won and the nominated work title is n/a? | SELECT year FROM table_name_98 WHERE organisation = "star awards" AND result = "won" AND nominated_work_title = "n/a" |
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConce... | Number of posts with 'API' in their title. | SELECT COUNT(DISTINCT Id) FROM Posts AS p WHERE p.PostTypeId = 1 AND Title LIKE '% API %' |
CREATE TABLE table_256286_45 (
_percentage_yes VARCHAR,
no_votes VARCHAR
) | What was the percentage of yes votes for the measure where the no votes number 199174? | SELECT _percentage_yes FROM table_256286_45 WHERE no_votes = 199174 |
CREATE TABLE table_11744 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) | What is the result for pfc: put up or shut up? | SELECT "Res." FROM table_11744 WHERE "Event" = 'pfc: put up or shut up' |
CREATE TABLE table_65564 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
) | What is the Runner(s)-up of the Kemper Open Tournament? | SELECT "Runner(s)-up" FROM table_65564 WHERE "Tournament" = 'kemper open' |
CREATE TABLE table_name_94 (
transfer_fee VARCHAR,
type VARCHAR,
name VARCHAR
) | What is the transfer fee for Gravgaard? | SELECT transfer_fee FROM table_name_94 WHERE type = "transfer" AND name = "gravgaard" |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtim... | did patient 013-38992 have an allergic reaction to anything in 2105? | SELECT COUNT(*) > 0 FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-38992')) AND STRFTIME('%y', allergy.allergytime) = '2105' |
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... | what is drug type and drug route of drug name diazepam? | SELECT prescriptions.drug_type, prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Diazepam" |
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,
LastEditorDispl... | Answers with 'just a link' comment. | SELECT c.Id AS "comment_link", c.PostId AS "post_link", LENGTH(Body), p.Body FROM Comments AS c, Posts AS p WHERE (Text LIKE '%just a link%' OR Text LIKE '%hile this link%') AND c.PostId = p.Id ORDER BY LENGTH(p.Body) |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wa... | how many patients until 4 years ago were staying at ward 1104? | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.wardid = 1104 AND DATETIME(patient.unitadmittime) <= DATETIME(CURRENT_TIME(), '-4 year') |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.