answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT MIN(area__km_2__) FROM table_24574438_1 | Name the least area | CREATE TABLE table_24574438_1 (area__km_2__ INTEGER) |
SELECT replaced_by FROM table_27114708_2 WHERE outgoing_manager = "Alberto Malesani" | For outgoing manager is alberto malesani mention all the applicable replaced by person | CREATE TABLE table_27114708_2 (replaced_by VARCHAR, outgoing_manager VARCHAR) |
SELECT AVG("Lost") FROM table_49511 WHERE "Points" > '3' AND "Played" > '14' | What was the average losses for team with points larger than 3 and played larger thna 14? | CREATE TABLE table_49511 (
"Position" real,
"Name" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Points" real
) |
SELECT COUNT(division_five) FROM table_24575253_4 WHERE division_one = "Westcott" | When westcott is in division one how many leagues are in division 5? | CREATE TABLE table_24575253_4 (division_five VARCHAR, division_one VARCHAR) |
SELECT manner_of_departure FROM table_27114708_2 WHERE team = "Livorno" | For livorno team mention all the manner of departure | CREATE TABLE table_27114708_2 (manner_of_departure VARCHAR, team 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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code | show me the flights from DENVER to PHILADELPHIA again | 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 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 food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name 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 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 compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code 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 month (
month_number int,
month_name text
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE 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_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 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 flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
) |
SELECT division_four FROM table_24575253_4 WHERE division_five = "Godstone" | When godstone is in division five who is in division four? | CREATE TABLE table_24575253_4 (division_four VARCHAR, division_five VARCHAR) |
SELECT title FROM table_27115960_1 WHERE written_by = "Phil Klemmer" AND production_code = "3T6455" | Phil Klemmer wrote all titles and production code is 3t6455. | CREATE TABLE table_27115960_1 (title VARCHAR, written_by VARCHAR, production_code VARCHAR) |
SELECT Name, MIN(Price) FROM Products GROUP BY Name | Bar chart of minimal price from each name | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) |
SELECT season FROM table_24575253_4 WHERE division_four = "Wallington New Foresters" | When the wallington new foresters are in division four what is the season? | CREATE TABLE table_24575253_4 (season VARCHAR, division_four VARCHAR) |
SELECT title FROM table_27115960_1 WHERE no_in_series = 9 | Season 9 all the titles were no. in series. | CREATE TABLE table_27115960_1 (title VARCHAR, no_in_series VARCHAR) |
SELECT SUM(to_par) FROM table_name_23 WHERE country = "united states" AND year_s__won = "1973" | What is the sum of To Par, when Country is 'United States', and when Year(s) Won is '1973'? | CREATE TABLE table_name_23 (
to_par INTEGER,
country VARCHAR,
year_s__won VARCHAR
) |
SELECT COUNT(season) FROM table_24575253_4 WHERE division_two = "Racing Epsom" | When racing epsom is in division two how many seasons are there? | CREATE TABLE table_24575253_4 (season VARCHAR, division_two VARCHAR) |
SELECT COUNT(title) FROM table_27115960_1 WHERE us_viewers__million_ = "7.56" | Title is the total number where u.s. viewers (million) is 7.56. | CREATE TABLE table_27115960_1 (title VARCHAR, us_viewers__million_ VARCHAR) |
SELECT "Qual 2" FROM table_5195 WHERE "Qual 1" = '1:01.630' | What was the qualifying 2 time for the team with a qualifying 1 time of 1:01.630? | CREATE TABLE table_5195 (
"Name" text,
"Team" text,
"Qual 1" text,
"Qual 2" text,
"Best" text
) |
SELECT COUNT(division_three) FROM table_24575253_4 WHERE division_two = "Westcott 1935" | When westcott 1935 is in division two how many leagues are in division three? | CREATE TABLE table_24575253_4 (division_three VARCHAR, division_two VARCHAR) |
SELECT COUNT(written_by) FROM table_27155243_4 WHERE episode__number = 3 | How many items appear in the written by column in episode 3? | CREATE TABLE table_27155243_4 (written_by VARCHAR, episode__number VARCHAR) |
SELECT COUNT("Longitude") FROM table_21059 WHERE "Diameter" = '224.0' | How many longitudes have a diameter of 224.0? | CREATE TABLE table_21059 (
"Name" text,
"Latitude" text,
"Longitude" text,
"Diameter" text,
"Year named" real,
"Namesake" text
) |
SELECT division_one FROM table_24575253_4 WHERE division_four = "Real Holmesdale Reserves" | When real holmesdale reserves is division four who is in division one? | CREATE TABLE table_24575253_4 (division_one VARCHAR, division_four VARCHAR) |
SELECT MAX(episode__number) FROM table_27155243_4 WHERE written_by = "Matt MacLennan" | What episode was written by Matt Maclennan? | CREATE TABLE table_27155243_4 (episode__number INTEGER, written_by VARCHAR) |
SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31696) AND prescriptions.route = 'td' AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m', prescriptions.startdate) = '07' ORDER BY prescriptions.startdate LIMIT 1 | when was the first time that patient 31696 has been prescribed medication via td route in 07/last year? | CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
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 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 microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
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 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
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_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 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_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 outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
) |
SELECT duration FROM table_245801_2 WHERE spacecraft = "Salyut 7 – VE-4 – EVA 1" | When salyut 7 – ve-4 – eva 1 is the spacecraft, what is the duration? | CREATE TABLE table_245801_2 (duration VARCHAR, spacecraft VARCHAR) |
SELECT MAX(total__number) FROM table_27155243_4 WHERE written_by = "Sheri Elwood" | What is largest total number that was written by Sheri Elwood? | CREATE TABLE table_27155243_4 (total__number INTEGER, written_by VARCHAR) |
SELECT so.month AS "month", emacs.count AS "emacs", so.count AS "so" FROM (SELECT CAST(YEAR(p.CreationDate) AS TEXT(4)) + '-' + CAST(MONTH(p.CreationDate) AS TEXT(2)) AS "month", COUNT(*) AS "count" FROM "stackexchange.emacs".dbo.Posts AS p GROUP BY YEAR(p.CreationDate), MONTH(p.CreationDate)) AS emacs JOIN (SELECT CAST(YEAR(p.CreationDate) AS TEXT(4)) + '-' + CAST(MONTH(p.CreationDate) AS TEXT(2)) AS "month", COUNT(*) AS "count" FROM "stackoverflow".dbo.Posts AS p WHERE p.Tags LIKE '%<emacs%' OR p.Tags LIKE '%<elisp>%' OR p.Tags LIKE '%<org-mode>%' GROUP BY YEAR(p.CreationDate), MONTH(p.CreationDate)) AS so ON emacs.month = so.month ORDER BY so.month | Emacs questions across Stack Exchange, per month. Number of questions posted each month about Emacs across Stack Exchange.
All questions from Emacs Stack Exchange are included, as well as questions tagged [emacs*], [elisp] or [org-mode] on other sites. | CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId 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 ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE FlagTypes (
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 Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CREATE TABLE 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 SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange 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 PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
) |
SELECT end___utc FROM table_245801_2 WHERE comments = "First woman EVA" | When first woman eva is the comment what is the end -utc? | CREATE TABLE table_245801_2 (end___utc VARCHAR, comments VARCHAR) |
SELECT originalairdate FROM table_27218002_1 WHERE ratings = "2.19 Million" | Name the air date for ratings of 2.19 million | CREATE TABLE table_27218002_1 (originalairdate VARCHAR, ratings VARCHAR) |
SELECT "Away team" FROM table_8021 WHERE "Home team" = 'bournemouth' | Who was the away team when bournemouth was the home team? | CREATE TABLE table_8021 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) |
SELECT series FROM table_24585157_1 WHERE points = "68" | What series did the racer earn 68 points in? | CREATE TABLE table_24585157_1 (series VARCHAR, points VARCHAR) |
SELECT directed_by FROM table_27218002_1 WHERE originalairdate = "12 July 2010" | Name who directed the air date of 12 july 2010 | CREATE TABLE table_27218002_1 (directed_by VARCHAR, originalairdate VARCHAR) |
SELECT COUNT(number_of_households) FROM table_1840495_2 WHERE per_capita_income = "$30,298" | With a per capita income of $30,298, what was the total number of households? | CREATE TABLE table_1840495_2 (
number_of_households VARCHAR,
per_capita_income VARCHAR
) |
SELECT duration__days_ FROM table_245801_1 WHERE crew = "Georgi Grechko" | Name the duration for georgi grechko | CREATE TABLE table_245801_1 (duration__days_ VARCHAR, crew VARCHAR) |
SELECT MIN(episode__number) FROM table_27218002_1 WHERE written_by = "Jonathan Harvey" | Name the least episode number for jonathan harvey | CREATE TABLE table_27218002_1 (episode__number INTEGER, written_by VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2198" AND diagnoses.short_title = "Aftrcre traum fx low leg" | count the number of patients whose admission year is less than 2198 and diagnoses short title is aftrcre traum fx low leg? | 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
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) |
SELECT flight_up FROM table_245801_1 WHERE landing_date = "10 December 1982 19:02:36 UTC" | Name the flight up for 10 december 1982 19:02:36 utc | CREATE TABLE table_245801_1 (flight_up VARCHAR, landing_date VARCHAR) |
SELECT COUNT(written_by) FROM table_27218002_1 WHERE originalairdate = "26 July 2010" | Name the total number of written by for 26 july 2010 | CREATE TABLE table_27218002_1 (written_by VARCHAR, originalairdate VARCHAR) |
SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, fare, flight, flight_fare WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND date_day.day_number = 3 AND date_day.month_number = 8 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND fare.one_direction_cost = (SELECT MIN(FAREalias1.one_direction_cost) FROM airport_service AS AIRPORT_SERVICEalias2, airport_service AS AIRPORT_SERVICEalias3, city AS CITYalias2, city AS CITYalias3, date_day AS DATE_DAYalias1, days AS DAYSalias1, fare AS FAREalias1, flight AS FLIGHTalias1, flight_fare AS FLIGHT_FAREalias1 WHERE (CITYalias3.city_code = AIRPORT_SERVICEalias3.city_code AND CITYalias3.city_name = 'BALTIMORE' AND DATE_DAYalias1.day_number = 3 AND DATE_DAYalias1.month_number = 8 AND DATE_DAYalias1.year = 1991 AND DAYSalias1.day_name = DATE_DAYalias1.day_name AND FLIGHTalias1.flight_days = DAYSalias1.days_code AND FLIGHTalias1.to_airport = AIRPORT_SERVICEalias3.airport_code) AND CITYalias2.city_code = AIRPORT_SERVICEalias2.city_code AND CITYalias2.city_name = 'DALLAS' AND FLIGHT_FAREalias1.fare_id = FAREalias1.fare_id AND FLIGHTalias1.flight_id = FLIGHT_FAREalias1.flight_id AND FLIGHTalias1.from_airport = AIRPORT_SERVICEalias2.airport_code) AND flight_fare.fare_id = fare.fare_id AND flight.airline_code = airline.airline_code AND flight.flight_id = flight_fare.flight_id | of the flights available from DALLAS to BALTIMORE on 8 3 which airline has the least expensive flight | CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name 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 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 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 food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description 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 flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name 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 time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt 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 airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant 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 code_description (
code varchar,
description text
)
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 flight_leg (
flight_id int,
leg_number int,
leg_flight int
) |
SELECT launch_date FROM table_245801_1 WHERE crew = "Vladimir Lyakhov , Aleksandr Pavlovich Aleksandrov" | Name the launch date for vladimir lyakhov , aleksandr pavlovich aleksandrov | CREATE TABLE table_245801_1 (launch_date VARCHAR, crew VARCHAR) |
SELECT season FROM table_27274566_2 WHERE result = "1–0 (aet)" | Which season had a result of 1–0 (aet)? | CREATE TABLE table_27274566_2 (season VARCHAR, result VARCHAR) |
SELECT demographic.marital_status FROM demographic WHERE demographic.name = "Joseph Dillman" | is joseph dillman single, married, or widowed? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) |
SELECT flight_down FROM table_245801_1 WHERE crew = "Vladimir Vasyutin , Alexander Volkov" | Name the flight down for vladimir vasyutin , alexander volkov | CREATE TABLE table_245801_1 (flight_down VARCHAR, crew VARCHAR) |
SELECT date FROM table_27274566_2 WHERE season = "2007-08" AND away_team = "Kaizer Chiefs" | What is the date in the 2007-08 season where the away team was the kaizer chiefs? | CREATE TABLE table_27274566_2 (date VARCHAR, season VARCHAR, away_team VARCHAR) |
SELECT Calendar_Date, Day_Number FROM Ref_Calendar ORDER BY Calendar_Date DESC | Show all calendar dates and day Numbers in a line chart, sort in desc by the x axis. | CREATE TABLE Document_Locations (
Document_ID INTEGER,
Location_Code CHAR(15),
Date_in_Location_From DATETIME,
Date_in_Locaton_To DATETIME
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
)
CREATE TABLE Ref_Locations (
Location_Code CHAR(15),
Location_Name VARCHAR(255),
Location_Description VARCHAR(255)
)
CREATE TABLE All_Documents (
Document_ID INTEGER,
Date_Stored DATETIME,
Document_Type_Code CHAR(15),
Document_Name CHAR(255),
Document_Description CHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Ref_Calendar (
Calendar_Date DATETIME,
Day_Number INTEGER
)
CREATE TABLE Documents_to_be_Destroyed (
Document_ID INTEGER,
Destruction_Authorised_by_Employee_ID INTEGER,
Destroyed_by_Employee_ID INTEGER,
Planned_Destruction_Date DATETIME,
Actual_Destruction_Date DATETIME,
Other_Details VARCHAR(255)
)
CREATE TABLE Employees (
Employee_ID INTEGER,
Role_Code CHAR(15),
Employee_Name VARCHAR(255),
Gender_MFU CHAR(1),
Date_of_Birth DATETIME,
Other_Details VARCHAR(255)
)
CREATE TABLE Roles (
Role_Code CHAR(15),
Role_Name VARCHAR(255),
Role_Description VARCHAR(255)
) |
SELECT COUNT(duration__days_) FROM table_245801_1 WHERE crew = "Vladimir Vasyutin , Alexander Volkov" | Name the duration for vladimir vasyutin , alexander volkov | CREATE TABLE table_245801_1 (duration__days_ VARCHAR, crew VARCHAR) |
SELECT COUNT(date) FROM table_27274566_2 WHERE home_team = "Orlando Pirates" AND result = "1–3" | How many dates are shown for the home team of orlando pirates and result of 1–3? | CREATE TABLE table_27274566_2 (date VARCHAR, home_team VARCHAR, result VARCHAR) |
SELECT Clean_Jerk, Total FROM body_builder | Visualize a scatter chart about the correlation between Clean_Jerk and Total . | CREATE TABLE people (
People_ID int,
Name text,
Height real,
Weight real,
Birth_Date text,
Birth_Place text
)
CREATE TABLE body_builder (
Body_Builder_ID int,
People_ID int,
Snatch real,
Clean_Jerk real,
Total real
) |
SELECT team FROM table_24584486_1 WHERE points = 38 | What team was he on the year he had 38 points? | CREATE TABLE table_24584486_1 (team VARCHAR, points VARCHAR) |
SELECT division FROM table_27274566_2 WHERE result = "0–2" | What is the division where the result was 0–2? | CREATE TABLE table_27274566_2 (division VARCHAR, result VARCHAR) |
SELECT COUNT(*) FROM table_204_147 WHERE "attendance" > 30000 | how many games had an attendance of more than 30,000 ? | CREATE TABLE table_204_147 (
id number,
"#" number,
"date" text,
"opponent" text,
"score" text,
"win" text,
"loss" text,
"save" text,
"attendance" number,
"record" text
) |
SELECT MIN(wins) FROM table_24584486_1 WHERE poles = 10 | What was the least amount of wins when he had 10 poles? | CREATE TABLE table_24584486_1 (wins INTEGER, poles VARCHAR) |
SELECT date FROM table_27274566_2 WHERE home_team = "Kaizer Chiefs" AND division = "MTN 8 Semi-final" | What is the date where the home team was kaizer chiefs and the division was mtn 8 semi-final? | CREATE TABLE table_27274566_2 (date VARCHAR, home_team VARCHAR, division VARCHAR) |
SELECT COUNT("Average") FROM table_49940 WHERE "Team" = 'england' AND "Wickets" < '18' AND "Best Bowling" = '4/138' AND "Matches" < '3' | What is the total average for the England team when the wickets are less than 18, the best bowling is 4/138, and there are less than 3 matches? | CREATE TABLE table_49940 (
"Player" text,
"Team" text,
"Matches" real,
"Wickets" real,
"Average" real,
"Best Bowling" text
) |
SELECT team FROM table_24587026_1 WHERE points = "22" | Name the team for 22 points | CREATE TABLE table_24587026_1 (team VARCHAR, points VARCHAR) |
SELECT l2_cache FROM table_27277284_27 WHERE order_part_number = "AMQL64DAM22GG" | What are the L2 cache specifications of part number amql64dam22gg? | CREATE TABLE table_27277284_27 (l2_cache VARCHAR, order_part_number VARCHAR) |
SELECT q1."# ans", q1."ct" AS "#q", q2."ct" AS "#q score>5" FROM (SELECT Posts.AnswerCount AS "# ans", COUNT(*) AS "ct" FROM Posts WHERE Posts.AnswerCount >= -1 AND Posts.AnswerCount < 10 AND Posts.Score > 0 GROUP BY Posts.AnswerCount) AS q1 INNER JOIN (SELECT Posts.AnswerCount AS "# ans", COUNT(*) AS "ct" FROM Posts WHERE Posts.AnswerCount >= -1 AND Posts.AnswerCount < 10 AND Posts.Score > 5 GROUP BY Posts.AnswerCount) AS q2 ON q1."# ans" = q2."# ans" ORDER BY q1."# ans" | Do Questions Get Answers on Math.StackExchange?. | CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskTypes (
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 ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment 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 Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
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 VoteTypes (
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 PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId 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 PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense 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 Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
) |
SELECT f_laps FROM table_24587026_1 WHERE series = "GP2 series" | Name the f/laps for gp2 series | CREATE TABLE table_24587026_1 (f_laps VARCHAR, series VARCHAR) |
SELECT voltage FROM table_27277284_27 WHERE order_part_number = "AMQL64DAM22GG" | What is the operating voltage of part number amql64dam22gg? | CREATE TABLE table_27277284_27 (voltage VARCHAR, order_part_number VARCHAR) |
SELECT Date_Claim_Made, COUNT(Date_Claim_Made) FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims) ORDER BY COUNT(Date_Claim_Made) | Return the number of the claim start date for the claims whose claimed amount is no more than the average, could you show by the Y-axis in ascending? | CREATE TABLE Payments (
Payment_ID INTEGER,
Settlement_ID INTEGER,
Payment_Method_Code VARCHAR(255),
Date_Payment_Made DATE,
Amount_Payment INTEGER
)
CREATE TABLE Claims (
Claim_ID INTEGER,
Policy_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER
)
CREATE TABLE Customers (
Customer_ID INTEGER,
Customer_Details VARCHAR(255)
)
CREATE TABLE Customer_Policies (
Policy_ID INTEGER,
Customer_ID INTEGER,
Policy_Type_Code CHAR(15),
Start_Date DATE,
End_Date DATE
)
CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER,
Customer_Policy_ID INTEGER
) |
SELECT MIN(wins) FROM table_24587026_1 | Name the most wins | CREATE TABLE table_24587026_1 (wins INTEGER) |
SELECT mult_1 FROM table_27277284_27 WHERE frequency = "1900MHz" | What are the possible multipliers for 1900MHz processors? | CREATE TABLE table_27277284_27 (mult_1 VARCHAR, frequency VARCHAR) |
SELECT date FROM table_name_38 WHERE score = "2–3" AND time = "20:30" AND set_3 = "16–25" | Which Date has a Score of 2 3, a Time of 20:30, and a Set 3 of 16 25? | CREATE TABLE table_name_38 (
date VARCHAR,
set_3 VARCHAR,
score VARCHAR,
time VARCHAR
) |
SELECT MIN(races) FROM table_24587026_1 WHERE team = "Carlin" | Name the least races for carlin | CREATE TABLE table_24587026_1 (races INTEGER, team VARCHAR) |
SELECT COUNT(tdp) FROM table_27277284_27 WHERE order_part_number = "AMQL65DAM22GG" | How many thermal design power levels does part number amql65dam22gg have? | CREATE TABLE table_27277284_27 (tdp VARCHAR, order_part_number VARCHAR) |
SELECT film_title_used_in_nomination FROM table_name_49 WHERE serbian_title = "бело одело" | What is the Film title used in nomination of the Film with a Serbian title of ? | CREATE TABLE table_name_49 (
film_title_used_in_nomination VARCHAR,
serbian_title VARCHAR
) |
SELECT position FROM table_24587026_1 WHERE podiums = 0 AND team = "Carlin" | Name the position for 0 podiums and carlin team | CREATE TABLE table_24587026_1 (position VARCHAR, podiums VARCHAR, team VARCHAR) |
SELECT socket FROM table_27277284_27 WHERE frequency = "2100MHz" AND model_number = "Athlon X2 QL-64" | What kind of sockets does a 2100MHz Athlon X2 QL-64 use? | CREATE TABLE table_27277284_27 (socket VARCHAR, frequency VARCHAR, model_number VARCHAR) |
SELECT All_Road, School_ID FROM basketball_match ORDER BY All_Road | Return a bar chart about the distribution of All_Road and School_ID , could you list by the names in asc 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 name_in_syriac FROM table_24613895_1 WHERE number_of_believers = 500 | Name the name in syriac for 500 believers | CREATE TABLE table_24613895_1 (name_in_syriac VARCHAR, number_of_believers VARCHAR) |
SELECT COUNT(years_active) FROM table_272865_20 WHERE asian_cup_played_as_a_captain = "Japan 1992" | What is the total number of years active listings where Asian Cup played as a captain is Japan 1992? | CREATE TABLE table_272865_20 (years_active VARCHAR, asian_cup_played_as_a_captain VARCHAR) |
SELECT city_code, COUNT(*) FROM Student GROUP BY city_code ORDER BY city_code DESC | Find the number of students for the cities where have more than one student, and sort by the X-axis from high to low. | CREATE TABLE Lives_in (
stuid INTEGER,
dormid INTEGER,
room_number INTEGER
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Dorm_amenity (
amenid INTEGER,
amenity_name VARCHAR(25)
)
CREATE TABLE Dorm (
dormid INTEGER,
dorm_name VARCHAR(20),
student_capacity INTEGER,
gender VARCHAR(1)
)
CREATE TABLE Has_amenity (
dormid INTEGER,
amenid INTEGER
) |
SELECT MIN(number_of_believers) FROM table_24613895_1 | Name the least number of believers | CREATE TABLE table_24613895_1 (number_of_believers INTEGER) |
SELECT matches_as_captain FROM table_272865_20 WHERE asian_cup_played_as_a_captain = "Qatar 1988" | How many matches as captain were played where Asian Cup played as a captain is Qatar 1988 | CREATE TABLE table_272865_20 (matches_as_captain VARCHAR, asian_cup_played_as_a_captain VARCHAR) |
SELECT website FROM table_name_85 WHERE frequency < 760 AND callsign = "kkyx" | Which Website has a Frequency smaller than 760 and a Callsign of kkyx? | CREATE TABLE table_name_85 (
website VARCHAR,
frequency VARCHAR,
callsign VARCHAR
) |
SELECT MAX(number_of_believers) FROM table_24613895_1 WHERE name_in_syriac = "ܓܘܝܠܢ" | Name the most number of believers for ܓܘܝܠܢ | CREATE TABLE table_24613895_1 (number_of_believers INTEGER, name_in_syriac VARCHAR) |
SELECT years_active FROM table_272865_20 WHERE asian_cup_played_as_a_captain = "Iran 1976" | What were the years active where Asian Cup played as a captain is Iran 1976? | CREATE TABLE table_272865_20 (years_active VARCHAR, asian_cup_played_as_a_captain VARCHAR) |
SELECT AVG("Bronze") FROM table_6567 WHERE "Silver" = '0' AND "Rank" = '3' AND "Total" < '1' | What is the average number of bronze medals of the team with 0 silvers, ranked 3, and less than 1 total medal? | CREATE TABLE table_6567 (
"Rank" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) |
SELECT number_of_believers FROM table_24613895_1 WHERE name_of_village = "Khosrowa" | Name the number of believers for khosrowa | CREATE TABLE table_24613895_1 (number_of_believers VARCHAR, name_of_village VARCHAR) |
SELECT years_active FROM table_272865_20 WHERE asian_cup_played_as_a_captain = "Qatar 1988" | What were the years active where Asian Cup played as a captain is Qatar 1988? | CREATE TABLE table_272865_20 (years_active VARCHAR, asian_cup_played_as_a_captain VARCHAR) |
SELECT "Score" FROM table_29612 WHERE "Game" = '5' | Name the score for game 5 | CREATE TABLE table_29612 (
"Game" real,
"October" real,
"Opponent" text,
"Score" text,
"Location/Attendance" text,
"Record" text,
"Points" real
) |
SELECT COUNT(number_of_believers) FROM table_24613895_1 WHERE name_of_village = "Patavur" | Name the number of believers for patavur | CREATE TABLE table_24613895_1 (number_of_believers VARCHAR, name_of_village VARCHAR) |
SELECT first_driver_s_ FROM table_27279050_3 WHERE country = "Romania" | Who is the first driver(s) when the country is romania? | CREATE TABLE table_27279050_3 (first_driver_s_ VARCHAR, country VARCHAR) |
SELECT "Being (qualities)" FROM table_68450 WHERE "Having (things)" = 'friendships, family, relationships with nature' | Name the being qualities for having things of friendships, family, relationships with nature | CREATE TABLE table_68450 (
"Need" text,
"Being (qualities)" text,
"Having (things)" text,
"Doing (actions)" text,
"Interacting (settings)" text
) |
SELECT channel FROM table_24598274_20 WHERE local_title = "Live to Dance" | The local title "Live to Dance" was aired in which channel? | CREATE TABLE table_24598274_20 (channel VARCHAR, local_title VARCHAR) |
SELECT COUNT(country) FROM table_27279050_3 WHERE last_current_driver_s__3_november_2013 = "Adderly Fong ( 2013 )" | How many times is last/current driver(s) 3 november 2013 is adderly fong ( 2013 )? | CREATE TABLE table_27279050_3 (country VARCHAR, last_current_driver_s__3_november_2013 VARCHAR) |
SELECT T2.weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id ORDER BY T1.money_requested DESC | What are the weights of entrepreneurs in descending order of money requested? | CREATE TABLE people (
people_id number,
name text,
height number,
weight number,
date_of_birth text
)
CREATE TABLE entrepreneur (
entrepreneur_id number,
people_id number,
company text,
money_requested number,
investor text
) |
SELECT country FROM table_24598274_20 WHERE presenter_s_ = "Johanna Klum" | Which country did Johanna Klum presented the show? | CREATE TABLE table_24598274_20 (country VARCHAR, presenter_s_ VARCHAR) |
SELECT last_current_driver_s__3_november_2013 FROM table_27279050_3 WHERE first_driver_s_ = "Marlon Stöckinger , Kotaro Sakurai ( 2011 )" | Who is the last/current driver(s) 3 november 2013 when first driver(s) is marlon stöckinger , kotaro sakurai ( 2011 )? | CREATE TABLE table_27279050_3 (last_current_driver_s__3_november_2013 VARCHAR, first_driver_s_ VARCHAR) |
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'atropine 0.1 mg/ml syringe : 10 ml syringe' AND DATETIME(medication.drugstarttime) <= DATETIME(CURRENT_TIME(), '-1 year')) AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE DATETIME(medication.drugstarttime) <= DATETIME(CURRENT_TIME(), '-1 year')) AS t2 ON t1.uniquepid = t2.uniquepid WHERE DATETIME(t1.drugstarttime) = DATETIME(t2.drugstarttime) GROUP BY t2.drugname) AS t3 WHERE t3.c1 <= 3 | among patients who were prescribed with atropine 0.1 mg/ml syringe : 10 ml syringe, what is the three most frequently prescribed drug at the same time, until 1 year ago? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
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
)
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 lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
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
) |
SELECT MAX(released) FROM table_24600706_1 WHERE song = "The In Crowd" | Name the most released for the in crowd | CREATE TABLE table_24600706_1 (released INTEGER, song VARCHAR) |
SELECT country FROM table_27279050_3 WHERE last_current_driver_s__3_november_2013 = "Daniel Abt ( 2012 )" | What is the country when last/current driver(s) 3 november 2013 is daniel abt ( 2012 )? | CREATE TABLE table_27279050_3 (country VARCHAR, last_current_driver_s__3_november_2013 VARCHAR) |
SELECT opponent FROM table_name_94 WHERE game = 27 | Who was the opponent in Game 27? | CREATE TABLE table_name_94 (
opponent VARCHAR,
game VARCHAR
) |
SELECT MAX(released) FROM table_24600706_1 WHERE song = "Apologize" | Name the most released for apologize | CREATE TABLE table_24600706_1 (released INTEGER, song VARCHAR) |
SELECT lost FROM table_27293285_2 WHERE bonus_points = "9" AND won = "11" | How many losses did the club who had 9 bonus points and 11 wins have? | CREATE TABLE table_27293285_2 (lost VARCHAR, bonus_points VARCHAR, won VARCHAR) |
SELECT payment_method_code, COUNT(*) FROM Invoices GROUP BY payment_method_code ORDER BY COUNT(*) DESC | Show all payment method codes and the number of orders for each code Show bar chart, order from high to low by the Y. | CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15),
Workshop_Group_ID INTEGER,
Product_Description VARCHAR(255),
Product_Name VARCHAR(255),
Product_Price DECIMAL(20,4),
Other_Product_Service_Details VARCHAR(255)
)
CREATE TABLE Order_Items (
Order_Item_ID INTEGER,
Order_ID INTEGER,
Product_ID INTEGER,
Order_Quantity VARCHAR(288),
Other_Item_Details VARCHAR(255)
)
CREATE TABLE Drama_Workshop_Groups (
Workshop_Group_ID INTEGER,
Address_ID INTEGER,
Currency_Code CHAR(15),
Marketing_Region_Code CHAR(15),
Store_Name VARCHAR(255),
Store_Phone VARCHAR(255),
Store_Email_Address VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Customers (
Customer_ID VARCHAR(100),
Address_ID INTEGER,
Customer_Name VARCHAR(255),
Customer_Phone VARCHAR(255),
Customer_Email_Address VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Performers (
Performer_ID INTEGER,
Address_ID INTEGER,
Customer_Name VARCHAR(255),
Customer_Phone VARCHAR(255),
Customer_Email_Address VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Bookings (
Booking_ID INTEGER,
Customer_ID INTEGER,
Workshop_Group_ID VARCHAR(100),
Status_Code CHAR(15),
Store_ID INTEGER,
Order_Date DATETIME,
Planned_Delivery_Date DATETIME,
Actual_Delivery_Date DATETIME,
Other_Order_Details VARCHAR(255)
)
CREATE TABLE Addresses (
Address_ID VARCHAR(100),
Line_1 VARCHAR(255),
Line_2 VARCHAR(255),
City_Town VARCHAR(255),
State_County VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Stores (
Store_ID VARCHAR(100),
Address_ID INTEGER,
Marketing_Region_Code CHAR(15),
Store_Name VARCHAR(255),
Store_Phone VARCHAR(255),
Store_Email_Address VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Invoice_Items (
Invoice_Item_ID INTEGER,
Invoice_ID INTEGER,
Order_ID INTEGER,
Order_Item_ID INTEGER,
Product_ID INTEGER,
Order_Quantity INTEGER,
Other_Item_Details VARCHAR(255)
)
CREATE TABLE Bookings_Services (
Order_ID INTEGER,
Product_ID INTEGER
)
CREATE TABLE Performers_in_Bookings (
Order_ID INTEGER,
Performer_ID INTEGER
)
CREATE TABLE Ref_Service_Types (
Service_Type_Code CHAR(15),
Parent_Service_Type_Code CHAR(15),
Service_Type_Description VARCHAR(255)
)
CREATE TABLE Marketing_Regions (
Marketing_Region_Code CHAR(15),
Marketing_Region_Name VARCHAR(255),
Marketing_Region_Descriptrion VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Ref_Payment_Methods (
payment_method_code CHAR(10),
payment_method_description VARCHAR(80)
)
CREATE TABLE Clients (
Client_ID INTEGER,
Address_ID INTEGER,
Customer_Email_Address VARCHAR(255),
Customer_Name VARCHAR(255),
Customer_Phone VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Products (
Product_ID VARCHAR(100),
Product_Name VARCHAR(255),
Product_Price DECIMAL(20,4),
Product_Description VARCHAR(255),
Other_Product_Service_Details VARCHAR(255)
)
CREATE TABLE Customer_Orders (
Order_ID INTEGER,
Customer_ID INTEGER,
Store_ID INTEGER,
Order_Date DATETIME,
Planned_Delivery_Date DATETIME,
Actual_Delivery_Date DATETIME,
Other_Order_Details VARCHAR(255)
)
CREATE TABLE Invoices (
Invoice_ID INTEGER,
Order_ID INTEGER,
payment_method_code CHAR(15),
Product_ID INTEGER,
Order_Quantity VARCHAR(288),
Other_Item_Details VARCHAR(255),
Order_Item_ID INTEGER
) |
SELECT MAX(released) FROM table_24600706_1 WHERE song = "Right Here, Right Now" | Name the most released for right here, right now | CREATE TABLE table_24600706_1 (released INTEGER, song VARCHAR) |
SELECT bonus_points FROM table_27293285_2 WHERE points_for = "379" | How many bonus points did the club who had 379 points for have? | CREATE TABLE table_27293285_2 (bonus_points VARCHAR, points_for VARCHAR) |
SELECT "Date (To)" FROM table_77069 WHERE "Traction Type" = 'electric' AND "Name of System" = 'yarmouth light and power company' | What is the date (to) associated wiht a traction type of electric and the Yarmouth Light and Power Company system? | CREATE TABLE table_77069 (
"Name of System" text,
"Location" text,
"Traction Type" text,
"Date (From)" text,
"Date (To)" text
) |
SELECT us_exclusive FROM table_24600706_1 WHERE artist_band = "Miley Cyrus" | Name the us exclusive for miley cyrus | CREATE TABLE table_24600706_1 (us_exclusive VARCHAR, artist_band VARCHAR) |
SELECT club FROM table_27293285_2 WHERE bonus_points = "5" | Which club had 5 bonus points? | CREATE TABLE table_27293285_2 (club VARCHAR, bonus_points VARCHAR) |
SELECT COUNT("UK co-presenter") FROM table_19282 WHERE "Co-presenter" = 'Joe Swash' AND "Comedian" = 'Russell Kane' | Who are the UK co-presenters that have Joe Swash as a co-presenter and Russell Kane as a comedian? | CREATE TABLE table_19282 (
"Series" text,
"Main presenter" text,
"Co-presenter" text,
"Comedian" text,
"UK co-presenter" text
) |
SELECT COUNT(clean_electric_grid_california__san_francisco_) FROM table_24620684_2 WHERE vehicle = "BMW ActiveE" | When bmw activee is the vehicle type how many clean electric grid california (san francisco) measurements are there? | CREATE TABLE table_24620684_2 (clean_electric_grid_california__san_francisco_ VARCHAR, vehicle VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.