answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT SUM(points) FROM table_name_78 WHERE assists = 7 AND games = 11 AND goals < 6 | If the goals scored were below 6, 11 games were played, and there were 7 assists, what's the sum of points with games meeting these criteria? | CREATE TABLE table_name_78 (
points INTEGER,
goals VARCHAR,
assists VARCHAR,
games VARCHAR
) |
SELECT COUNT(production_code) FROM table_24425976_2 WHERE season = "10" | How many production codes are there for episode 10 in the season? | CREATE TABLE table_24425976_2 (production_code VARCHAR, season VARCHAR) |
SELECT MIN(weeks_at_peak) FROM table_26399982_2 | What smallest amount in the weeks at peak column? | CREATE TABLE table_26399982_2 (weeks_at_peak INTEGER) |
SELECT rider FROM table_name_12 WHERE speed = "108.347mph" AND time = "1:02.40.93" | What Rider had a Speed of 108.347mph and Time of 1:02.40.93? | CREATE TABLE table_name_12 (
rider VARCHAR,
speed VARCHAR,
time VARCHAR
) |
SELECT original_air_date FROM table_24425976_2 WHERE production_code = "110" | What date did the episode with code 110 originally air? | CREATE TABLE table_24425976_2 (original_air_date VARCHAR, production_code VARCHAR) |
SELECT series FROM table_26400438_1 WHERE team = "Lecor Sports" | In which series did Lecor Sports participate? | CREATE TABLE table_26400438_1 (series VARCHAR, team VARCHAR) |
SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' | For all employees who have the letters D or S in their first name, give me the comparison about the sum of salary over the hire_date bin hire_date by weekday. | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,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 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 regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
) |
SELECT episode_title FROM table_24425976_2 WHERE production_code = "107" | What is the name of the episode with a production code of 107? | CREATE TABLE table_24425976_2 (episode_title VARCHAR, production_code VARCHAR) |
SELECT COUNT(f_laps) FROM table_26400438_1 WHERE poles = 12 | How many times did he hold 12 poles? | CREATE TABLE table_26400438_1 (f_laps VARCHAR, poles VARCHAR) |
SELECT chartevents.charttime 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 = 1902)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart rate' AND d_items.linksto = 'chartevents') AND DATETIME(chartevents.charttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') ORDER BY chartevents.charttime LIMIT 1 | when's the first time patient 1902's heart rate was measured or taken today? | CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime 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 d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
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 patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
) |
SELECT COUNT(series) FROM table_24425976_2 WHERE production_code = "111" | How many episodes in the series has a production code of 111? | CREATE TABLE table_24425976_2 (series VARCHAR, production_code VARCHAR) |
SELECT COUNT(races) FROM table_26400438_1 WHERE podiums = 8 | In how many races did he have 8 podium finishes? | CREATE TABLE table_26400438_1 (races VARCHAR, podiums VARCHAR) |
SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(SALARY) | For those employees who did not have any job in the past, draw a bar chart about the distribution of hire_date and the sum of salary bin hire_date by time, order from low to high by the Y. | 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 departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
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 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)
) |
SELECT COUNT(payout___us) AS $__ FROM table_24427210_1 WHERE date = "December 28, 2009" | Name the total number of payout for december 28, 2009 | CREATE TABLE table_24427210_1 (payout___us VARCHAR, date VARCHAR) |
SELECT COUNT(podiums) FROM table_26400438_1 WHERE team = "Carlin" | how many seasons did he race in team Carlin? | CREATE TABLE table_26400438_1 (podiums VARCHAR, team VARCHAR) |
SELECT MAX(SLM) AS number FROM table_name_26 WHERE built > 1895 | What locomotive built after 1895 has the highest SLM number? | CREATE TABLE table_name_26 (
SLM INTEGER,
built INTEGER
) |
SELECT payout___us$__ FROM table_24427210_1 WHERE tv = "ESPN" AND bowl_game = "Music City Bowl" | Name the payout for espn for music city bowl | CREATE TABLE table_24427210_1 (payout___us$__ VARCHAR, tv VARCHAR, bowl_game VARCHAR) |
SELECT COUNT(place) FROM table_26427332_17 WHERE contestant = "Jacqueline Kohl" | How many entries are in the ranking for jacqueline kohl? | CREATE TABLE table_26427332_17 (place VARCHAR, contestant VARCHAR) |
SELECT round FROM table_name_21 WHERE opponent = "sergis kyratzis" | What is the round when the match was against sergis kyratzis? | CREATE TABLE table_name_21 (
round VARCHAR,
opponent VARCHAR
) |
SELECT date FROM table_24427210_1 WHERE stadium = "Raymond James stadium" | Name the date for raymond james stadium | CREATE TABLE table_24427210_1 (date VARCHAR, stadium VARCHAR) |
SELECT measurements__in_cm_ FROM table_26427332_17 WHERE city = "Sindelfingen" | what measurement does the contestant from sindelfingen have? | CREATE TABLE table_26427332_17 (measurements__in_cm_ VARCHAR, city VARCHAR) |
SELECT ACC_Road, SUM(School_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY ACC_Road | Draw a bar chart about the distribution of ACC_Road and the sum of School_ID , and group by attribute ACC_Road, show from low to high by the bar please. | 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 (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
) |
SELECT original_air_date FROM table_24425976_7 WHERE season = 4 | What date did episode 4 in the season originally air? | CREATE TABLE table_24425976_7 (original_air_date VARCHAR, season VARCHAR) |
SELECT COUNT(federal_state) FROM table_26427332_17 WHERE city = "Lahnstein" | for how many federal states is the city of lahnstein listed in the ranking? | CREATE TABLE table_26427332_17 (federal_state VARCHAR, city VARCHAR) |
SELECT time_of_broadcast FROM table_name_23 WHERE picture_format = "4:3" AND hours = "20:30" AND days_of_the_week = "monday, wednesday, friday" | Name the Time of broadcast has a Picture format of 4:3, and Hours of 20:30, and Days of the week of monday, wednesday, friday? | CREATE TABLE table_name_23 (
time_of_broadcast VARCHAR,
days_of_the_week VARCHAR,
picture_format VARCHAR,
hours VARCHAR
) |
SELECT original_air_date FROM table_24425976_7 WHERE series = 115 | What date did episode 115 in the series originally air? | CREATE TABLE table_24425976_7 (original_air_date VARCHAR, series VARCHAR) |
SELECT contestant FROM table_26427332_17 WHERE city = "Hanover" | who are the participants from hanover? | CREATE TABLE table_26427332_17 (contestant VARCHAR, city VARCHAR) |
SELECT DISTINCT flight.flight_id FROM airport_service, city, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis AS FARE_BASIS_0, fare_basis AS FARE_BASIS_1, flight, flight_fare WHERE ((DATE_DAY_0.day_number = 22 AND DATE_DAY_0.month_number = 3 AND DATE_DAY_0.year = 1991 AND DATE_DAY_1.day_number = 22 AND DATE_DAY_1.month_number = 3 AND DATE_DAY_1.year = 1991 AND DAYS_0.day_name = DATE_DAY_0.day_name AND DAYS_1.day_name = DATE_DAY_1.day_name AND FARE_BASIS_0.class_type = 'FIRST' AND FARE_BASIS_1.basis_days = DAYS_1.days_code AND fare.fare_basis_code = FARE_BASIS_0.fare_basis_code AND fare.fare_basis_code = FARE_BASIS_1.fare_basis_code AND flight_fare.fare_id = fare.fare_id AND flight.flight_days = DAYS_0.days_code AND flight.flight_id = flight_fare.flight_id) AND city.city_code = airport_service.city_code AND city.city_name = 'SAN FRANCISCO' AND flight.to_airport = airport_service.airport_code) AND flight.airline_code = 'AA' | a FIRST class flight on AA to SAN FRANCISCO on tuesday in the next week | 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 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 date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
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 code_description (
code varchar,
description text
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
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 flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
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 city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE month (
month_number int,
month_name text
)
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_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 food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
) |
SELECT 2 AS nd_leg FROM table_24426072_1 WHERE team__number1 = "River Plate" | What was the 2nd leg for team #1 River Plate? | CREATE TABLE table_24426072_1 (team__number1 VARCHAR) |
SELECT MAX(district) FROM table_26416704_2 WHERE incumbent = "Brian W. Thomas" | What is the highest numbred district that has brian w. thomas as an incumbent? | CREATE TABLE table_26416704_2 (district INTEGER, incumbent VARCHAR) |
SELECT COUNT("competition") FROM table_203_245 WHERE "position" <= 3 | how many total international races did german silva place in the top 3 spots ? | CREATE TABLE table_203_245 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"event" text,
"notes" text
) |
SELECT 2 AS nd_leg FROM table_24426072_1 WHERE team__number2 = "Fluminense" | What was team number 2's Fluminense's 2nd leg? | CREATE TABLE table_24426072_1 (team__number2 VARCHAR) |
SELECT status FROM table_26416704_2 WHERE incumbent = "Margaret Kaiser" | What was the status of the election featuring incumbent margaret kaiser? | CREATE TABLE table_26416704_2 (status VARCHAR, incumbent VARCHAR) |
SELECT *, 'http://stackoverflow.com/questions/' + QuestionId + '/#comment' + CommentId + '_' + QuestionId AS Url FROM (SELECT COALESCE(Q.Title, Posts.Title) AS Question, Comments.UserDisplayName AS Commenter, Text AS Comment, Posts.OwnerDisplayName AS Poster, PostTypes.Name AS "post_type", Posts.CreationDate, CAST(Comments.Id AS TEXT) AS CommentId, CAST(COALESCE(Posts.ParentId, Posts.Id) AS TEXT) AS QuestionId FROM Comments JOIN Posts ON Comments.PostId = Posts.Id JOIN PostTypes ON PostTypes.Id = Posts.PostTypeId LEFT JOIN Posts AS Q ON Q.Id = Posts.ParentId WHERE Posts.OwnerUserId = '##USERID##' AND (Comments.Text LIKE '%+1%' OR Comments.Text LIKE '%-1%')) AS t ORDER BY CreationDate DESC | Vote comments on user posts. | 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 Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense 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 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 PostTags (
PostId number,
TagId number
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount 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 VoteTypes (
Id number,
Name text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
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 PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate 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 CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
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
) |
SELECT MAX(seed) FROM table_24431264_16 WHERE player = "David Ferrer" | What was david ferrer seeded? | CREATE TABLE table_24431264_16 (seed INTEGER, player VARCHAR) |
SELECT COUNT(written_by) FROM table_26429658_1 WHERE directed_by = "Arlene Sanford" | How many episodes were directed by Arlene Sanford? | CREATE TABLE table_26429658_1 (written_by VARCHAR, directed_by VARCHAR) |
SELECT MIN(rank_by_average) FROM table_name_54 WHERE total = 425 AND place > 1 | Which Rank by average is the lowest one that has a Total of 425, and a Place larger than 1? | CREATE TABLE table_name_54 (
rank_by_average INTEGER,
total VARCHAR,
place VARCHAR
) |
SELECT player FROM table_24431264_16 WHERE points = 1420 | What player had 1420 points coming in? | CREATE TABLE table_24431264_16 (player VARCHAR, points VARCHAR) |
SELECT title FROM table_26429658_1 WHERE production_code = 2010 | What was the title of the episode with a production code of 2010? | CREATE TABLE table_26429658_1 (title VARCHAR, production_code VARCHAR) |
SELECT termini FROM table_name_40 WHERE population_area = "aguilares" | What termini does the route with a population Area of aguilares have? | CREATE TABLE table_name_40 (
termini VARCHAR,
population_area VARCHAR
) |
SELECT COUNT(points) AS won FROM table_24431264_16 WHERE player = "Victor Hănescu" | How many players named victor hănescu played? | CREATE TABLE table_24431264_16 (points VARCHAR, player VARCHAR) |
SELECT COUNT(production_code) FROM table_26429658_1 WHERE us_viewers__millions_ = "4.43" | How many production codes had a US viewership of 4.43 million? | CREATE TABLE table_26429658_1 (production_code VARCHAR, us_viewers__millions_ VARCHAR) |
SELECT "bronze" FROM table_204_311 WHERE "nation" = 'france' | what is the total number of bronze medals won by france ? | CREATE TABLE table_204_311 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) |
SELECT MIN(kurdistan_democratic_party) FROM table_24440361_1 WHERE total_kurdistan_list = 10 | Name the kurdistan democratic party for kurdistan list being 10 | CREATE TABLE table_24440361_1 (kurdistan_democratic_party INTEGER, total_kurdistan_list VARCHAR) |
SELECT COUNT(score) FROM table_26458137_2 WHERE opponents_in_the_final = "Beti Sekulovski Cindy Watson" | How many times is the opponents in the final is beti sekulovski cindy watson? | CREATE TABLE table_26458137_2 (score VARCHAR, opponents_in_the_final VARCHAR) |
SELECT "Position" FROM table_55461 WHERE "Year" < '2000' AND "College/Country" = 'usc' | Regarding players before 2000, what is the USC player's position? | CREATE TABLE table_55461 (
"Year" real,
"Player" text,
"Position" text,
"College/Country" text,
"WNBA Team" text
) |
SELECT MAX(total_kurdistan_list) FROM table_24440361_1 WHERE governorate = "Diyala" | Name the most kirdistan list for diyala | CREATE TABLE table_24440361_1 (total_kurdistan_list INTEGER, governorate VARCHAR) |
SELECT partner FROM table_26458137_2 WHERE opponents_in_the_final = "Stephanie Dubois Olga Savchuk" | Who is the partner when the opponents in the final is stephanie dubois olga savchuk? | CREATE TABLE table_26458137_2 (partner VARCHAR, opponents_in_the_final VARCHAR) |
SELECT COUNT("stadium") FROM table_203_420 WHERE "capacity" >= 6000 AND "capacity" <= 8000 | how many stadiums have a capacity between 6000 and 8000 ? | CREATE TABLE table_203_420 (
id number,
"#" number,
"stadium" text,
"capacity" number,
"city" text,
"home team" text
) |
SELECT MIN(total_kurdistan_list) FROM table_24440361_1 | Name the least total kurdistan list | CREATE TABLE table_24440361_1 (total_kurdistan_list INTEGER) |
SELECT artist FROM table_26485957_1 WHERE result = "4" | Which artist had a result of 4? | CREATE TABLE table_26485957_1 (artist VARCHAR, result VARCHAR) |
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 = 'NASHVILLE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'TACOMA' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND flight.departure_time BETWEEN 0 AND 1200) AND flight.departure_time = (SELECT MIN(FLIGHTalias1.departure_time) FROM airport_service AS AIRPORT_SERVICEalias2, airport_service AS AIRPORT_SERVICEalias3, city AS CITYalias2, city AS CITYalias3, flight AS FLIGHTalias1 WHERE (CITYalias2.city_code = AIRPORT_SERVICEalias2.city_code AND CITYalias2.city_name = 'NASHVILLE' AND CITYalias3.city_code = AIRPORT_SERVICEalias3.city_code AND CITYalias3.city_name = 'TACOMA' AND FLIGHTalias1.from_airport = AIRPORT_SERVICEalias2.airport_code AND FLIGHTalias1.to_airport = AIRPORT_SERVICEalias3.airport_code) AND FLIGHTalias1.departure_time BETWEEN 0 AND 1200) | i need to fly from NASHVILLE to TACOMA first thing in the morning what is there | CREATE TABLE days (
days_code varchar,
day_name varchar
)
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 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 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 flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
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 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 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 month (
month_number int,
month_name text
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note 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 compartment_class (
compartment varchar,
class_type varchar
)
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 dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
) |
SELECT 2 AS nd_runner_up FROM table_24430894_20 WHERE mutya_ng_pilipinas_asia_pacific = "Rochelle Romero Ong" | Who won 3rd place when the mutya ng pilipinas winner was was rochelle romero ong? | CREATE TABLE table_24430894_20 (mutya_ng_pilipinas_asia_pacific VARCHAR) |
SELECT MIN(judging_panel_points) FROM table_26485957_1 | What is the minimum score given in judging panel points? | CREATE TABLE table_26485957_1 (judging_panel_points INTEGER) |
SELECT broadcast_date FROM table_29135051_3 WHERE guest_s_ = "Barbara Windsor and Heston Blumenthal" | when was the episode on which barbara windsor and heston blumenthal guest starred broadcasted | CREATE TABLE table_29135051_3 (
broadcast_date VARCHAR,
guest_s_ VARCHAR
) |
SELECT COUNT(year) FROM table_24430894_20 WHERE mutya_ng_pilipinas_asia_pacific = "Ritchie Ocampo" | List the number of years where ritchie ocampo was the mutya ng pilipinas winner. | CREATE TABLE table_24430894_20 (year VARCHAR, mutya_ng_pilipinas_asia_pacific VARCHAR) |
SELECT move_only FROM table_26538035_1 WHERE developer = "AiLive" | For the game whose developer was Ailive, is it a Move-only release? | CREATE TABLE table_26538035_1 (move_only VARCHAR, developer VARCHAR) |
SELECT SUM("Year") FROM table_71618 WHERE "Chassis" = 'kurtis kraft 500a' | What is the year with a kurtis kraft 500a chassis? | CREATE TABLE table_71618 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
) |
SELECT COUNT(awardee_s_) FROM table_24446718_7 WHERE language = "English and Hindi" | Name the number of awardees for english and hindi | CREATE TABLE table_24446718_7 (awardee_s_ VARCHAR, language VARCHAR) |
SELECT COUNT(title_and_source) FROM table_26538035_1 WHERE developer = "Clover Studio" | How many titles/sources have a developer of Clover Studio? | CREATE TABLE table_26538035_1 (title_and_source VARCHAR, developer VARCHAR) |
SELECT indonesia_super_series_2008 FROM table_2544694_3 WHERE 780000 = "5040.00" | Which series occurred when the 7800 was 5040.00? | CREATE TABLE table_2544694_3 (
indonesia_super_series_2008 VARCHAR
) |
SELECT name_of_award FROM table_24446718_7 WHERE awardee_s_ = "Zubeen Garg" | Name the name of award for zubeen garg | CREATE TABLE table_24446718_7 (name_of_award VARCHAR, awardee_s_ VARCHAR) |
SELECT title_and_source FROM table_26538035_1 WHERE developer = "Hydravision Entertainment" | What is the title and source for the game developed by Hydravision Entertainment? | CREATE TABLE table_26538035_1 (title_and_source VARCHAR, developer VARCHAR) |
SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%Thermodynamics and Kinetics%' OR name LIKE '%Thermodynamics and Kinetics%') AND credits = 9 | Which Thermodynamics and Kinetics courses are worth 9 credits ? | CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
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 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 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 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 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 program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
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 gsi (
course_offering_id int,
student_id int
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
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
) |
SELECT awardee_s_ FROM table_24446718_7 WHERE name_of_award = "Best Editing" | Name the awardee for best editing | CREATE TABLE table_24446718_7 (awardee_s_ VARCHAR, name_of_award VARCHAR) |
SELECT series__number FROM table_2655016_9 WHERE original_air_date = "September 21, 2002" | What is the series # on airdate September 21, 2002? | CREATE TABLE table_2655016_9 (series__number VARCHAR, original_air_date VARCHAR) |
SELECT tally FROM table_name_12 WHERE opposition = "derry" AND total = 14 | What is the tally when the opposition is Derry, and total is 14? | CREATE TABLE table_name_12 (
tally VARCHAR,
opposition VARCHAR,
total VARCHAR
) |
SELECT COUNT(awardee_s_) FROM table_24446718_7 WHERE name_of_award = "Best Cinematography" | Name the number of awardees for best cinematography | CREATE TABLE table_24446718_7 (awardee_s_ VARCHAR, name_of_award VARCHAR) |
SELECT title FROM table_26565917_2 WHERE no_in_season = 5 | what was the name of episode 5? | CREATE TABLE table_26565917_2 (title VARCHAR, no_in_season VARCHAR) |
SELECT "Opponent" FROM table_71198 WHERE "Time" = '1:34' | Which opponent has a Time of 1:34? | CREATE TABLE table_71198 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) |
SELECT MIN(flaps) FROM table_24466191_1 | Name the least flaps | CREATE TABLE table_24466191_1 (flaps INTEGER) |
SELECT original_air_date FROM table_26565917_2 WHERE us_viewers__millions_ = "14.55" | when did 14.55 people watch? | CREATE TABLE table_26565917_2 (original_air_date VARCHAR, us_viewers__millions_ VARCHAR) |
SELECT Id, DisplayName, Reputation, WebsiteUrl, Location FROM Users WHERE Location LIKE '%Michigan%' ORDER BY Reputation DESC LIMIT 150 | TOP 50 users from Michigan. Lists the top 50 users (ranked by reputation) that are located in Calicut/Kozhikode, Kerala, India according to their profile information.
Thanks to http://data.stackexchange.com/stackoverflow/qe/1157/top-100-users-from-greece | 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 ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name 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 ReviewTaskTypes (
Id number,
Name text,
Description 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
)
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 SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE ReviewTaskStates (
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 ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
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 Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
) |
SELECT MAX(poles) FROM table_24466191_1 WHERE series = "Macau Grand Prix" | Name th most poles for macau grand prix | CREATE TABLE table_24466191_1 (poles INTEGER, series VARCHAR) |
SELECT MIN(top_10) FROM table_26609690_1 | What is the smallest top 10 figure? | CREATE TABLE table_26609690_1 (top_10 INTEGER) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "13" AND procedures.short_title = "Endosc destr stomach les" | give me the number of patients who had endoscopic excision or destruction of lesion or tissue of stomach and were hospitalized for more than 13 days. | 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 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
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) |
SELECT COUNT(races) FROM table_24466191_1 WHERE position = "15th" | Name the total number of races for 15th position | CREATE TABLE table_24466191_1 (races VARCHAR, position VARCHAR) |
SELECT MIN(year) FROM table_26609690_1 | What is the earliest year on the chart? | CREATE TABLE table_26609690_1 (year INTEGER) |
SELECT "Race caller" FROM table_25080 WHERE "s Host" = 'Jim McKay and Al Michaels' AND "Year" = '1987' | Who is the race caller when jim mckay and al michaels were s hosts in the year 1987? | CREATE TABLE table_25080 (
"Year" real,
"Network" text,
"Race caller" text,
"s Host" text,
"s Analyst" text,
"Reporters" text,
"Trophy presentation" text
) |
SELECT MAX(races) FROM table_24466191_1 WHERE flaps > 2.0 | Name the most races for flaps larger than 2.0 | CREATE TABLE table_24466191_1 (races INTEGER, flaps INTEGER) |
SELECT team_s_ FROM table_26609690_1 WHERE winnings = "$15,785" | Which team had $15,785 in winnings? | CREATE TABLE table_26609690_1 (team_s_ VARCHAR, winnings VARCHAR) |
SELECT dept_name FROM department ORDER BY dept_name | list names of all departments ordered by their names. | CREATE TABLE department (
dept_name VARCHAR
) |
SELECT COUNT(poles) FROM table_24466191_1 WHERE position = "15th" | Name the number of poles for 15th position | CREATE TABLE table_24466191_1 (poles VARCHAR, position VARCHAR) |
SELECT COUNT(position) FROM table_26609690_1 WHERE team_s_ = "RB1 Motorsports" | How many positions are there for RB1 Motorsports? | CREATE TABLE table_26609690_1 (position VARCHAR, team_s_ VARCHAR) |
SELECT grid FROM table_name_79 WHERE time_retired = "+27.112" | what is the grid when the time/retired is +27.112? | CREATE TABLE table_name_79 (
grid VARCHAR,
time_retired VARCHAR
) |
SELECT team FROM table_24466191_1 WHERE season = 2010 | Name the team for season 2010 | CREATE TABLE table_24466191_1 (team VARCHAR, season VARCHAR) |
SELECT MAX(wins) FROM table_26609690_1 | What is the highest number of wins? | CREATE TABLE table_26609690_1 (wins INTEGER) |
SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 40 AND 49) AND DATETIME(treatment.treatmenttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY treatment.treatmentname) AS t1 WHERE t1.c1 <= 3 | among the patients of age 40s a year before, what was the top three most frequent procedure? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
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 diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime 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 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 vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
) |
SELECT original_air_date FROM table_24466855_1 WHERE written_by = "Jay J. Demopoulos" | Name the air date for jay j. demopoulos | CREATE TABLE table_24466855_1 (original_air_date VARCHAR, written_by VARCHAR) |
SELECT team AS captain FROM table_26593762_2 WHERE team = "Cardiff City" | Who is the captain of Cardiff City? | CREATE TABLE table_26593762_2 (team VARCHAR) |
SELECT "Visitor" FROM table_39669 WHERE "Home" = 'pittsburgh penguins' AND "Time" = '7:00 pm' AND "Record" = '0-2-2' | Who was the visitor at the pittsburgh penguins at 7:00 pm that had a record of 0-2-2? | CREATE TABLE table_39669 (
"Date" text,
"Time" text,
"Visitor" text,
"Score" text,
"Home" text,
"Location/Attendance" text,
"Record" text
) |
SELECT game_site FROM table_24481478_1 WHERE attendance = 29753 | At which location did 29753 fans show up to watch the game? | CREATE TABLE table_24481478_1 (game_site VARCHAR, attendance VARCHAR) |
SELECT team AS captain FROM table_26593762_2 WHERE manager = "Neil Warnock" | Who is the captain of Neil Warnock's team? | CREATE TABLE table_26593762_2 (team VARCHAR, manager VARCHAR) |
SELECT result FROM table_name_8 WHERE date = "november 22" | What was the score of the game on November 22? | CREATE TABLE table_name_8 (
result VARCHAR,
date VARCHAR
) |
SELECT team_record FROM table_24481478_1 WHERE week = 7 | What was the game record during week 7? | CREATE TABLE table_24481478_1 (team_record VARCHAR, week VARCHAR) |
SELECT team AS captain FROM table_26593762_2 WHERE manager = "Dave Jones" | Who is the captain of Dave Jones' team? | CREATE TABLE table_26593762_2 (team VARCHAR, manager VARCHAR) |
SELECT "lead vocalist" FROM table_203_629 WHERE "title" = '"sweat it out"' | who was the lead vocalist in sweat it out ? | CREATE TABLE table_203_629 (
id number,
"year" number,
"title" text,
"lead vocalist" text,
"aria chart position" number,
"album" text
) |
SELECT kickoff FROM table_24481478_1 WHERE date = "Saturday, April 20" | What time did the game start on saturday, april 20? | CREATE TABLE table_24481478_1 (kickoff VARCHAR, date VARCHAR) |
SELECT chairman FROM table_26593762_2 WHERE manager = "Mark Robins" | Who is the chairman of Mark Robins team? | CREATE TABLE table_26593762_2 (chairman VARCHAR, manager VARCHAR) |
SELECT partner FROM table_name_94 WHERE opponents_in_the_final = "serena williams venus williams" | Who was the partner that played against Serena Williams Venus Williams? | CREATE TABLE table_name_94 (
partner VARCHAR,
opponents_in_the_final VARCHAR
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.