answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT "2013" FROM table_33981 WHERE "2007" = 'a' AND "Tournament" = 'french open' | Which 2013 has a 2007 of A, and a Tournament of french open? | CREATE TABLE table_33981 (
"Tournament" text,
"2006" text,
"2007" text,
"2008-12" text,
"2013" text
) |
SELECT report FROM table_name_33 WHERE winning_driver = "peter collins" AND circuit = "syracuse" | Which report has a Winning driver of peter collins, and a Circuit of syracuse? | CREATE TABLE table_name_33 (report VARCHAR, winning_driver VARCHAR, circuit VARCHAR) |
SELECT year FROM table_21756039_1 WHERE overall = "29-4" | In which year is the overall 29-4? | CREATE TABLE table_21756039_1 (year VARCHAR, overall VARCHAR) |
SELECT "Air Date" FROM table_61841 WHERE "Rating" = 'n/a' AND "Weekly Winner" = 'wedding dj chris dixon' | What is Air Date, when Rating is 'N/A', and when Weekly Winner is 'Wedding DJ Chris Dixon'? | CREATE TABLE table_61841 (
"Air Date" text,
"Rating" text,
"18-49" text,
"Viewers" text,
"Weekly Winner" text
) |
SELECT appointed_by FROM table_name_73 WHERE judge = "edward e. cushman" | Who appointed Judge Edward E. Cushman? | CREATE TABLE table_name_73 (appointed_by VARCHAR, judge VARCHAR) |
SELECT regular_season_results FROM table_21756039_1 WHERE year = "2011-2012" | What is the regular season results for the year 2011-2012? | CREATE TABLE table_21756039_1 (regular_season_results VARCHAR, year VARCHAR) |
SELECT mccain__percentage FROM table_20278716_2 WHERE county = "Burlington" | What percentage of voters choise McCain in Burlington? | CREATE TABLE table_20278716_2 (
mccain__percentage VARCHAR,
county VARCHAR
) |
SELECT Chief AS judge FROM table_name_37 WHERE judge = "jack edward tanner" | Who was Judge Jack Edward Tanner's chief judge? | CREATE TABLE table_name_37 (Chief VARCHAR, judge VARCHAR) |
SELECT COUNT(driver) FROM table_2175858_1 WHERE race_time = "3:09:45" | How many drivers had a time of 3:09:45? | CREATE TABLE table_2175858_1 (driver VARCHAR, race_time VARCHAR) |
SELECT "Result" FROM table_15626 WHERE "Score" = '8-1' | What is the result when the score is 8-1? | CREATE TABLE table_15626 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) |
SELECT date_of_birth__age_ FROM table_name_41 WHERE caps = 11 AND position = "prop" | What is the date of birth of the player that has 11 caps and plays the prop position? | CREATE TABLE table_name_41 (date_of_birth__age_ VARCHAR, caps VARCHAR, position VARCHAR) |
SELECT COUNT(driver) FROM table_2175858_1 WHERE laps = "300" AND average_speed__mph_ = "103.594" | How many drivers drove 300 laps at average speed of 103.594? | CREATE TABLE table_2175858_1 (driver VARCHAR, laps VARCHAR, average_speed__mph_ VARCHAR) |
SELECT 2009 FROM table_name_19 WHERE 2010 = "52-75" | What 2009 has 52-75 as the 2010? | CREATE TABLE table_name_19 (
Id VARCHAR
) |
SELECT club_province FROM table_name_49 WHERE caps = 12 | What club or province is the player with 12 caps from? | CREATE TABLE table_name_49 (club_province VARCHAR, caps VARCHAR) |
SELECT COUNT(date) FROM table_2175858_1 WHERE average_speed__mph_ = "102.003" | How many dates had an average speed of 102.003? | CREATE TABLE table_2175858_1 (date VARCHAR, average_speed__mph_ VARCHAR) |
SELECT COUNT(pick) FROM table_2840500_3 WHERE college_junior_club_team = "HC Dukla Trenčín (Slovakia)" | what is the number of the chosen club where the hc dukla tren n (slovakia) is from | CREATE TABLE table_2840500_3 (
pick VARCHAR,
college_junior_club_team VARCHAR
) |
SELECT position FROM table_name_47 WHERE club_province = "newcastle" AND caps < 24 AND player = "toby flood" | What position does Toby Flood, who is from Newcastle and has fewer than 24 caps, play? | CREATE TABLE table_name_47 (position VARCHAR, player VARCHAR, club_province VARCHAR, caps VARCHAR) |
SELECT laps FROM table_2175858_1 WHERE year = 2009 | How many laps were driven in 2009? | CREATE TABLE table_2175858_1 (laps VARCHAR, year VARCHAR) |
SELECT T2.name FROM film AS T1 JOIN language AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK' | What is the name of the language that the film 'AIRPORT POLLOCK' is in? | CREATE TABLE address (
address_id number,
address text,
address2 text,
district text,
city_id number,
postal_code text,
phone text,
last_update time
)
CREATE TABLE inventory (
inventory_id number,
film_id number,
store_id number,
last_update time
)
CREATE TABLE film (
film_id number,
title text,
description text,
release_year time,
language_id number,
original_language_id number,
rental_duration number,
rental_rate number,
length number,
replacement_cost number,
rating text,
special_features text,
last_update time
)
CREATE TABLE city (
city_id number,
city text,
country_id number,
last_update time
)
CREATE TABLE payment (
payment_id number,
customer_id number,
staff_id number,
rental_id number,
amount number,
payment_date time,
last_update time
)
CREATE TABLE film_category (
film_id number,
category_id number,
last_update time
)
CREATE TABLE category (
category_id number,
name text,
last_update time
)
CREATE TABLE customer (
customer_id number,
store_id number,
first_name text,
last_name text,
email text,
address_id number,
active boolean,
create_date time,
last_update time
)
CREATE TABLE language (
language_id number,
name text,
last_update time
)
CREATE TABLE staff (
staff_id number,
first_name text,
last_name text,
address_id number,
picture others,
email text,
store_id number,
active boolean,
username text,
password text,
last_update time
)
CREATE TABLE actor (
actor_id number,
first_name text,
last_name text,
last_update time
)
CREATE TABLE country (
country_id number,
country text,
last_update time
)
CREATE TABLE film_text (
film_id number,
title text,
description text
)
CREATE TABLE store (
store_id number,
manager_staff_id number,
address_id number,
last_update time
)
CREATE TABLE rental (
rental_id number,
rental_date time,
inventory_id number,
customer_id number,
return_date time,
staff_id number,
last_update time
)
CREATE TABLE film_actor (
actor_id number,
film_id number,
last_update time
) |
SELECT winningteam FROM table_name_76 WHERE losingteam = "newcastle breakers" | Which team beat the Newcastle Breakers? | CREATE TABLE table_name_76 (winningteam VARCHAR, losingteam VARCHAR) |
SELECT laps FROM table_2175858_1 WHERE race_time = "3:03:50" | How many laps were completed in the race with time of 3:03:50? | CREATE TABLE table_2175858_1 (laps VARCHAR, race_time VARCHAR) |
SELECT COUNT(closure_for_signature) FROM table_2001348_1 WHERE field = "Sea (revised)" | How many inputs are there in the 'closure for signature' tab under the field 'sea (revised)'? | CREATE TABLE table_2001348_1 (
closure_for_signature VARCHAR,
field VARCHAR
) |
SELECT losingteam FROM table_name_82 WHERE cup_finaldate = "20 august 1989" | What team lost on 20 August 1989? | CREATE TABLE table_name_82 (losingteam VARCHAR, cup_finaldate VARCHAR) |
SELECT miles__km_ FROM table_2175858_1 WHERE average_speed__mph_ = "116.81" | How many miles were driven with the average speed at 116.81? | CREATE TABLE table_2175858_1 (miles__km_ VARCHAR, average_speed__mph_ VARCHAR) |
SELECT AVG("Gold") FROM table_8934 WHERE "Silver" > '1' AND "Bronze" < '2' | What's the average amount of Gold medals won when there were more than 1 silver medal won and less than 2 bronze medals won. | CREATE TABLE table_8934 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) |
SELECT cup_finaldate FROM table_name_44 WHERE winningteam = "brisbane lions (1)" | On what date did the Brisbane Lions (1) win? | CREATE TABLE table_name_44 (cup_finaldate VARCHAR, winningteam VARCHAR) |
SELECT season_no FROM table_21781578_2 WHERE production_code = "E2110" | What was the season number for production code E2110? | CREATE TABLE table_21781578_2 (season_no VARCHAR, production_code VARCHAR) |
SELECT AVG(a."accept_rate") AS "average_accept_rate" FROM (SELECT p.OwnerUserId, CAST(CAST(COUNT(p.AcceptedAnswerId) AS FLOAT) / CAST(COUNT(p.Id) AS FLOAT) * 100 AS FLOAT(5, 2)) AS "accept_rate" FROM Posts AS p WHERE p.PostTypeId = 1 AND p.ClosedDate IS NULL AND p.CommunityOwnedDate IS NULL AND p.AnswerCount > 0 AND (NOT p.OwnerUserId IS NULL AND p.OwnerUserId != '') GROUP BY p.OwnerUserId HAVING COUNT(p.Id) >= 4) AS a | Average accept rate (for the whole site). The average accept rate among all users of the target site. | CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE VoteTypes (
Id number,
Name 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 PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
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 Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE ReviewTaskStates (
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 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 PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
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 Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount 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 CloseReasonTypes (
Id number,
Name text,
Description 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 FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
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
) |
SELECT winningteam FROM table_name_20 WHERE cup_final_attendance = "8,132" | What was the winning team with the 8,132 final attendance? | CREATE TABLE table_name_20 (winningteam VARCHAR, cup_final_attendance VARCHAR) |
SELECT original_air_date FROM table_21781578_2 WHERE season_no = 2 | What was the original air date for season number 2? | CREATE TABLE table_21781578_2 (original_air_date VARCHAR, season_no VARCHAR) |
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'cpap/peep therapy - 5-10 cm h2o' AND DATETIME(treatment.treatmenttime) >= DATETIME(CURRENT_TIME(), '-4 year')) AS t1 JOIN (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'k-dur 20' AND DATETIME(medication.drugstarttime) >= DATETIME(CURRENT_TIME(), '-4 year')) AS t2 WHERE t1.treatmenttime < t2.drugstarttime AND DATETIME(t1.treatmenttime, 'start of month') = DATETIME(t2.drugstarttime, 'start of month') | how many patients were prescribed k-dur 20 during the same month after their cpap/peep therapy - 5-10 cm h2o, since 4 years ago? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
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 allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
) |
SELECT attendance FROM table_name_48 WHERE date = "august 2" | What was the attendance on August 2? | CREATE TABLE table_name_48 (attendance VARCHAR, date VARCHAR) |
SELECT season_no FROM table_21781578_2 WHERE directed_by = "John David Coles" | What was the season number episode directed by John David Coles? | CREATE TABLE table_21781578_2 (season_no VARCHAR, directed_by VARCHAR) |
SELECT demographic.admission_type, demographic.days_stay FROM demographic WHERE demographic.name = "Charley Pescatore" | what is admission type and days of hospital stay of subject name charley pescatore? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) |
SELECT date FROM table_name_62 WHERE attendance = "31,220" | What is the date where the attendance was 31,220? | CREATE TABLE table_name_62 (date VARCHAR, attendance VARCHAR) |
SELECT us_viewers__millions_ FROM table_21781578_2 WHERE directed_by = "Steve Shill" AND production_code = "E2102" | What was the number of US Viewers in the episode directed by Steve Shill and having a production code of E2102? | CREATE TABLE table_21781578_2 (us_viewers__millions_ VARCHAR, directed_by VARCHAR, production_code VARCHAR) |
SELECT "Team #2" FROM table_26339 WHERE "Team #1" = 'River Plate' | Name the team #2 for river plate | CREATE TABLE table_26339 (
"Team #1" text,
"Points" text,
"Team #2" text,
"1st leg" text,
"2nd leg" text
) |
SELECT record FROM table_name_8 WHERE date = "august 4" | What was the team's record on August 4? | CREATE TABLE table_name_8 (record VARCHAR, date VARCHAR) |
SELECT COUNT(season_no) FROM table_21781578_2 WHERE us_viewers__millions_ = "12.30" | What was the number of season number entries that had US Viewers of 12.30 million? | CREATE TABLE table_21781578_2 (season_no VARCHAR, us_viewers__millions_ VARCHAR) |
SELECT Name, COUNT(*) FROM Projects AS T1 JOIN AssignedTo AS T2 ON T1.Code = T2.Project WHERE T1.Hours > 300 GROUP BY T1.Name | Find the number of scientists involved for the projects that require more than 300 hours. Show a pie chart. | CREATE TABLE AssignedTo (
Scientist int,
Project char(4)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50),
Hours int
)
CREATE TABLE Scientists (
SSN int,
Name Char(30)
) |
SELECT date FROM table_name_84 WHERE attendance = "48,041" | What was the date when the attendance was 48,041? | CREATE TABLE table_name_84 (date VARCHAR, attendance VARCHAR) |
SELECT date FROM table_21761882_4 WHERE week = 3 | What was the date of the game in week 3? | CREATE TABLE table_21761882_4 (date VARCHAR, week VARCHAR) |
SELECT written_by FROM table_24961421_1 WHERE us_viewers__millions_ = "12.15" | Who wrote the episode that had 12.15 million viewers? | CREATE TABLE table_24961421_1 (
written_by VARCHAR,
us_viewers__millions_ VARCHAR
) |
SELECT opponents_in_the_final FROM table_name_44 WHERE partnering = "ricardo hocevar" | Who are the finals opponents for the match with partner Ricardo Hocevar? | CREATE TABLE table_name_44 (opponents_in_the_final VARCHAR, partnering VARCHAR) |
SELECT final_score FROM table_21761882_4 WHERE opponent = "@ Roughriders" | What was the final score when the game was @ roughriders? | CREATE TABLE table_21761882_4 (final_score VARCHAR, opponent VARCHAR) |
SELECT MIN("Attendance") FROM table_77195 WHERE "Date" = 'september 29, 1968' AND "Week" < '3' | Which Attendance has a Date of september 29, 1968, and a Week smaller than 3? | CREATE TABLE table_77195 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) |
SELECT opponents_in_the_final FROM table_name_4 WHERE date = "june 23, 2003" | Who were the opponents of the final on June 23, 2003? | CREATE TABLE table_name_4 (opponents_in_the_final VARCHAR, date VARCHAR) |
SELECT COUNT(week) FROM table_21761882_4 WHERE location = "Ivor Wynne Stadium" | What was the total number of weeks where the game played Ivor Wynne Stadium? | CREATE TABLE table_21761882_4 (week VARCHAR, location VARCHAR) |
SELECT T2.Name, T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID | Show the names of members and the location of the performances they attended. | CREATE TABLE member_attendance (
Member_ID VARCHAR,
Performance_ID VARCHAR
)
CREATE TABLE performance (
Location VARCHAR,
Performance_ID VARCHAR
)
CREATE TABLE member (
Name VARCHAR,
Member_ID VARCHAR
) |
SELECT home_team FROM table_name_37 WHERE venue = "glenferrie oval" | Who was the home side at glenferrie oval? | CREATE TABLE table_name_37 (home_team VARCHAR, venue VARCHAR) |
SELECT location FROM table_21761882_4 WHERE opponent = "@ Roughriders" | What was the location for when the opponent was @ roughriders? | CREATE TABLE table_21761882_4 (location VARCHAR, opponent VARCHAR) |
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hypertension' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')) AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime, patient.patienthealthsystemstayid FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE DATETIME(medication.drugstarttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')) AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.diagnosistime < t2.drugstarttime AND t1.patienthealthsystemstayid = t2.patienthealthsystemstayid GROUP BY t2.drugname) AS t3 WHERE t3.c1 <= 5 | during this year, what are the top five most frequently prescribed drugs to patients within the same hospital visit after they are diagnosed with hypertension? | 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 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
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime 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 intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
) |
SELECT written_by FROM table_name_2 WHERE episode__number = "38 (16)" | Who is the author of Episode 38 (16)? | CREATE TABLE table_name_2 (written_by VARCHAR, episode__number VARCHAR) |
SELECT final_score FROM table_21761882_4 WHERE attendance = 25598 | What was the final score when the attendance was 25598? | CREATE TABLE table_21761882_4 (final_score VARCHAR, attendance VARCHAR) |
SELECT T2.organisation_details, T1.organisation_id FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_details | A pie chart about what are the ids and details for all organizations that have grants of more than 6000 dollars? | CREATE TABLE Organisation_Types (
organisation_type VARCHAR(10),
organisation_type_description VARCHAR(255)
)
CREATE TABLE Research_Outcomes (
outcome_code VARCHAR(10),
outcome_description VARCHAR(255)
)
CREATE TABLE Project_Staff (
staff_id DOUBLE,
project_id INTEGER,
role_code VARCHAR(10),
date_from DATETIME,
date_to DATETIME,
other_details VARCHAR(255)
)
CREATE TABLE Research_Staff (
staff_id INTEGER,
employer_organisation_id INTEGER,
staff_details VARCHAR(255)
)
CREATE TABLE Projects (
project_id INTEGER,
organisation_id INTEGER,
project_details VARCHAR(255)
)
CREATE TABLE Organisations (
organisation_id INTEGER,
organisation_type VARCHAR(10),
organisation_details VARCHAR(255)
)
CREATE TABLE Document_Types (
document_type_code VARCHAR(10),
document_description VARCHAR(255)
)
CREATE TABLE Tasks (
task_id INTEGER,
project_id INTEGER,
task_details VARCHAR(255),
"eg Agree Objectives" VARCHAR(1)
)
CREATE TABLE Grants (
grant_id INTEGER,
organisation_id INTEGER,
grant_amount DECIMAL(19,4),
grant_start_date DATETIME,
grant_end_date DATETIME,
other_details VARCHAR(255)
)
CREATE TABLE Documents (
document_id INTEGER,
document_type_code VARCHAR(10),
grant_id INTEGER,
sent_date DATETIME,
response_received_date DATETIME,
other_details VARCHAR(255)
)
CREATE TABLE Project_Outcomes (
project_id INTEGER,
outcome_code VARCHAR(10),
outcome_details VARCHAR(255)
)
CREATE TABLE Staff_Roles (
role_code VARCHAR(10),
role_description VARCHAR(255)
) |
SELECT original_airdate FROM table_name_65 WHERE episode__number = "29 (7)" | When did Episode 29 (7) originally air? | CREATE TABLE table_name_65 (original_airdate VARCHAR, episode__number VARCHAR) |
SELECT location FROM table_21761882_4 WHERE date = "October 6" | What location was the game on October 6? | CREATE TABLE table_21761882_4 (location VARCHAR, date VARCHAR) |
SELECT mass FROM table_name_54 WHERE designation = "prognoz 2" | What is Mass, when Designation is Prognoz 2? | CREATE TABLE table_name_54 (
mass VARCHAR,
designation VARCHAR
) |
SELECT episode__number FROM table_name_23 WHERE original_airdate = "april 5, 1998" | What is the episode # of the episode that aired on April 5, 1998? | CREATE TABLE table_name_23 (episode__number VARCHAR, original_airdate VARCHAR) |
SELECT MIN(ranking) FROM table_217785_2 WHERE viewers__in_millions_of_households_ = "11.2" | What's the lowest rating with 11.2 million viewers? | CREATE TABLE table_217785_2 (ranking INTEGER, viewers__in_millions_of_households_ VARCHAR) |
SELECT year__ceremony_ FROM table_17025328_1 WHERE original_title = "Le Confessional" | Name the year for le confessional | CREATE TABLE table_17025328_1 (
year__ceremony_ VARCHAR,
original_title VARCHAR
) |
SELECT written_by FROM table_name_42 WHERE original_airdate = "march 1, 1998" | Who wrote the episode that originally aired on March 1, 1998? | CREATE TABLE table_name_42 (written_by VARCHAR, original_airdate VARCHAR) |
SELECT season AS finale FROM table_217785_2 WHERE ranking = 73 | When did the season finale ranked at 73 first air? | CREATE TABLE table_217785_2 (season VARCHAR, ranking VARCHAR) |
SELECT MAX("Year") FROM table_74595 WHERE "Winner" = 'phil anderson' | What is the latest year when Phil Anderson won? | CREATE TABLE table_74595 (
"Year" real,
"Race name" text,
"Rider status" text,
"Winner" text,
"Team/Country" text
) |
SELECT tournament FROM table_name_35 WHERE 2000 = "3r" | what tournament has 2000 of 3r? | CREATE TABLE table_name_35 (tournament VARCHAR) |
SELECT COUNT(tv_season) FROM table_217785_2 WHERE viewers__in_millions_of_households_ = "10.2" | Which season received 10.2 million viewers? | CREATE TABLE table_217785_2 (tv_season VARCHAR, viewers__in_millions_of_households_ VARCHAR) |
SELECT DISTINCT instructor.name, program_course.workload FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN program_course ON program_course.course_id = course_offering.course_id WHERE program_course.category LIKE '%PreMajor%' AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 WHERE PROGRAM_COURSEalias1.category LIKE '%PreMajor%') | What teacher has the easiest course for PreMajor ? | CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction 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 offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
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 requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year 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 jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location 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 gsi (
course_offering_id int,
student_id 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 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 2001 FROM table_name_42 WHERE 1991 = "4r" | what 2001 has 1991 of 4r? | CREATE TABLE table_name_42 (Id VARCHAR) |
SELECT name FROM table_21795986_1 WHERE withdrawn = "19/05/2002" | When 19/05/2002 is the date of withdrawn what is the name? | CREATE TABLE table_21795986_1 (name VARCHAR, withdrawn VARCHAR) |
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 10 AND program_course.category LIKE 'ULCS' | In upper-level classes , which ones are 10 credits ? | CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req 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 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 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 jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE area (
course_id int,
area 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 program_course (
program_id int,
course_id int,
workload int,
category 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
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
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 instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
) |
SELECT 1989 FROM table_name_22 WHERE 2002 = "4r" AND 2005 = "4r" | what 1989 has 2002 of 4r and 2005 of 4r? | CREATE TABLE table_name_22 (Id VARCHAR) |
SELECT MIN(year) FROM table_21795986_1 WHERE original_number = "2008 T" | When 2008 t is the original number what is the lowest year? | CREATE TABLE table_21795986_1 (year INTEGER, original_number VARCHAR) |
SELECT MIN(wins) FROM table_2216245_2 | What is his lowest number of wins? | CREATE TABLE table_2216245_2 (
wins INTEGER
) |
SELECT away_team AS score FROM table_name_34 WHERE crowd > 28 OFFSET 536 | What team played in front of 28,536 at an away stadium? | CREATE TABLE table_name_34 (away_team VARCHAR, crowd INTEGER) |
SELECT original_number FROM table_21795986_1 WHERE withdrawn = "9/07/1999" | When 9/07/1999 is the date of withdrawn what is the original number? | CREATE TABLE table_21795986_1 (original_number VARCHAR, withdrawn VARCHAR) |
SELECT "English gloss" FROM table_72621 WHERE "Santee-Sisseton" = 'haŋȟ’áŋna' | Name the english gloss for ha na | CREATE TABLE table_72621 (
"English gloss" text,
"Santee-Sisseton" text,
"Yankton-Yanktonai" text,
"Northern Lakota" text,
"Southern Lakota" text
) |
SELECT home_team AS score FROM table_name_25 WHERE home_team = "fitzroy" | What was Fitzroy score at their home stadium? | CREATE TABLE table_name_25 (home_team VARCHAR) |
SELECT stage__winner_ FROM table_21804557_18 WHERE metas_volantes_classification = "Michael Albasini" | WHO WAS THE STAGE WINNER IN THE STAGE WHERE MICHAEL ALBASINI WON THE METAS VOLANTES CLASSIFICATION? | CREATE TABLE table_21804557_18 (stage__winner_ VARCHAR, metas_volantes_classification VARCHAR) |
SELECT "Site" FROM table_77125 WHERE "Date" = '11/11/1950' | What is the Site when the date is 11/11/1950? | CREATE TABLE table_77125 (
"Date" text,
"Opponent#" text,
"Site" text,
"Result" text,
"Attendance" text
) |
SELECT away_team AS score FROM table_name_43 WHERE home_team = "st kilda" | Who faced off against St Kilda at their home? | CREATE TABLE table_name_43 (away_team VARCHAR, home_team VARCHAR) |
SELECT mountains_classification FROM table_21804557_18 WHERE metas_volantes_classification = "Michael Albasini" | Who got the mountains classification when Michael Albasini won the stage? | CREATE TABLE table_21804557_18 (mountains_classification VARCHAR, metas_volantes_classification VARCHAR) |
SELECT candidate_name FROM table_name_66 WHERE votes > 1853 AND religion = "☪" | Who has a religion of and more than 1853 votes? | CREATE TABLE table_name_66 (
candidate_name VARCHAR,
votes VARCHAR,
religion VARCHAR
) |
SELECT MIN(top_25) FROM table_name_42 WHERE events > 15 | What is the low number of top 25s in an event with over 15 appearances? | CREATE TABLE table_name_42 (top_25 INTEGER, events INTEGER) |
SELECT attendance FROM table_21796261_4 WHERE date = "July 10" | How many people were present at the July 10 game? | CREATE TABLE table_21796261_4 (attendance VARCHAR, date VARCHAR) |
SELECT "Location" FROM table_48363 WHERE "Callsign" = 'dxbl' | What is the Location of the Frequency with a Callsign of DXBL? | CREATE TABLE table_48363 (
"Branding" text,
"Callsign" text,
"Frequency" text,
"Power" text,
"Location" text
) |
SELECT AVG(rank) FROM table_name_8 WHERE day_of_week = "wednesday" AND year < 2012 AND studio_s_ = "reliance entertainment" | What is the average rank of the Reliance Entertainment movie with an opening day on Wednesday before 2012? | CREATE TABLE table_name_8 (rank INTEGER, studio_s_ VARCHAR, day_of_week VARCHAR, year VARCHAR) |
SELECT final_score FROM table_21796261_4 WHERE date = "July 10" | What was the final score of the game played on July 10? | CREATE TABLE table_21796261_4 (final_score VARCHAR, date VARCHAR) |
SELECT "Date" FROM table_69643 WHERE "Surface" = 'hard' AND "Tournament" = 'maybelline classic' AND "Opponent" = 'wendy turnbull' | Name the date for hard surface at maybelline classic with opponent of wendy turnbull | CREATE TABLE table_69643 (
"Tournament" text,
"Date" text,
"Surface" text,
"Round" text,
"Opponent" text
) |
SELECT SUM(opening_day_net_gross) FROM table_name_90 WHERE studio_s_ = "reliance entertainment" AND year < 2011 | What is the opening day net gross a Reliance Entertainment movie before 2011 had? | CREATE TABLE table_name_90 (opening_day_net_gross INTEGER, studio_s_ VARCHAR, year VARCHAR) |
SELECT record FROM table_21796261_4 WHERE location = "BC Place Stadium" | What's the record achieved in the gamed played at BC Place Stadium? | CREATE TABLE table_21796261_4 (record VARCHAR, location VARCHAR) |
SELECT "First elected" FROM table_18308 WHERE "Incumbent" = 'Jerry Huckaby' | What year was Jerry Huckaby first elected? | CREATE TABLE table_18308 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) |
SELECT studio_s_ FROM table_name_89 WHERE movie = "ra.one" | What is the studio of ra.one? | CREATE TABLE table_name_89 (studio_s_ VARCHAR, movie VARCHAR) |
SELECT week FROM table_21796261_4 WHERE date = "July 10" | During what week was the July 10 game played? | CREATE TABLE table_21796261_4 (week VARCHAR, date VARCHAR) |
SELECT COUNT(played) FROM table_name_85 WHERE position = 3 AND points < 15 | Which Played has a Position of 3, and a Points smaller than 15? | CREATE TABLE table_name_85 (
played VARCHAR,
position VARCHAR,
points VARCHAR
) |
SELECT COUNT(year) FROM table_name_78 WHERE day_of_week = "friday" AND rank = 10 | What is the year of the movie with an opening day on Friday with a rank 10? | CREATE TABLE table_name_78 (year VARCHAR, day_of_week VARCHAR, rank VARCHAR) |
SELECT date FROM table_21796261_4 WHERE location = "Taylor Field" | When was the game on Taylor Field played? | CREATE TABLE table_21796261_4 (date VARCHAR, location VARCHAR) |
SELECT COUNT(appearances) FROM table_name_84 WHERE team = "shakhtar donetsk" | How many apperances for shakhtar donetsk? | CREATE TABLE table_name_84 (
appearances VARCHAR,
team VARCHAR
) |
SELECT MIN(sack) FROM table_name_1 WHERE solo = 24 AND tackles > 25.5 AND yards > 0 | What is the lowest Sack with a Solo of 24, with Tackles larger than 25.5, with Yards larger than 0? | CREATE TABLE table_name_1 (sack INTEGER, yards VARCHAR, solo VARCHAR, tackles VARCHAR) |
SELECT 4 AS th_placed FROM table_21808535_1 WHERE winner = "Greg Hancock" | Who placed fourth when the winner was Greg Hancock? | CREATE TABLE table_21808535_1 (winner 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 ((flight.arrival_time <= 1900 AND flight.departure_time > 1200) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code | show me a list of flights from BOSTON to ATLANTA leaving after 1200 and arriving before 1900 | 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 days (
days_code varchar,
day_name varchar
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE compartment_class (
compartment varchar,
class_type 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 ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description 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 dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
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 airline (
airline_code varchar,
airline_name text,
note text
)
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 class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
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 time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE code_description (
code varchar,
description 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
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.