table stringlengths 33 7.14k | question stringlengths 4 1.06k | output stringlengths 2 4.44k ⌀ |
|---|---|---|
CREATE TABLE trust (
source_u_id integer,
target_u_id integer,
trust integer
)
CREATE TABLE review (
a_id integer,
u_id integer,
i_id integer,
rating integer,
rank integer
)
CREATE TABLE useracct (
u_id integer,
name varchar(128)
)
CREATE TABLE item (
i_id integer,
tit... | For each user, find their name and the number of reviews written by them Show bar chart, and I want to list by the names from low to high. | SELECT name, COUNT(*) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id ORDER BY name |
CREATE TABLE table_14047 (
"Polling firm" text,
"Dates" text,
"Prog. Cons." text,
"New Democratic" text,
"Liberal" text
) | Which firm conducted a poll in August 2006? | SELECT "Polling firm" FROM table_14047 WHERE "Dates" = 'august 2006' |
CREATE TABLE table_33994 (
"Artist" text,
"Title" text,
"Release date" text,
"Format" text,
"Cat. #" text
) | What is the category number that was released in November 2007? | SELECT "Cat. #" FROM table_33994 WHERE "Release date" = 'november 2007' |
CREATE TABLE table_name_80 (
declination___j2000__ VARCHAR,
ngc_number INTEGER
) | Tell me the declination with NGC number larger than 5750 | SELECT declination___j2000__ FROM table_name_80 WHERE ngc_number > 5750 |
CREATE TABLE table_name_21 (
round INTEGER,
name VARCHAR
) | What was the lowest round for Paul Hubbard? | SELECT MIN(round) FROM table_name_21 WHERE name = "paul hubbard" |
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TA... | is there ground transportation from the DFW airport to downtown DALLAS | SELECT DISTINCT ground_service.transport_type FROM airport, airport_service, city AS CITY_0, city AS CITY_1, ground_service WHERE airport.airport_code = airport_service.airport_code AND CITY_0.city_name = 'DALLAS' AND CITY_1.city_code = airport_service.city_code AND CITY_1.city_name = 'DALLAS' AND ground_service.airpor... |
CREATE TABLE table_24725 (
"Year" real,
"Film" text,
"Budget" text,
"Domestic Box Office" text,
"Foreign Box Office" text,
"Total" text,
"US DVD sales" text,
"Total (with DVD sales)" text
) | What was the budget for 'Thirteen Ghosts'? | SELECT "Budget" FROM table_24725 WHERE "Film" = 'Thirteen Ghosts' |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
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 regions (
REGION_... | For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about department_id over the last_name by a bar chart. | SELECT LAST_NAME, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) |
CREATE TABLE table_1342149_11 (
result VARCHAR,
incumbent VARCHAR
) | What was the result of the election when Tic Forrester ran as an incumbent? | SELECT result FROM table_1342149_11 WHERE incumbent = "Tic Forrester" |
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
)
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate re... | Count the number of people of each sex who have a weight higher than 85, I want to sort by the Y in desc. | SELECT Sex, COUNT(*) FROM people WHERE Weight > 85 GROUP BY Sex ORDER BY COUNT(*) DESC |
CREATE TABLE table_42428 (
"Year" real,
"Venue" text,
"Winning team" text,
"Score" text,
"USA Captain" text,
"Europe Captain" text
) | When the USA's captain was Beth Daniel, who was the winning team? | SELECT "Winning team" FROM table_42428 WHERE "USA Captain" = 'beth daniel' |
CREATE TABLE table_61864 (
"Pick" real,
"Player" text,
"Team" text,
"Position" text,
"Hometown/School" text
) | WHAT PLAYER HAS THE OAKLAND ATHLETICS? | SELECT "Player" FROM table_61864 WHERE "Team" = 'oakland athletics' |
CREATE TABLE table_59661 (
"Name" text,
"Residence" text,
"Party" text,
"Years in Assembly" text,
"Years in Senate" text
) | Which Party has Years in Senate of , and Years in Assembly of 2012 present? | SELECT "Party" FROM table_59661 WHERE "Years in Senate" = '—' AND "Years in Assembly" = '2012–present' |
CREATE TABLE d_icd_diagnoses (
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 icustays (
row_id number,
... | indicate the daily maximum amount of arterial bp mean for patient 4469 since 08/18/2100. | SELECT MAX(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 4469)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arter... |
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,
... | which patients have lab test item id 51221? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.itemid = "51221" |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE cour... | Next Winter , who 's teaching Sponsorship Linked Marketing ? | SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN cou... |
CREATE TABLE table_36250 (
"Rank by average" real,
"Place" real,
"Couple" text,
"Total" real,
"Number of dances" real,
"Average" real
) | Which Rank by average is the lowest one that has a Total of 425, and a Place larger than 1? | SELECT MIN("Rank by average") FROM table_36250 WHERE "Total" = '425' AND "Place" > '1' |
CREATE TABLE table_name_86 (
author___editor___source VARCHAR,
world_ranking__1_ VARCHAR,
countries_sampled VARCHAR
) | Who is the Author/Editor/Source for more than 100 countries sampled and has a 35 world ranking? | SELECT author___editor___source FROM table_name_86 WHERE world_ranking__1_ = "35" AND countries_sampled > 100 |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResults (
I... | Looking for posts by topic. | SELECT * FROM Posts WHERE CreationDate > '2017-1-1' AND CreationDate < '2017-5-5' AND Tags LIKE '%python%' LIMIT 10 |
CREATE TABLE table_name_21 (
tournament VARCHAR,
year VARCHAR
) | What is the Tournament in the Year of 1986? | SELECT tournament FROM table_name_21 WHERE year = "1986" |
CREATE TABLE table_45675 (
"City" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
) | What airport is in Toronto? | SELECT "Airport" FROM table_45675 WHERE "City" = 'toronto' |
CREATE TABLE book (
book_id number,
title text,
issues number,
writer text
)
CREATE TABLE publication (
publication_id number,
book_id number,
publisher text,
publication_date text,
price number
) | Show publishers that have more than one publication. | SELECT publisher FROM publication GROUP BY publisher HAVING COUNT(*) > 1 |
CREATE TABLE table_name_70 (
nfl_recap VARCHAR,
date VARCHAR
) | What was the NFL Recap of the game held on December 24, 2005? | SELECT nfl_recap FROM table_name_70 WHERE date = "december 24, 2005" |
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 demographic ... | what is age and diagnoses short title of subject id 2560? | SELECT demographic.age, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "2560" |
CREATE TABLE table_22606 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text
) | Who wrote episode 74? | SELECT "Written by" FROM table_22606 WHERE "No. in series" = '74' |
CREATE TABLE table_22171978_1 (
enrollment VARCHAR,
athletic_nickname VARCHAR
) | For the athletic nickname of golden knights how many entries are shown for enrollment? | SELECT COUNT(enrollment) FROM table_22171978_1 WHERE athletic_nickname = "Golden Knights" |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE chartevents (
row_id nu... | what are the four most frequently prescribed medications for patients who were also prescribed with chlorthalidone at the same time until 2104? | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'chlorthalidone' AND STRFTIME('%y', prescriptions.startdate) <= '2... |
CREATE TABLE table_name_47 (
overall VARCHAR,
pick__number INTEGER
) | What is the overall of the player with a pick # higher than 13? | SELECT overall FROM table_name_47 WHERE pick__number < 13 |
CREATE TABLE table_55217 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What is the size of the smallest crowd that watched a game at Arden Street Oval? | SELECT MIN("Crowd") FROM table_55217 WHERE "Venue" = 'arden street oval' |
CREATE TABLE table_16779068_5 (
total VARCHAR,
snatch VARCHAR,
one_hand_clean_ VARCHAR,
_jerk VARCHAR
) | Name the total with one hand clean and jerk is 87.5 and snatch is 87.5 | SELECT total FROM table_16779068_5 WHERE one_hand_clean_ & _jerk = "87.5" AND snatch = "87.5" |
CREATE TABLE table_60734 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | What is Score, when Player is 'Vijay Singh'? | SELECT "Score" FROM table_60734 WHERE "Player" = 'vijay singh' |
CREATE TABLE table_203_7 (
id number,
"pos." number,
"artist" text,
"single" text,
"year" number,
"sales" number,
"peak" number
) | how many sales did the single tic tic tac have ? | SELECT "sales" FROM table_203_7 WHERE "single" = '"tic, tic tac"' |
CREATE TABLE table_name_8 (
composer VARCHAR,
duration VARCHAR
) | What composer has a duration time of 3:31? | SELECT composer FROM table_name_8 WHERE duration = "3:31" |
CREATE TABLE table_2850912_4 (
college_junior_club_team VARCHAR,
nhl_team VARCHAR
) | Which junior team is associated with an NHL pick by the Buffalo Sabres? | SELECT college_junior_club_team FROM table_2850912_4 WHERE nhl_team = "Buffalo Sabres" |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
... | For those employees who do not work in departments with managers that have ids between 100 and 200, draw a bar chart about the distribution of email and department_id . | SELECT EMAIL, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) |
CREATE TABLE table_25887826_17 (
avg VARCHAR
) | How many 07 A points for the team with 1.4902 average? | SELECT MAX(07 AS _a_pts) FROM table_25887826_17 WHERE avg = "1.4902" |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE T... | Give me a histogram for what are all the employee ids and the names of the countries in which they work?, and list total number in asc order. | SELECT COUNTRY_NAME, SUM(EMPLOYEE_ID) FROM employees AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID JOIN locations AS T3 ON T2.LOCATION_ID = T3.LOCATION_ID JOIN countries AS T4 ON T3.COUNTRY_ID = T4.COUNTRY_ID GROUP BY COUNTRY_NAME ORDER BY SUM(EMPLOYEE_ID) |
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 procedures (
... | how many patients under the age of 27 stayed in the hospital for more than 16 days? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "27" AND demographic.days_stay > "16" |
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_tests int,
... | Which classes will I be able to take once I complete ELI 533 ? | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0 INNER JOIN course_prerequisite ON COURSE_0.course_id = course_prerequisite.course_id INNER JOIN course AS COURSE_1 ON COURSE_1.course_id = course_prerequisite.pre_course_id WHERE COURSE_1.department = 'ELI' AND COURSE_1.number =... |
CREATE TABLE table_name_76 (
prohibition_ticket VARCHAR,
greenback_ticket VARCHAR
) | Who was on the prohibition ticket when the Greenback ticket had Thomas Armstrong? | SELECT prohibition_ticket FROM table_name_76 WHERE greenback_ticket = "thomas armstrong" |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE airline (
airline_code varchar,
airline_name ... | show me airports in WASHINGTON | SELECT DISTINCT airport.airport_code FROM airport, airport_service, city WHERE airport.airport_code = airport_service.airport_code AND city.city_code = airport_service.city_code AND city.city_name = 'WASHINGTON' |
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
applica... | do any of the CO flights from BOSTON to SAN FRANCISCO stop in DENVER | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND CI... |
CREATE TABLE table_79255 (
"Japanese Title" text,
"Romaji Title" text,
"TV Station" text,
"Theme Song(s)" text,
"Episodes" real,
"Average Ratings" text
) | What is the Theme Song of Iryu -Team Medical Dragon-2? | SELECT "Theme Song(s)" FROM table_79255 WHERE "Romaji Title" = 'iryu -team medical dragon-2' |
CREATE TABLE table_name_69 (
team VARCHAR,
stadium VARCHAR,
top_division_titles VARCHAR,
founded VARCHAR
) | Which team has Top division titles larger than 0, a Founded larger than 1927, and a Stadium of miguel grau? | SELECT team FROM table_name_69 WHERE top_division_titles > 0 AND founded > 1927 AND stadium = "miguel grau" |
CREATE TABLE table_4047 (
"Team" text,
"Points per game" text,
"Rebounds per game" text,
"Assists per game" text,
"Steals per game" text,
"Minutes per game" text,
"Ranking per game" text
) | How many rebounds per game did Andrej D akovi average when playing 35 minutes per game? | SELECT "Rebounds per game" FROM table_4047 WHERE "Minutes per game" = '35' |
CREATE TABLE table_217785_2 (
season VARCHAR,
ranking VARCHAR
) | When did the season finale ranked at 73 first air? | SELECT season AS finale FROM table_217785_2 WHERE ranking = 73 |
CREATE TABLE table_name_60 (
circuit VARCHAR,
date VARCHAR
) | what is the circuit when the date is 16 april? | SELECT circuit FROM table_name_60 WHERE date = "16 april" |
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 inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttim... | what is the difference between total output and total input of patient 10855 on this month/22? | SELECT (SELECT SUM(inputevents_cv.amount) 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 = 10855)) AND DATETIME(inputevents_cv.charttime, 'start of month') = DATETIME(CURREN... |
CREATE TABLE table_60680 (
"HD designation" text,
"Constellation" text,
"Distance ( ly )" real,
"Spectral type" text,
"Signal power ( kW )" real,
"Date sent" text,
"Arrival date" text
) | What is Constellation, when Date Sent is 'September 4, 2001', and when Distance ( ly ) is less than 57.4? | SELECT "Constellation" FROM table_60680 WHERE "Date sent" = 'september 4, 2001' AND "Distance ( ly )" < '57.4' |
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
DEPT_EXTENSION varchar(4)
)
CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varchar(12),
EMP_INITIAL varchar(1),
EMP_J... | How many credits does the department offer Show bar chart, and sort in ascending by the Y-axis. | SELECT DEPT_CODE, SUM(CRS_CREDIT) FROM COURSE GROUP BY DEPT_CODE ORDER BY SUM(CRS_CREDIT) |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | What is the relationship between School_ID and ACC_Percent , and group by attribute All_Neutral? | SELECT School_ID, ACC_Percent FROM basketball_match GROUP BY All_Neutral |
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Statements (
Statement_ID INTEGER,
Statement_Details VARCHAR(255)
)
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
)
CREATE TABLE Ref_Budget_Codes (
... | Compute the total the total number across budget type code as a pie chart. | SELECT Budget_Type_Code, COUNT(*) FROM Documents_with_Expenses GROUP BY Budget_Type_Code |
CREATE TABLE table_name_17 (
points INTEGER,
entrant VARCHAR
) | What is the average Points when equipe ligier gauloises blondes is the entrant? | SELECT AVG(points) FROM table_name_17 WHERE entrant = "equipe ligier gauloises blondes" |
CREATE TABLE table_name_76 (
school VARCHAR,
enrollment INTEGER
) | What School has an Enrollement smaller than 301? | SELECT school FROM table_name_76 WHERE enrollment < 301 |
CREATE TABLE table_name_37 (
constellation VARCHAR,
object_type VARCHAR
) | What is the constellation for open cluster? | SELECT constellation FROM table_name_37 WHERE object_type = "open cluster" |
CREATE TABLE table_name_3 (
stage__winner_ VARCHAR,
general_classification VARCHAR,
young_rider_classification VARCHAR
) | What stage (winner) has thor hushovd as a general classification, and trent lowe as a rider classification? | SELECT stage__winner_ FROM table_name_3 WHERE general_classification = "thor hushovd" AND young_rider_classification = "trent lowe" |
CREATE TABLE table_name_98 (
to_par VARCHAR,
score VARCHAR,
player VARCHAR
) | What is To Par, when Score is 70, and when Player is 'Craig Stadler'? | SELECT to_par FROM table_name_98 WHERE score = 70 AND player = "craig stadler" |
CREATE TABLE table_name_71 (
week INTEGER,
opponent VARCHAR
) | What week was the opponent the San Diego Chargers? | SELECT AVG(week) FROM table_name_71 WHERE opponent = "san diego chargers" |
CREATE TABLE table_69369 (
"Date" text,
"Visiting Team" text,
"Final Score" text,
"Host Team" text,
"Stadium" text
) | What was the final score in Robert F. Kennedy Memorial Stadium? | SELECT "Final Score" FROM table_69369 WHERE "Stadium" = 'robert f. kennedy memorial stadium' |
CREATE TABLE table_name_82 (
probable_future VARCHAR,
simple_present_future VARCHAR
) | What is the probable future word for the simple present/future word high grade? | SELECT probable_future FROM table_name_82 WHERE NOT simple_present_future = "high grade" |
CREATE TABLE table_1188 (
"Name" text,
"GP" real,
"Solo" real,
"Ast" real,
"Total" real,
"TFL-Yds" text,
"No-Yds" text,
"BrUp" real,
"QBH" real,
"No.-Yds" text,
"Avg" text,
"TD" real,
"Rcv-Yds" text,
"FF" real,
"Blkd Kick" real
) | Name the gp for ff being 0 and qbh being 1 | SELECT "GP" FROM table_1188 WHERE "FF" = '0' AND "QBH" = '1' |
CREATE TABLE table_name_82 (
home_team VARCHAR,
venue VARCHAR
) | What is the home team's score at brunswick street oval? | SELECT home_team AS score FROM table_name_82 WHERE venue = "brunswick street oval" |
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
... | Anonymous and Registered votes per user. | SELECT COUNT(VoteTypeId) AS Downvotes, Posts.Id AS "post_link" FROM PostFeedback LEFT JOIN Posts ON PostId = Posts.Id WHERE VoteTypeId = 3 GROUP BY Posts.Id ORDER BY Downvotes DESC |
CREATE TABLE table_67033 (
"Number" text,
"Player" text,
"Position" text,
"Height" text,
"Weight" text,
"Home Town" text
) | How much does number 26 weigh? | SELECT "Weight" FROM table_67033 WHERE "Number" = '26' |
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 total number of patients on government insurance who had a lab test for CD34. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Government" AND lab.label = "CD34" |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | get the number of dead patients who were born before 2097. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.expire_flag = "1" AND demographic.dob_year < "2097" |
CREATE TABLE table_1524 (
"Poll Source" text,
"Dates administered" text,
"Democrat: Jim Martin" text,
"Republican: Saxby Chambliss" text,
"Lead Margin" real
) | How many times did Saxby Chambliss have a lead margin of 21? | SELECT COUNT("Republican: Saxby Chambliss") FROM table_1524 WHERE "Lead Margin" = '21' |
CREATE TABLE table_203_789 (
id number,
"season" text,
"team" text,
"country" text,
"division" number,
"apps" number,
"goals" number,
"assists" number
) | how many seasons were no goals scored ? | SELECT COUNT("season") FROM table_203_789 WHERE "goals" = 0 |
CREATE TABLE table_name_10 (
to_par VARCHAR,
total VARCHAR
) | What is the To par when there was a total of 291? | SELECT to_par FROM table_name_10 WHERE total = 291 |
CREATE TABLE table_12723 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | What is the country listed that has a place of t4 with a score of 72-70=142? | SELECT "Country" FROM table_12723 WHERE "Place" = 't4' AND "Score" = '72-70=142' |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
Par... | Top 50 users from Mars. | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%noida' OR UPPER(Location) LIKE '%NOIDA' ORDER BY Reputation DESC LIMIT 50 |
CREATE TABLE table_22360_3 (
total INTEGER
) | Name the most total | SELECT MAX(total) FROM table_22360_3 |
CREATE TABLE table_1342013_31 (
party VARCHAR,
incumbent VARCHAR
) | What party did Frank J. Becker represent? | SELECT party FROM table_1342013_31 WHERE incumbent = "Frank J. Becker" |
CREATE TABLE table_name_34 (
qual_2 VARCHAR,
team VARCHAR,
best VARCHAR
) | What is the qual 2 of team rocketsports racing, which has the best of 1:10.949? | SELECT qual_2 FROM table_name_34 WHERE team = "rocketsports racing" AND best = "1:10.949" |
CREATE TABLE table_27832075_2 (
directed_by VARCHAR,
episode__number VARCHAR
) | Who directed episode number 23 in the season? | SELECT directed_by FROM table_27832075_2 WHERE episode__number = "23" |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_typ... | tell me the first procedure patient 23620 had during the last hospital visit? | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT procedures_icd.icd9_code FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 23620 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admit... |
CREATE TABLE table_9059 (
"Event" text,
"Time" text,
"Club" text,
"Date" text,
"Meet" text,
"Location" text
) | Which Time has an Event of 200 m butterfly? | SELECT "Time" FROM table_9059 WHERE "Event" = '200 m butterfly' |
CREATE TABLE table_27909 (
"Settlement" text,
"Cyrillic Name Other Names" text,
"Type" text,
"Population (2011)" real,
"Largest ethnic group (2002)" text,
"Dominant religion (2002)" text
) | What is the lowest population in 2011 for the settlement of ortanovci? | SELECT MIN("Population (2011)") FROM table_27909 WHERE "Settlement" = 'Čortanovci' |
CREATE TABLE table_name_7 (
type VARCHAR,
name VARCHAR
) | What type has song as the name? | SELECT type FROM table_name_7 WHERE name = "song" |
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varcha... | please list the flights from WASHINGTON to ATLANTA | 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 = 'WASHINGTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATL... |
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,
... | Which TagNames are actually synonyms?. | SELECT * FROM Tags AS t LEFT OUTER JOIN TagSynonyms AS s ON (t.TagName = s.SourceTagName) WHERE (t.TagName IN ('param', 'params', 'parameter', 'parameters', 'memorystream', 'stream', 'streams') OR s.SourceTagName IN ('param', 'params', 'parameter', 'parameters', 'memorystream', 'stream', 'streams') OR s.TargetTagName I... |
CREATE TABLE table_name_78 (
recipient VARCHAR,
date VARCHAR
) | What movie won with a date of 12/11/03 | SELECT recipient FROM table_name_78 WHERE date = "12/11/03" |
CREATE TABLE table_29395291_2 (
subscribers__2006___thousands_ VARCHAR,
provider VARCHAR
) | How many subscribers, in 2006, does Glo Mobile have? | SELECT subscribers__2006___thousands_ FROM table_29395291_2 WHERE provider = "Glo Mobile" |
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,... | Questions with title length greater than 150. | SELECT Id AS "post_link", * FROM Posts WHERE LENGTH(Title) > 150 |
CREATE TABLE table_17058226_7 (
score VARCHAR,
date VARCHAR
) | Name the score for january 26 | SELECT score FROM table_17058226_7 WHERE date = "January 26" |
CREATE TABLE table_name_79 (
date VARCHAR,
city VARCHAR
) | When was the game played in Zagreb? | SELECT date FROM table_name_79 WHERE city = "zagreb" |
CREATE TABLE table_name_41 (
player VARCHAR,
year_s__won VARCHAR
) | What is Player, when Year(s) Won is 1978 , 1985? | SELECT player FROM table_name_41 WHERE year_s__won = "1978 , 1985" |
CREATE TABLE table_10015132_21 (
school_club_team VARCHAR,
player VARCHAR
) | Which school did Herb Williams go to? | SELECT school_club_team FROM table_10015132_21 WHERE player = "Herb Williams" |
CREATE TABLE table_name_85 (
score VARCHAR,
country VARCHAR
) | What score did Australia get? | SELECT score FROM table_name_85 WHERE country = "australia" |
CREATE TABLE table_17273 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Musical guest and song" text,
"Original air date" text,
"Production code" text
) | What is the original air date for the title 'no place like hell'? | SELECT "Original air date" FROM table_17273 WHERE "Title" = 'No Place Like Hell' |
CREATE TABLE table_204_874 (
id number,
"year" number,
"winner" text,
"runner-up" text,
"final score" text,
"third" text
) | who was the next winner after azovmash in 2004 ? | SELECT "winner" FROM table_204_874 WHERE "year" > (SELECT "year" FROM table_204_874 WHERE "year" = 2004 AND "winner" = 'azovmash') ORDER BY "year" LIMIT 1 |
CREATE TABLE table_8999 (
"Rider" text,
"Manufacturer" text,
"Laps" text,
"Time/Retired" text,
"Grid" text
) | Who was the manufacter of the car with a time/retired of +0.122? | SELECT "Manufacturer" FROM table_8999 WHERE "Time/Retired" = '+0.122' |
CREATE TABLE table_13443 (
"Debut year" real,
"Player" text,
"Games" real,
"Goals" real,
"Years at club" text
) | Which Player has Goals larger than 10, and a Debut year smaller than 1993, and Years at club of 1990 1993? | SELECT "Player" FROM table_13443 WHERE "Goals" > '10' AND "Debut year" < '1993' AND "Years at club" = '1990–1993' |
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | Number of questions with at least N answers by day. | SELECT DATE(STR(YEAR(q.CreationDate)) + '-' + STR(MONTH(q.CreationDate)) + '-' + STR(DAY(q.CreationDate))) AS FullDate, CAST(COUNT(*) AS FLOAT) AS "#Questions" FROM Posts AS q WHERE q.PostTypeId = 1 AND q.AnswerCount >= '##minAnswers##' GROUP BY STR(YEAR(q.CreationDate)) + '-' + STR(MONTH(q.CreationDate)) + '-' + STR(D... |
CREATE TABLE table_76678 (
"Club" text,
"Location" text,
"Manager" text,
"Venue" text,
"Capacity" real
) | What is the highest capacity for the venue of the club, vihren? | SELECT MAX("Capacity") FROM table_76678 WHERE "Club" = 'vihren' |
CREATE TABLE table_204_634 (
id number,
"tour" number,
"official title" text,
"venue" text,
"city" text,
"date\nstart" text,
"date\nfinish" text,
"prize money\nusd" number,
"report" text
) | which tour was the only one to take place in december ? | SELECT "official title" FROM table_204_634 WHERE "date\nfinish" = 12 |
CREATE TABLE table_204_867 (
id number,
"number" number,
"date" text,
"name" text,
"age\n(at execution)" number,
"age\n(at offense)" number,
"race" text,
"state" text,
"method" text
) | name all women who were executed in the same year as lois nadean smith . | SELECT "name" FROM table_204_867 WHERE "name" <> 'lois nadean smith' AND "date" = (SELECT "date" FROM table_204_867 WHERE "name" = 'lois nadean smith') |
CREATE TABLE region (
Region_ID int,
Region_name text,
Date text,
Label text,
Format text,
Catalogue text
)
CREATE TABLE party (
Party_ID int,
Minister text,
Took_office text,
Left_office text,
Region_ID int,
Party_name text
)
CREATE TABLE party_events (
Event_ID in... | Stacked bar chart of the number of left office for with each Minister in each left office, list the number of left office in desc order. | SELECT Left_office, COUNT(Left_office) FROM party GROUP BY Minister ORDER BY COUNT(Left_office) DESC |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId numb... | Top 300 bangladeshi Stackoverfollow user ranking. | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS PositionNumber, Id, DisplayName, Reputation, WebsiteUrl, Location FROM Users WHERE Location LIKE '%Bangladesh%' ORDER BY Reputation DESC LIMIT 300 |
CREATE TABLE table_69539 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Record" text
) | What was the record on September 4? | SELECT "Record" FROM table_69539 WHERE "Date" = 'september 4' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.