answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT COUNT(points) FROM table_26454128_9 WHERE distance__metres_ = "41.05" | What is the total number of times points were listed when the distance was 41.05 metres? | CREATE TABLE table_26454128_9 (points VARCHAR, distance__metres_ VARCHAR) |
SELECT COUNT(january) FROM table_name_30 WHERE opponent = "philadelphia flyers" | What is the number in January for Philadelphia Flyers as opponents? | CREATE TABLE table_name_30 (january VARCHAR, opponent VARCHAR) |
SELECT finish FROM table_name_63 WHERE country = "south africa" | What is the finish of South Africa? | CREATE TABLE table_name_63 (
finish VARCHAR,
country VARCHAR
) |
SELECT MAX(rank) FROM table_26454128_9 WHERE distance__metres_ = "52.73" | What is the highest rank where the distance is 52.73? | CREATE TABLE table_26454128_9 (rank INTEGER, distance__metres_ VARCHAR) |
SELECT MIN(game) FROM table_name_48 WHERE record = "32-12-3" | What is the lowest game for a record of 32-12-3? | CREATE TABLE table_name_48 (game INTEGER, record VARCHAR) |
SELECT Building, COUNT(*) FROM Faculty GROUP BY Building ORDER BY COUNT(*) | Return a bar chart on how many faculty members does each building have? List the result with the name of the building, and show total number in asc order. | CREATE TABLE Participates_in (
stuid INTEGER,
actid INTEGER
)
CREATE TABLE Faculty_Participates_in (
FacID INTEGER,
actid INTEGER
)
CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Rank VARCHAR(15),
Sex VARCHAR(1),
Phone INTEGER,
Room VARCHAR(5),
Building VARCHAR(13)
)
CREATE TABLE Activity (
actid INTEGER,
activity_name varchar(25)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
) |
SELECT country FROM table_26454128_9 WHERE points = "723.075" | What is the country(s) where the points equal 723.075? | CREATE TABLE table_26454128_9 (country VARCHAR, points VARCHAR) |
SELECT MIN(attendance) FROM table_name_95 WHERE record = "50-36" | What was the lowest attendance at the game with a record of 50-36? | CREATE TABLE table_name_95 (attendance INTEGER, record VARCHAR) |
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 = 'ATLANTA' AND CITY_1.city_code = airport_service.city_code AND CITY_1.city_name = 'ATLANTA' AND ground_service.airport_code = airport.airport_code AND ground_service.city_code = CITY_0.city_code | is there ground transportation from ATL airport to downtown ATLANTA | CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
round_trip_required varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id int,
flight_number int,
from_airport varchar,
meal_code text,
stops int,
time_elapsed int,
to_airport varchar
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_miles int,
pressurized varchar
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note 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_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
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
) |
SELECT MAX(Adjusted) AS points FROM table_26454128_4 WHERE country = "Great Britain" | What is the most adjusted points for Great Britain? | CREATE TABLE table_26454128_4 (Adjusted INTEGER, country VARCHAR) |
SELECT opponent FROM table_name_74 WHERE loss = "westbrook (2-2)" | Who was the opponent at the game that had a loss of Westbrook (2-2)? | CREATE TABLE table_name_74 (opponent VARCHAR, loss VARCHAR) |
SELECT AVG(vitalperiodic.respiration) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-202970') AND NOT patient.unitdischargetime IS NULL ORDER BY patient.unitadmittime DESC LIMIT 1) AND NOT vitalperiodic.respiration IS NULL GROUP BY STRFTIME('%y-%m-%d', vitalperiodic.observationtime) | indicate the daily average amount of respiration for patient 006-202970 on the last intensive care unit visit. | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
) |
SELECT country FROM table_26454128_4 WHERE athlete = "Paavo Yrjölä" | What is the country of Paavo Yrjölä? | CREATE TABLE table_26454128_4 (country VARCHAR, athlete VARCHAR) |
SELECT COUNT(sales) FROM table_name_31 WHERE album_title = "scouting for girls" | How many copies of scouting for girls were sold? | CREATE TABLE table_name_31 (sales VARCHAR, album_title VARCHAR) |
SELECT eruptions FROM table_name_51 WHERE location = "pacific ring of fire" AND volcanic_explosivity_index = "6" AND country = "peru" | Which Eruptions have a Location of pacific ring of fire, and a Volcanic Explosivity Index of 6, and a Country of peru? | CREATE TABLE table_name_51 (
eruptions VARCHAR,
country VARCHAR,
location VARCHAR,
volcanic_explosivity_index VARCHAR
) |
SELECT athlete FROM table_26454128_4 WHERE height = "1.87" AND country = "Sweden" | Which athlete has a height of 1.87 and is from Sweden? | CREATE TABLE table_26454128_4 (athlete VARCHAR, height VARCHAR, country VARCHAR) |
SELECT agg FROM table_name_2 WHERE team_2 = "dynamo moscow" | What is the agg of team 2 Dynamo Moscow? | CREATE TABLE table_name_2 (agg VARCHAR, team_2 VARCHAR) |
SELECT COUNT(DISTINCT Country) FROM climber | How many distinct countries are the climbers from? | CREATE TABLE climber (
Country VARCHAR
) |
SELECT country FROM table_26454128_7 WHERE athlete = "Ken Doherty" | Name the country that has ken doherty | CREATE TABLE table_26454128_7 (country VARCHAR, athlete VARCHAR) |
SELECT 1 AS st_leg FROM table_name_27 WHERE team_2 = "portol drac palma mallorca" | What is the 1st leg for team 2 Portol Drac Palma Mallorca? | CREATE TABLE table_name_27 (team_2 VARCHAR) |
SELECT "province" FROM table_204_944 WHERE "town" = 'temagami' | what province is the town of temagami ? | CREATE TABLE table_204_944 (
id number,
"mine" text,
"province" text,
"coordinates" text,
"town" text,
"dates" text,
"comments" text
) |
SELECT athlete FROM table_26454128_7 WHERE rank = 7 | Name the athlete for 7 rank | CREATE TABLE table_26454128_7 (athlete VARCHAR, rank VARCHAR) |
SELECT guest FROM table_name_16 WHERE venue = "stadion prljanije" | Who was the guest at Stadion Prljanije? | CREATE TABLE table_name_16 (guest VARCHAR, venue VARCHAR) |
SELECT mccain_percentage FROM table_20684390_1 WHERE county = "Jerome" | What is the McCain vote percentage in Jerome county? | CREATE TABLE table_20684390_1 (
mccain_percentage VARCHAR,
county VARCHAR
) |
SELECT COUNT(rank) FROM table_26454128_7 WHERE athlete = "Tom Churchill" | Name the total number of rank for tom churchill | CREATE TABLE table_26454128_7 (rank VARCHAR, athlete VARCHAR) |
SELECT guest FROM table_name_98 WHERE attendance = 3 | Who was the guest when attendance was 3? | CREATE TABLE table_name_98 (guest VARCHAR, attendance VARCHAR) |
SELECT rank FROM table_name_25 WHERE games = "276" | What is the rank that shows 276 games? | CREATE TABLE table_name_25 (
rank VARCHAR,
games VARCHAR
) |
SELECT heir FROM table_26460435_5 WHERE monarch = "Wareru" | Who was the heir when the monarch was Wareru? | CREATE TABLE table_26460435_5 (heir VARCHAR, monarch VARCHAR) |
SELECT venue FROM table_name_24 WHERE home = "fk crvena stijena" | In what venue did FK Crvena Stijena play at home? | CREATE TABLE table_name_24 (venue VARCHAR, home VARCHAR) |
SELECT "Result" FROM table_41381 WHERE "Category" = 'outstanding director of a musical' | What was the result for the Outstanding director of a musical category? | CREATE TABLE table_41381 (
"Year" real,
"Award" text,
"Category" text,
"Nominee" text,
"Result" text
) |
SELECT COUNT(monarch) FROM table_26460435_5 WHERE heir = "Yan Maw La Mon" | What is the number of monarchs that had Yan Maw la Mon as the heir? | CREATE TABLE table_26460435_5 (monarch VARCHAR, heir VARCHAR) |
SELECT SUM(attendance) FROM table_name_80 WHERE score = "2:0" | What is the sum of attendance when the score was 2:0? | CREATE TABLE table_name_80 (attendance INTEGER, score VARCHAR) |
SELECT Score, Title FROM Posts WHERE OwnerUserId = 251299 | User average score after final post. | CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
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 PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE VoteTypes (
Id number,
Name 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 number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDate time,
ApprovalModeratorId number,
DeactivationDate time,
DeactivationModeratorId number
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
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,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
) |
SELECT status FROM table_26460435_7 WHERE monarch = "Mingyinyo" | What is the status for the monarch Mingyinyo? | CREATE TABLE table_26460435_7 (status VARCHAR, monarch VARCHAR) |
SELECT attendance FROM table_name_82 WHERE score = "0:1" | How many were in attendance with a score of 0:1? | CREATE TABLE table_name_82 (attendance VARCHAR, score VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "S/P HANGING" AND demographic.admityear < "2133" | what is the number of patients whose primary disease is s/p hanging and admission year is less than 2133? | 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,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
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 text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) |
SELECT monarch FROM table_26460435_8 WHERE heir = "Thado Minsaw" | Who is the monarch with the heir thado minsaw? | CREATE TABLE table_26460435_8 (monarch VARCHAR, heir VARCHAR) |
SELECT home FROM table_name_88 WHERE score = "2:2" | Who was at home when the score was 2:2? | CREATE TABLE table_name_88 (home VARCHAR, score VARCHAR) |
SELECT COUNT(*) FROM table_203_675 WHERE "score" = 0 AND "score" = 0 | what number of games did both teams score no points ? | CREATE TABLE table_203_675 (
id number,
"match" number,
"date" text,
"round" text,
"home/away" text,
"opponent team" text,
"score" text,
"scorers" text
) |
SELECT written_by FROM table_26464364_1 WHERE directed_by = "Justin Hartley" | Who are the writers of the episodes directed by Justin Hartley? | CREATE TABLE table_26464364_1 (written_by VARCHAR, directed_by VARCHAR) |
SELECT score FROM table_name_16 WHERE opponent = "@ blue jays" AND date = "june 7" | What Score has an Opponent of @ Blue Jays with a Date of June 7? | CREATE TABLE table_name_16 (score VARCHAR, opponent VARCHAR, date VARCHAR) |
SELECT MIN("Win %") FROM table_57568 WHERE "Away" = '3-2' AND "Season" = '2011' | What was the lowest win% with an away score of 3-2 in 2011 season? | CREATE TABLE table_57568 (
"Coach" text,
"Season" text,
"Record" text,
"Home" text,
"Away" text,
"Win %" real,
"Average (Total) Home Attendance" text
) |
SELECT us_air_date FROM table_26464364_1 WHERE _number = 18 | On which date did episode # 18 air in the U.S.? | CREATE TABLE table_26464364_1 (us_air_date VARCHAR, _number VARCHAR) |
SELECT time FROM table_name_72 WHERE loss = "okajima (1-2)" | What Time is listed for the Loss of Okajima (1-2)? | CREATE TABLE table_name_72 (time VARCHAR, loss VARCHAR) |
SELECT COUNT(Id) FROM Posts AS q WHERE PostTypeId = 1 AND DATEDIFF(m, q.CreationDate, GETDATE()) >= 6 AND AnswerCount >= 1 AND ViewCount >= 1000 | Number of questions that would be automatically protected. Enter Query Description | CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
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
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
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 TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
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,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDate time,
ApprovalModeratorId number,
DeactivationDate time,
DeactivationModeratorId number
) |
SELECT us_viewers__million_ FROM table_26464364_1 WHERE production_code = "3X6004" | How many million U.S. viewers watched the episode with the production code 3x6004? | CREATE TABLE table_26464364_1 (us_viewers__million_ VARCHAR, production_code VARCHAR) |
SELECT loss FROM table_name_56 WHERE date = "june 2" | What Loss is recorded for the Date June 2? | CREATE TABLE table_name_56 (loss VARCHAR, date VARCHAR) |
SELECT T2.Name, COUNT(T2.Name) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name | For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and the amount of name , and group by attribute name, could you rank by the X-axis in ascending? | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) |
SELECT title FROM table_26464364_1 WHERE written_by = "Anne Cofell Saunders" | List the titles of episodes written by Anne Cofell Saunders. | CREATE TABLE table_26464364_1 (title VARCHAR, written_by VARCHAR) |
SELECT COUNT(win__percentage) FROM table_name_78 WHERE appearances = 4 AND losses > 3 | What's the total number of Win % with an Appearances of 4, and Losses that's larger than 3? | CREATE TABLE table_name_78 (win__percentage VARCHAR, appearances VARCHAR, losses VARCHAR) |
SELECT MIN(money_list_rank) FROM table_24330912_1 | What is the lowest overall money list rank? | CREATE TABLE table_24330912_1 (
money_list_rank INTEGER
) |
SELECT title FROM table_26464364_1 WHERE directed_by = "Christopher Petry" AND production_code = "3X6006" | What is the title of the episode directed by Christopher Petry with the production cod 3x6006? | CREATE TABLE table_26464364_1 (title VARCHAR, directed_by VARCHAR, production_code VARCHAR) |
SELECT MIN(appearances) FROM table_name_30 WHERE win__percentage = 0.706 | What's listed as the lowest Appearances with a Win % of 0.706? | CREATE TABLE table_name_30 (appearances INTEGER, win__percentage VARCHAR) |
SELECT surface FROM table_name_37 WHERE opponent = "sascha kloer" | What is the surface of the tournament with Sascha Kloer as the opponent? | CREATE TABLE table_name_37 (
surface VARCHAR,
opponent VARCHAR
) |
SELECT incumbent FROM table_2646656_3 WHERE district = "Ohio 10" | Who was the incumbent in the Ohio 10 district? | CREATE TABLE table_2646656_3 (incumbent VARCHAR, district VARCHAR) |
SELECT MIN(losses) FROM table_name_60 WHERE wins = 1 AND team = "dallas stars" AND win__percentage < 0.25 | What's the lowest Losses recorded wiht a Wins of 1, Team of Dallas Stars, and a Win % that's smaller than 0.25? | CREATE TABLE table_name_60 (losses INTEGER, win__percentage VARCHAR, wins VARCHAR, team VARCHAR) |
SELECT SUM(count) FROM checkin WHERE day = 'Sunday' | Find the total checkins in Sunday | CREATE TABLE neighborhood (
id int,
business_id varchar,
neighborhood_name varchar
)
CREATE TABLE review (
rid int,
business_id varchar,
user_id varchar,
rating float,
text longtext,
year int,
month varchar
)
CREATE TABLE business (
bid int,
business_id varchar,
name varchar,
full_address varchar,
city varchar,
latitude varchar,
longitude varchar,
review_count bigint,
is_open tinyint,
rating float,
state varchar
)
CREATE TABLE category (
id int,
business_id varchar,
category_name varchar
)
CREATE TABLE user (
uid int,
user_id varchar,
name varchar
)
CREATE TABLE checkin (
cid int,
business_id varchar,
count int,
day varchar
)
CREATE TABLE tip (
tip_id int,
business_id varchar,
text longtext,
user_id varchar,
likes int,
year int,
month varchar
) |
SELECT incumbent FROM table_2646656_3 WHERE district = "Ohio 5" | Who was the incumbent in the Ohio 5 district? | CREATE TABLE table_2646656_3 (incumbent VARCHAR, district VARCHAR) |
SELECT district FROM table_name_52 WHERE incumbent = "benjamin eggleston" | What district has benjamin eggleston for incumbent? | CREATE TABLE table_name_52 (district VARCHAR, incumbent VARCHAR) |
SELECT SUM(drawn) FROM table_name_61 WHERE games < 6 | How many Drawn is which has a Games smaller than 6? | CREATE TABLE table_name_61 (
drawn INTEGER,
games INTEGER
) |
SELECT candidates FROM table_2646656_3 WHERE result = "Retired Republican hold" AND incumbent = "Philemon Bliss" | Who were the candidates where the result was retired Republican hold and the incumbent was Philemon Bliss? | CREATE TABLE table_2646656_3 (candidates VARCHAR, result VARCHAR, incumbent VARCHAR) |
SELECT party FROM table_name_11 WHERE incumbent = "tobias a. plants" | Which party is tobias a. plants the incumbent? | CREATE TABLE table_name_11 (party VARCHAR, incumbent VARCHAR) |
SELECT catalog FROM table_name_61 WHERE region = "canada" AND format = "cd/dvd" | Which Catalog has a Region of Canada and a Format of cd/dvd? | CREATE TABLE table_name_61 (
catalog VARCHAR,
region VARCHAR,
format VARCHAR
) |
SELECT COUNT(new_conference) FROM table_26476336_2 WHERE new_classification = "NCLL Deep South Conference" | How many new conferences are in the NCLL deep south conference? | CREATE TABLE table_26476336_2 (new_conference VARCHAR, new_classification VARCHAR) |
SELECT district FROM table_name_89 WHERE result = "retired republican hold" AND incumbent = "rufus p. spalding" | wWhich district has a retired republican hold with an incumbent of rufus p. spalding? | CREATE TABLE table_name_89 (district VARCHAR, result VARCHAR, incumbent VARCHAR) |
SELECT location FROM table_name_19 WHERE record = "4-3" | Which location held the bout that led to a 4-3 record? | CREATE TABLE table_name_19 (
location VARCHAR,
record VARCHAR
) |
SELECT team_nickname FROM table_26476336_2 WHERE institution = "University of Nebraska at Omaha" | What is the nickname at the University of Nebraska at Omaha? | CREATE TABLE table_26476336_2 (team_nickname VARCHAR, institution VARCHAR) |
SELECT district FROM table_name_67 WHERE result = "retired republican hold" AND incumbent = "rufus p. spalding" | Which district has a retired republican hold and an incumbent of rufus p. spalding? | CREATE TABLE table_name_67 (district VARCHAR, result VARCHAR, incumbent VARCHAR) |
SELECT COUNT(_percentage_2006) FROM table_21132404_1 WHERE political_parties = "Social Democratic Party of Germany" | How many time was the political party the social democratic party of germany? | CREATE TABLE table_21132404_1 (
_percentage_2006 VARCHAR,
political_parties VARCHAR
) |
SELECT location FROM table_26476336_2 WHERE years = "2005-2010" | What location is listed from 2005-2010? | CREATE TABLE table_26476336_2 (location VARCHAR, years VARCHAR) |
SELECT tournament FROM table_name_25 WHERE 2012 = "a" AND 2011 = "2r" | Which tournament had a 2012 of a and a 2011 of 2r? | CREATE TABLE table_name_25 (tournament VARCHAR) |
SELECT COUNT(*) > 0 FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 525 AND instructor.name LIKE '%Yves Atchade%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.offering_id AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016 | Is Prof. Yves Atchade the head professor for 525 next semester ? | 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_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_project varchar,
has_final_exam varchar,
textbook varchar,
class_address varchar,
allow_audit varchar
)
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 (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_projects varchar,
has_exams varchar,
num_reviews int,
clarity_score int,
easiness_score int,
helpfulness_score int
)
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,
heavy_papers int,
cares_for_students int,
heavy_assignments int,
respected int,
participation int,
heavy_reading int,
tough_grader int,
hilarious int,
would_take_again int,
good_lecture int,
no_skip int
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varchar
)
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
) |
SELECT location FROM table_26476336_2 WHERE team_nickname = "Red Raiders" | Where is the nickname the Red Raiders? | CREATE TABLE table_26476336_2 (location VARCHAR, team_nickname VARCHAR) |
SELECT 2009 FROM table_name_72 WHERE 2010 = "wta premier 5 tournaments" | Which 2009's 2010 featured the wta premier 5 tournaments? | CREATE TABLE table_name_72 (Id VARCHAR) |
SELECT * FROM table_train_40 WHERE do_not_resuscitate_dnr = 1 | established do not resuscitate orders prior to enrollment | CREATE TABLE table_train_40 (
"id" int,
"bone_marrow_transplant" bool,
"organ_transplantation" bool,
"systolic_blood_pressure_sbp" int,
"do_not_resuscitate_dnr" bool,
"autoimmune_disease" bool,
"steroid_therapy" bool,
"intention_to_central_venous_catheter" bool,
"hematologic_disease" bool,
"sepsis" bool,
"acute_leukemia" bool,
"allergy_to_ifn_gamma" bool,
"neoplasma" bool,
"receiving_prednisolone" int,
"septic_shock" bool,
"lactate" int,
"NOUSE" float
) |
SELECT institution FROM table_26476336_2 WHERE new_conference = "SELC" | What school has the new conference as SELC? | CREATE TABLE table_26476336_2 (institution VARCHAR, new_conference VARCHAR) |
SELECT 2011 FROM table_name_24 WHERE tournament = "indian wells" | Which 2011's tournament was Indian Wells? | CREATE TABLE table_name_24 (tournament VARCHAR) |
SELECT COUNT(points) FROM table_name_80 WHERE rank = 5 AND games > 34 | How many points are there for rank 5 with more than 34 games? | CREATE TABLE table_name_80 (
points VARCHAR,
rank VARCHAR,
games VARCHAR
) |
SELECT years FROM table_26476336_2 WHERE new_classification = "MCLA Division I" | What are the years that the new classification was MCLA division i? | CREATE TABLE table_26476336_2 (years VARCHAR, new_classification VARCHAR) |
SELECT 2010 FROM table_name_2 WHERE tournament = "olympic games" | Which 2010 stat featured the tournament of the Olympic Games? | CREATE TABLE table_name_2 (tournament VARCHAR) |
SELECT "Region" FROM table_60015 WHERE "Name" = 'tv uskana' | What is the region for tv uskana? | CREATE TABLE table_60015 (
"Name" text,
"Region" text,
"Programming" text,
"Type" text,
"Encryption" text
) |
SELECT colors FROM table_26466528_1 WHERE location = "North Canton" | Name the colors for north canton | CREATE TABLE table_26466528_1 (colors VARCHAR, location VARCHAR) |
SELECT date FROM table_name_5 WHERE attendance = "15,105" | When did the Indians play a game with 15,105 people in attendance? | CREATE TABLE table_name_5 (date VARCHAR, attendance VARCHAR) |
SELECT "Director" FROM table_16976 WHERE "Original air date" = '10January2008' | If the Original Air Date is 10January2008, what directors released on that date? | CREATE TABLE table_16976 (
"Total No." real,
"Celebrity" text,
"Director" text,
"Original air date" text,
"Viewers" text
) |
SELECT MAX(join_date) FROM table_26466528_1 | Name the most join date | CREATE TABLE table_26466528_1 (join_date INTEGER) |
SELECT opponent FROM table_name_89 WHERE date = "april 23" | Who did the Indians play on April 23? | CREATE TABLE table_name_89 (opponent VARCHAR, date VARCHAR) |
SELECT home_team FROM table_name_73 WHERE away_team = "collingwood" | What was the home team that played Collingwood? | CREATE TABLE table_name_73 (
home_team VARCHAR,
away_team VARCHAR
) |
SELECT MIN(join_date) FROM table_26466528_1 | Name the least join date | CREATE TABLE table_26466528_1 (join_date INTEGER) |
SELECT MIN(laps) FROM table_name_86 WHERE rider = "marco simoncelli" AND grid > 11 | What is the lowest number of laps for Marco Simoncelli on a grid higher than 11? | CREATE TABLE table_name_86 (laps INTEGER, rider VARCHAR, grid VARCHAR) |
SELECT Publisher, COUNT(*) FROM publication GROUP BY Publisher ORDER BY COUNT(*) DESC | Show different publishers together with the number of publications they have Plot them as bar chart, and could you list by the total number from high to low? | CREATE TABLE publication (
Publication_ID int,
Book_ID int,
Publisher text,
Publication_Date text,
Price real
)
CREATE TABLE book (
Book_ID int,
Title text,
Issues real,
Writer text
) |
SELECT location FROM table_26466528_1 WHERE colors = "Black, Orange" | Name the location for black, orange | CREATE TABLE table_26466528_1 (location VARCHAR, colors VARCHAR) |
SELECT rider FROM table_name_67 WHERE laps < 20 AND grid > 23 | Who is the rider who did less than 20 laps on a grid number greater than 23? | CREATE TABLE table_name_67 (rider VARCHAR, laps VARCHAR, grid VARCHAR) |
SELECT MAX("Rank") FROM table_63789 WHERE "Notes" = 'sa/b' AND "Time" = '6:52.70' | What is the highest rank for a 6:52.70 time and notes of sa/b? | CREATE TABLE table_63789 (
"Rank" real,
"Athlete" text,
"Country" text,
"Time" text,
"Notes" text
) |
SELECT join_date FROM table_26466528_1 WHERE location = "North Canton" | Name when north canton joined | CREATE TABLE table_26466528_1 (join_date VARCHAR, location VARCHAR) |
SELECT MIN(grid) FROM table_name_74 WHERE manufacturer = "ktm" AND laps > 20 | What is the lowest grid number that had a rider with KTM as the manufacturer who did more than 20 laps? | CREATE TABLE table_name_74 (grid INTEGER, manufacturer VARCHAR, laps VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "SINGLE" | what is the number of patients whose marital status is single? | 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 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 (
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,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) |
SELECT COUNT(series) FROM table_26473176_1 WHERE position = "12th" | How many "series" were in the 12th "position? | CREATE TABLE table_26473176_1 (series VARCHAR, position VARCHAR) |
SELECT tournament FROM table_name_46 WHERE date = "22 october 2012" | What is the tournament on 22 October 2012? | CREATE TABLE table_name_46 (tournament VARCHAR, date VARCHAR) |
SELECT "Raion (district) or City" FROM table_53048 WHERE "Bessarabian Bulgarians" = '8,600' | What city or Raion (district) has 8,600 Bessarabian Bulgarians? | CREATE TABLE table_53048 (
"Raion (district) or City" text,
"Total" text,
"Ukrainians" text,
"Moldovans" text,
"Bessarabian Bulgarians" text,
"Russians" text,
"Gagauzians" text,
"Other ethnic groups\u00b2" text
) |
SELECT COUNT(team) FROM table_26473176_1 WHERE points = 10 | How many teams were at 10 points? | CREATE TABLE table_26473176_1 (team VARCHAR, points VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.