table stringlengths 33 7.14k | question stringlengths 4 1.06k | output stringlengths 2 4.44k ⌀ |
|---|---|---|
CREATE TABLE table_name_53 (
react INTEGER,
mark INTEGER
) | What is the average React, when Mark is less than 7.93? | SELECT AVG(react) FROM table_name_53 WHERE mark < 7.93 |
CREATE TABLE table_4209 (
"Player" text,
"Starts" real,
"Cuts made" real,
"Best finish" text,
"Money list rank" text,
"Earnings ($)" real
) | What was the best finish for 206 on the money list? | SELECT "Best finish" FROM table_4209 WHERE "Money list rank" = '206' |
CREATE TABLE table_name_73 (
crowd INTEGER,
venue VARCHAR
) | Who was the team with the smallest crowd at the Princes Park venue? | SELECT MIN(crowd) FROM table_name_73 WHERE venue = "princes park" |
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varc... | i'd like to know what flights UA has from DALLAS to SAN FRANCISCO | 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 = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = ... |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE medication (
medicatio... | had patient 021-114154 had any allergies until 56 months ago? | 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 = '021-114154')) AND DATETIME(allergy.allergytime) <= DATETIME(CURRENT_TIME(), '-56... |
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 prescriptions (
... | what is the minimum total cost of a hospital that includes laboratory testing for c-reactive protein since 2102? | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'c-reactive protein')) AND STRFTIME('%y', cost.chargetime) >= '2102' GROUP BY cost.hadm_id) AS t1 |
CREATE TABLE table_69446 (
"Date" text,
"Course" text,
"Distance" text,
"Type" text,
"Winner" text
) | What type is the race with the vicenza to marostica course? | SELECT "Type" FROM table_69446 WHERE "Course" = 'vicenza to marostica' |
CREATE TABLE table_16654785_2 (
average_climb___percentage_ INTEGER,
name VARCHAR
) | What is the average climb for Tenbosse? | SELECT MIN(average_climb___percentage_) FROM table_16654785_2 WHERE name = "Tenbosse" |
CREATE TABLE table_name_94 (
tied INTEGER,
points VARCHAR,
games VARCHAR,
goals_for VARCHAR
) | Name the least tied with games more than 70 and goals for less than 310 with points of 98 | SELECT MIN(tied) FROM table_name_94 WHERE games > 70 AND goals_for < 310 AND points = 98 |
CREATE TABLE table_10577579_3 (
left VARCHAR,
women’s_nickname VARCHAR
) | Name the left of the Lady Pilots. | SELECT left FROM table_10577579_3 WHERE women’s_nickname = "Lady Pilots" |
CREATE TABLE table_name_22 (
season INTEGER,
position VARCHAR
) | What is the most recent year with a finish in 2nd position? | SELECT MAX(season) FROM table_name_22 WHERE position = "2nd" |
CREATE TABLE table_21089 (
"Name" text,
"Latitude" text,
"Longitude" text,
"Diameter (km)" text,
"Year named" real,
"Name origin" text
) | Name the latitude of laima tessera | SELECT "Latitude" FROM table_21089 WHERE "Name" = 'Laima Tessera' |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and code , and group by attribute founder, and order by the Code in desc. | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name ORDER BY T1.Code DESC |
CREATE TABLE exhibition_record (
Exhibition_ID int,
Date text,
Attendance int
)
CREATE TABLE exhibition (
Exhibition_ID int,
Year int,
Theme text,
Artist_ID int,
Ticket_Price real
)
CREATE TABLE artist (
Artist_ID int,
Name text,
Country text,
Year_Join int,
Age int... | What is the number of countries in the artist table?, I want to order by the bars in asc. | SELECT Country, COUNT(Country) FROM artist GROUP BY Country ORDER BY Country |
CREATE TABLE table_49394 (
"Class" text,
"Part 1" text,
"Part 2" text,
"Part 3" text,
"Part 4" text
) | What was part 4 when part 3 was *hleupun? | SELECT "Part 4" FROM table_49394 WHERE "Part 3" = '*hleupun' |
CREATE TABLE table_57288 (
"Round" real,
"Player" text,
"Position" text,
"Nationality" text,
"College/Junior/Club Team (League)" text
) | Tell me the college for carl hagelin | SELECT "College/Junior/Club Team (League)" FROM table_57288 WHERE "Player" = 'carl hagelin' |
CREATE TABLE table_12576536_1 (
population__maryborough_ VARCHAR,
population__woocoo_ VARCHAR
) | Name the population of maryborough when population of woocoo is 2700 | SELECT population__maryborough_ FROM table_12576536_1 WHERE population__woocoo_ = 2700 |
CREATE TABLE table_name_12 (
top_5 INTEGER,
events INTEGER
) | With events less than 0, what is the fewest Top-5? | SELECT MIN(top_5) FROM table_name_12 WHERE events < 0 |
CREATE TABLE table_58743 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Results" text
) | What is Incumbent, when Results is 'Re-Elected', when Party is 'Democratic', and when District is 'Minnesota 7'? | SELECT "Incumbent" FROM table_58743 WHERE "Results" = 're-elected' AND "Party" = 'democratic' AND "District" = 'minnesota 7' |
CREATE TABLE table_name_33 (
week VARCHAR,
date VARCHAR
) | What week has December 19, 2004 as the date? | SELECT week FROM table_name_33 WHERE date = "december 19, 2004" |
CREATE TABLE schedule (
Cinema_ID int,
Film_ID int,
Date text,
Show_times_per_day int,
Price float
)
CREATE TABLE cinema (
Cinema_ID int,
Name text,
Openning_year int,
Capacity int,
Location text
)
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_seaso... | Create a bar chart showing capacity across name | SELECT Name, Capacity FROM cinema |
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE voting_record (
stuid number,
registration_date text,
election_cycle text,
president_vote number,
vice_president_vote number... | Who served as an advisor for students who have treasurer votes in the spring election cycle? | SELECT DISTINCT T1.advisor FROM student AS T1 JOIN voting_record AS T2 ON T1.stuid = T2.treasurer_vote WHERE T2.election_cycle = "Spring" |
CREATE TABLE table_45058 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score" text
) | What was hayley ericksen's score? | SELECT "Score" FROM table_45058 WHERE "Partner" = 'hayley ericksen' |
CREATE TABLE table_name_77 (
venue VARCHAR,
competition VARCHAR
) | What is the venue of the 1990 Asian games? | SELECT venue FROM table_name_77 WHERE competition = "1990 asian games" |
CREATE TABLE table_203_671 (
id number,
"name" text,
"rank" text,
"age" number,
"years until mandatory retirement" text,
"appointed by" text,
"year appointed" number
) | how long did roberto feliberti cintron serve before retirement ? | SELECT "years until mandatory retirement" FROM table_203_671 WHERE "name" = 'roberto feliberti cintron' |
CREATE TABLE table_20630462_1 (
tier_iv_in VARCHAR,
tournament VARCHAR
) | What is the tier IV year for the tournament held in Tampa? | SELECT tier_iv_in FROM table_20630462_1 WHERE tournament = "Tampa" |
CREATE TABLE table_name_50 (
qual_1 VARCHAR,
best VARCHAR,
qual_2 VARCHAR
) | Which qualifying 1 time has a best under 58.669 and a qualifying 2 time under 57.897? | SELECT qual_1 FROM table_name_50 WHERE best < 58.669 AND qual_2 < 57.897 |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID ... | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, a line chart shows the trend of manager_id over hire_date . | SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 |
CREATE TABLE table_22801165_1 (
date VARCHAR,
cowboys_points VARCHAR
) | When did the Cowboys score 13 points in 1966? | SELECT date FROM table_22801165_1 WHERE cowboys_points = 13 |
CREATE TABLE table_24027047_1 (
population_density___km²_2011_ VARCHAR,
area__km²__2011 VARCHAR
) | What was the population density in km2 for 2011 in the division where area in km2 was 684.37 in 2011? | SELECT population_density___km²_2011_ FROM table_24027047_1 WHERE area__km²__2011 * * = "684.37" |
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 prescriptions (
subject_id text,
hadm_id... | what is the insurance of the patient name jerry deberry? | SELECT demographic.insurance FROM demographic WHERE demographic.name = "Jerry Deberry" |
CREATE TABLE table_8590 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | With the game that was less than 16 what was the high assists? | SELECT "High assists" FROM table_8590 WHERE "Game" < '16' |
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
Par... | Accepted non-self-answers without accept-vote, where question owner exists. | SELECT p.AcceptedAnswerId AS "post_link", p.OwnerUserId AS "user_link" FROM Posts AS p WHERE NOT p.OwnerUserId IS NULL AND p.AcceptedAnswerId NOT IN (SELECT v.PostId FROM Votes AS v WHERE v.VoteTypeId = 1) AND p.AcceptedAnswerId NOT IN (SELECT q.Id FROM Posts AS q WHERE q.OwnerUserId = p.OwnerUserId) ORDER BY p.Accepte... |
CREATE TABLE table_21321804_3 (
player VARCHAR,
cfl_team VARCHAR
) | Which player plays for the Winnipeg Blue Bombers? | SELECT player FROM table_21321804_3 WHERE cfl_team = "Winnipeg Blue Bombers" |
CREATE TABLE table_24856090_1 (
average INTEGER,
hk_viewers VARCHAR
) | What is the largest average for the episode with 1.97 million Hong Kong viewers? | SELECT MAX(average) FROM table_24856090_1 WHERE hk_viewers = "1.97 million" |
CREATE TABLE table_name_34 (
record VARCHAR,
loss VARCHAR
) | What was the record at the game that had a loss of Lemanczyk (0 1)? | SELECT record FROM table_name_34 WHERE loss = "lemanczyk (0–1)" |
CREATE TABLE table_35261 (
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | Nation of total has what sum of gold? | SELECT SUM("Gold") FROM table_35261 WHERE "Nation" = 'total' |
CREATE TABLE table_27940569_1 (
pts_bns VARCHAR,
driver VARCHAR
) | How many points and bonuses did Kurt Busch get? | SELECT pts_bns FROM table_27940569_1 WHERE driver = "Kurt Busch" |
CREATE TABLE table_name_61 (
natural_change__per_1000_ VARCHAR,
crude_death_rate__per_1000_ VARCHAR
) | what is the natural change (per 1000) when the crude death rate (per 1000) is 10? | SELECT natural_change__per_1000_ FROM table_name_61 WHERE crude_death_rate__per_1000_ = 10 |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE PostLinks (
Id number,
Crea... | Get Users by Location and Tag. | SELECT u.DisplayName, 'http://stackoverflow.com/users/' + CAST(u.Id AS TEXT(255)) AS "httplink", u.Reputation, COUNT(p.Title) AS "questions_answered" FROM Users AS u INNER JOIN Posts AS p ON p.OwnerUserId = u.Id INNER JOIN Posts AS ans ON p.Id = ans.ParentId INNER JOIN PostTags AS pt ON p.Id = pt.PostId INNER JOIN Tags... |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... | what is the number of patients whose age is less than 49 and diagnoses icd9 code is 29590? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "49" AND diagnoses.icd9_code = "29590" |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
va... | i mean how many hours has it been since the first time patient 15794 had a gastric meds intake on the current icu visit? | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', inputevents_cv.charttime)) 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 = 15794) AND icustays.outtime IS NULL)... |
CREATE TABLE gas_station (
Station_ID int,
Open_Year int,
Location text,
Manager_Name text,
Vice_Manager_Name text,
Representative_Name text
)
CREATE TABLE station_company (
Station_ID int,
Company_ID int,
Rank_of_the_Year int
)
CREATE TABLE company (
Company_ID int,
Rank i... | Bar chart of how many headquarters from each headquarters, order from high to low by the bars. | SELECT Headquarters, COUNT(Headquarters) FROM company GROUP BY Headquarters ORDER BY Headquarters DESC |
CREATE TABLE table_203_513 (
id number,
"no." number,
"date" text,
"home team" text,
"visiting team" text,
"goals" text,
"score" text,
"result" text,
"venue" text,
"competition" text
) | what was the name of the first competition according to this chart ? | SELECT "competition" FROM table_203_513 WHERE id = 1 |
CREATE TABLE table_13836704_7 (
international_passengers VARCHAR,
rank VARCHAR
) | What is the total number of passengers of the airport ranked 15? | SELECT international_passengers FROM table_13836704_7 WHERE rank = 15 |
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE instructor (
instructor_id int,
... | What is the possibility of being able to take ACC 990 in Winter of 2014 ? | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'ACC' AND course.number = 990 AND semester.semester = 'Winter' AND semester.semester_id = course_offering.semester AND semester.year = 2014 |
CREATE TABLE table_204_961 (
id number,
"title" text,
"director" text,
"production" text,
"music" text,
"cast" text,
"release date" text
) | what film was released before devakanya ? | SELECT "title" FROM table_204_961 WHERE id = (SELECT id FROM table_204_961 WHERE "title" = 'devakanya') - 1 |
CREATE TABLE races (
raceId INTEGER,
year INTEGER,
round INTEGER,
circuitId INTEGER,
name TEXT,
date TEXT,
time TEXT,
url TEXT
)
CREATE TABLE driverStandings (
driverStandingsId INTEGER,
raceId INTEGER,
driverId INTEGER,
points REAL,
position INTEGER,
positionTex... | Show me a bar chart about the number of races held in each year after 2014, and order X-axis from high to low order please. | SELECT year, COUNT(year) FROM races AS T1 JOIN results AS T2 ON T1.raceId = T2.raceId WHERE T1.year > 2014 GROUP BY year ORDER BY year DESC |
CREATE TABLE table_name_68 (
result VARCHAR,
goal VARCHAR
) | What is the Result where Goal is 9? | SELECT result FROM table_name_68 WHERE goal = 9 |
CREATE TABLE table_name_50 (
h_a_n VARCHAR,
date VARCHAR
) | What is H/A/N, when Date is October 31? | SELECT h_a_n FROM table_name_50 WHERE date = "october 31" |
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE course (
course_id int,
name varchar,
dep... | When can I take EECS 574 ? | SELECT DISTINCT semester.semester, semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 574 AND course_offering.semester = semester.semester_id AND semester.semester_id > (SELECT SEMESTERalias1.semester_id FROM semeste... |
CREATE TABLE table_24682 (
"No" real,
"Driver" text,
"Entrant" text,
"Constructor" text,
"Chassis" text,
"Engine" text
) | The Maserati 4cl's minimum no was? | SELECT MIN("No") FROM table_24682 WHERE "Chassis" = 'Maserati 4CL' |
CREATE TABLE camera_lens (
focal_length_mm INTEGER
) | How many camera lenses have a focal length longer than 15 mm? | SELECT COUNT(*) FROM camera_lens WHERE focal_length_mm > 15 |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime t... | what was patient 030-42006's last intake time on 12/29/this year. | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-42006')) AND intakeoutput.cellpath LIKE '%intake%... |
CREATE TABLE table_name_55 (
performer_1 VARCHAR,
performer_2 VARCHAR
) | Performer 2 of compilation 1 had what performer 1? | SELECT performer_1 FROM table_name_55 WHERE performer_2 = "compilation 1" |
CREATE TABLE Sales (
sales_transaction_id INTEGER,
sales_details VARCHAR(255)
)
CREATE TABLE Transactions_Lots (
transaction_id INTEGER,
lot_id INTEGER
)
CREATE TABLE Transactions (
transaction_id INTEGER,
investor_id INTEGER,
transaction_type_code VARCHAR(10),
date_of_transaction DATE... | Give me a bar chart for how many date of transaction of each date of transaction, and display by the the number of date of transaction in ascending. | SELECT date_of_transaction, COUNT(date_of_transaction) FROM Transactions ORDER BY COUNT(date_of_transaction) |
CREATE TABLE table_45668 (
"Macedonian population in Vojvodina" text,
"1961" real,
"Number 1971" real,
"1981" real,
"1991" real,
"2002" real
) | What is the lowest 1971 number of the Macedonian population with a 2002 value greater than 133 and a 1991 value less than 171? | SELECT MIN("Number 1971") FROM table_45668 WHERE "2002" > '133' AND "1991" < '171' |
CREATE TABLE table_60981 (
"Date" text,
"Opponent#" text,
"Rank #" text,
"Site" text,
"Result" text,
"Attendance" text
) | WHAT DATE HAD 6 RANK? | SELECT "Date" FROM table_60981 WHERE "Rank #" = '6' |
CREATE TABLE table_name_75 (
torque VARCHAR,
model VARCHAR
) | What was the torque@rpm of the sl 65 amg? | SELECT torque AS @rpm FROM table_name_75 WHERE model = "sl 65 amg" |
CREATE TABLE table_25020 (
"Year" real,
"1st Venue" text,
"2nd Venue" text,
"3rd Venue" text,
"4th Venue" text,
"5th Venue" text
) | How many 5th venue cities were there when Doha was the 1st venue city? | SELECT COUNT("5th Venue") FROM table_25020 WHERE "1st Venue" = 'Doha' |
CREATE TABLE table_26533354_8 (
position VARCHAR,
player VARCHAR
) | Name the position for stanley havili | SELECT position FROM table_26533354_8 WHERE player = "Stanley Havili" |
CREATE TABLE table_36790 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the sum of silver values that have bronze values under 4, golds over 2, and a rank of 3? | SELECT SUM("Silver") FROM table_36790 WHERE "Bronze" < '4' AND "Rank" = '3' AND "Gold" > '2' |
CREATE TABLE table_16529 (
"Year" text,
"Champion" text,
"Score" text,
"Runner-Up" text,
"Location" text,
"Semi-Finalist #1" text,
"Semi-Finalist #2" text
) | who is the runner-up where location is ellenton, fl and year is 2004 | SELECT "Runner-Up" FROM table_16529 WHERE "Location" = 'Ellenton, FL' AND "Year" = '2004' |
CREATE TABLE table_48714 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location" text,
"Attendance" real,
"Record" text,
"Points" real
) | Which Game has an Attendance smaller than 18,277, and Points of 64? | SELECT MAX("Game") FROM table_48714 WHERE "Attendance" < '18,277' AND "Points" = '64' |
CREATE TABLE table_name_5 (
seats_2006 INTEGER,
parties_and_voter_communities VARCHAR,
_percentage_2006 VARCHAR
) | What is the highest number of Seats 2006 held by the communities of B rger F r Gro -Rohrheim Party/Voter Community, with a %2006 less than 21.3? | SELECT MAX(seats_2006) FROM table_name_5 WHERE parties_and_voter_communities = "bürger für groß-rohrheim" AND _percentage_2006 < 21.3 |
CREATE TABLE table_49584 (
"Nat." text,
"Name" text,
"Moving to" text,
"Type" text,
"Transfer window" text,
"Transfer fee" text,
"Source" text
) | What is the type of POR? | SELECT "Type" FROM table_49584 WHERE "Nat." = 'por' |
CREATE TABLE table_name_60 (
time_retired VARCHAR,
driver VARCHAR
) | What is the time/retired for alain prost? | SELECT time_retired FROM table_name_60 WHERE driver = "alain prost" |
CREATE TABLE table_30388 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score in the final" text
) | Who was Betty's partner when the surface is hard? | SELECT "Partner" FROM table_30388 WHERE "Surface" = 'Hard' |
CREATE TABLE table_name_60 (
pick INTEGER,
school VARCHAR
) | What is the highest pick for a player from auburn? | SELECT MAX(pick) FROM table_name_60 WHERE school = "auburn" |
CREATE TABLE table_8196 (
"Date" text,
"Home" text,
"Score" text,
"Away" text,
"Attendance" real
) | Who was the home team in the game with more than 1675, and Olimpia was the away side? | SELECT "Home" FROM table_8196 WHERE "Attendance" > '1675' AND "Away" = 'olimpia' |
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,
... | how many female patients were diagnosed with aortic valve insuffiency\aortic valve replacement /sda? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.diagnosis = "AORTIC VALVE INSUFFIENCY\AORTIC VALVE REPLACEMENT /SDA" |
CREATE TABLE table_15315816_1 (
winners_share__$_ VARCHAR,
year VARCHAR
) | How much are all winners share ($) in the year 2004? | SELECT winners_share__$_ FROM table_15315816_1 WHERE year = "2004" |
CREATE TABLE table_42213 (
"Volume:Issue" text,
"Issue Date(s)" text,
"Weeks on Top" real,
"Song" text,
"Artist" text
) | What is the sum of Weeks on Top for the Volume:Issue 34:9-12? | SELECT SUM("Weeks on Top") FROM table_42213 WHERE "Volume:Issue" = '34:9-12' |
CREATE TABLE table_7464 (
"Ep No" text,
"Prod Code" text,
"Original Air Date" text,
"Episode Title" text,
"Ratings" text
) | What was the title of the episode with a production code of 1gowo04? | SELECT "Episode Title" FROM table_7464 WHERE "Prod Code" = '1gowo04' |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_... | Draw a bar chart of last name versus department_id, and order in desc by the X please. | SELECT LAST_NAME, DEPARTMENT_ID FROM employees ORDER BY LAST_NAME DESC |
CREATE TABLE table_46019 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location" text,
"Record" text
) | What was the game number when record is 59-15? | SELECT MIN("Game") FROM table_46019 WHERE "Record" = '59-15' |
CREATE TABLE table_name_38 (
rank INTEGER,
country VARCHAR
) | What is Hungary's highest Rank? | SELECT MAX(rank) FROM table_name_38 WHERE country = "hungary" |
CREATE TABLE table_26198709_1 (
original_air_date VARCHAR,
us_viewers__million_ VARCHAR
) | How many air dates does the episode with 15.50 million viewers have? | SELECT COUNT(original_air_date) FROM table_26198709_1 WHERE us_viewers__million_ = "15.50" |
CREATE TABLE table_name_85 (
high_points VARCHAR,
location_attendance VARCHAR
) | At Time Warner Cable Arena 12,096, what was the high points? | SELECT high_points FROM table_name_85 WHERE location_attendance = "time warner cable arena 12,096" |
CREATE TABLE table_name_55 (
red_cards INTEGER,
season VARCHAR,
games VARCHAR
) | Which Red Cards has a Season of 1998/1999, and a Games larger than 41? | SELECT MIN(red_cards) FROM table_name_55 WHERE season = "1998/1999" AND games > 41 |
CREATE TABLE table_14174 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Event" text
) | What is the position for Discus in 2013? | SELECT "Position" FROM table_14174 WHERE "Event" = 'discus' AND "Year" = '2013' |
CREATE TABLE table_73914 (
"Outcome" text,
"No." text,
"Date" text,
"Championship" text,
"Surface" text,
"Opponent in the final" text,
"Score in the final" text
) | In the championship Indian Wells, United States (2), who are the opponents in the final? | SELECT "Opponent in the final" FROM table_73914 WHERE "Championship" = 'Indian Wells, United States (2)' |
CREATE TABLE table_name_7 (
lb VARCHAR,
scr_no VARCHAR,
sr_no VARCHAR
) | Name the LB&SCR number that has SR number of 8597 8600 | SELECT lb & scr_no FROM table_name_7 WHERE sr_no = "8597–8600" |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE proced... | what are the hospitals admission times of patient 60515 until 3 years ago? | SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 60515 AND DATETIME(admissions.admittime) <= DATETIME(CURRENT_TIME(), '-3 year') |
CREATE TABLE table_name_98 (
years VARCHAR,
name VARCHAR
) | What are the years for Kawerau Putauaki School? | SELECT years FROM table_name_98 WHERE name = "kawerau putauaki school" |
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Tags (
Id number,
TagName text,
... | Test of Poorly Answer Questions by Tag. | SELECT * FROM Posts WHERE AnswerCount > 2 AND ViewCount > 20 AND ClosedDate IS NULL AND AcceptedAnswerId IS NULL AND Tags LIKE '%##Tag1##%' AND CreationDate > '2015-12-21' |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
... | count the number of patients whose insurance is government and procedure long title is intravenous infusion of clofarabine? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.long_title = "Intravenous infusion of clofarabine" |
CREATE TABLE artist (
artist_name varchar2(50),
country varchar2(20),
gender varchar2(20),
preferred_genre varchar2(50)
)
CREATE TABLE genre (
g_name varchar2(20),
rating varchar2(10),
most_popular_in varchar2(50)
)
CREATE TABLE song (
song_name varchar2(50),
artist_name varchar2(5... | Show me mean rating by languages in a histogram, and list by the names from low to high please. | SELECT languages, AVG(rating) FROM song GROUP BY languages ORDER BY languages |
CREATE TABLE table_25527255_2 (
average_squad_age VARCHAR,
shirt_sponsor VARCHAR,
kit_manufacturer VARCHAR
) | What is the average squad age of the team whose shirt sponsor is Sho'rtan Gaz Mahsulot and whose kit manufacturer is Adidas? | SELECT average_squad_age FROM table_25527255_2 WHERE shirt_sponsor = "Sho'rtan Gaz Mahsulot" AND kit_manufacturer = "Adidas" |
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTyp... | How many questions did SO have X days after its creation?. Note that the public beta started on September 15th, 2008 | SELECT COUNT(*) FROM Posts WHERE PostTypeId = 1 AND CreationDate < DATEADD(day, '##Days##', '2008-07-15') |
CREATE TABLE table_46708 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | What was the Week on September 5, 1993? | SELECT "Week" FROM table_46708 WHERE "Date" = 'september 5, 1993' |
CREATE TABLE table_name_45 (
player VARCHAR,
place VARCHAR,
country VARCHAR
) | Name the Player who has a Place of t7 in Country of united states? | SELECT player FROM table_name_45 WHERE place = "t7" AND country = "united states" |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... | count the number of patients whose days of hospital stay is greater than 1 and lab test fluid is joint fluid? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "1" AND lab.fluid = "Joint Fluid" |
CREATE TABLE table_28707 (
"Rank" real,
"Athlete" text,
"Country" text,
"Distance (metres)" text,
"Points" text,
"Adjusted Points" real
) | What is the country(s) where the points equal 723.075? | SELECT "Country" FROM table_28707 WHERE "Points" = '723.075' |
CREATE TABLE table_15187735_16 (
netflix VARCHAR,
segment_a VARCHAR
) | Whats the season/episode of segment a digital dentistry | SELECT netflix FROM table_15187735_16 WHERE segment_a = "Digital Dentistry" |
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... | Visualize a bar chart about the distribution of ACC_Road and the sum of School_ID , and group by attribute ACC_Road, show in descending by the bars please. | SELECT ACC_Road, SUM(School_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY ACC_Road DESC |
CREATE TABLE table_name_59 (
career_with_the_franchise_ VARCHAR,
b_ VARCHAR,
player VARCHAR
) | What is Career with the franchise [b ], when Player is 'Willie Anderson Category:Articles with hCards'? | SELECT career_with_the_franchise_ AS "b_" FROM table_name_59 WHERE player = "willie anderson category:articles with hcards" |
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 inpatient hospital admitted patients who were discharged to skilled nursing facility. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND demographic.discharge_location = "SNF" |
CREATE TABLE table_name_87 (
competition VARCHAR,
date VARCHAR
) | Tell me the competition of 20 august 2008 | SELECT competition FROM table_name_87 WHERE date = "20 august 2008" |
CREATE TABLE table_19363 (
"Application" text,
"Version" text,
"Cmdlets" text,
"Provider" text,
"Management GUI" text
) | How many of the cmdlets are the 2008 version? | SELECT COUNT("Cmdlets") FROM table_19363 WHERE "Version" = '2008' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.