answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type = 'saving' | What are the names of customers who do not have saving accounts? | CREATE TABLE customer (
cust_id text,
cust_name text,
acc_type text,
acc_bal number,
no_of_loans number,
credit_score number,
branch_id number,
state text
)
CREATE TABLE bank (
branch_id number,
bname text,
no_of_customers number,
city text,
state text
)
CREATE TABLE loan (
loan_id text,
loan_type text,
cust_id text,
branch_id text,
amount number
) |
SELECT exports FROM table_26160007_1 WHERE total_trade = "14,954.86" | Where the total trade is 14,954.86, what are the exports? | CREATE TABLE table_26160007_1 (exports VARCHAR, total_trade VARCHAR) |
SELECT MIN(grid) FROM table_name_96 WHERE rider = "casey stoner" AND laps < 27 | What is the lowest grid with rider casey stoner and laps that are smaller than 27? | CREATE TABLE table_name_96 (grid INTEGER, rider VARCHAR, laps VARCHAR) |
SELECT organization FROM table_2538117_12 WHERE founding_date = "1998-11-08" | What organization had the founding date of 1998-11-08? | CREATE TABLE table_2538117_12 (
organization VARCHAR,
founding_date VARCHAR
) |
SELECT total_trade FROM table_26160007_1 WHERE country = "Switzerland" | In the country Switzerland, what is the total trade? | CREATE TABLE table_26160007_1 (total_trade VARCHAR, country VARCHAR) |
SELECT COUNT(grid) FROM table_name_17 WHERE laps > 27 | What is the total grid number with laps that are larger than 27? | CREATE TABLE table_name_17 (grid VARCHAR, laps INTEGER) |
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%moscow%' OR UPPER(Location) LIKE '%MOSCOW%' OR Location LIKE '%Moscow%' AND Reputation >= 100 ORDER BY Reputation DESC | Top users from Moscow, Russia. | CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE ReviewTaskResultTypes (
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 Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDate time,
ApprovalModeratorId number,
DeactivationDate time,
DeactivationModeratorId number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
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 Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
) |
SELECT total_trade FROM table_26160007_1 WHERE exports = "13,608.65" | Where the exports is 13,608.65, what is the total trade? | CREATE TABLE table_26160007_1 (total_trade VARCHAR, exports VARCHAR) |
SELECT MIN(laps) FROM table_name_62 WHERE time_retired = "+38.426" | What is the lowest number of laps with a time/retired of +38.426? | CREATE TABLE table_name_62 (laps INTEGER, time_retired VARCHAR) |
SELECT MIN("Lost") FROM table_37410 WHERE "Drawn" > '1' | What is the lowest lost from drawn of 1 or greater? | CREATE TABLE table_37410 (
"Games" real,
"Drawn" real,
"Lost" real,
"Points difference" text,
"Points" real
) |
SELECT location FROM table_26144632_1 WHERE dates = "Jul 8-11" | What is the location for tournament on Jul 8-11? | CREATE TABLE table_26144632_1 (location VARCHAR, dates VARCHAR) |
SELECT SUM(laps) FROM table_name_6 WHERE time_retired = "+19.475" | What is the sum of laps that has a time/retired that is +19.475? | CREATE TABLE table_name_6 (laps INTEGER, time_retired VARCHAR) |
SELECT "Party" FROM table_18240 WHERE "Incumbent" = 'Beau Boulter' | What party did Beau Boulter represent? | CREATE TABLE table_18240 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) |
SELECT dates FROM table_26144632_1 WHERE location = "Hokkaidō" AND prize_fund___¥__ = 150000000 | What is the date of the tournament at Hokkaidō with prize of ¥150000000? | CREATE TABLE table_26144632_1 (dates VARCHAR, location VARCHAR, prize_fund___¥__ VARCHAR) |
SELECT player FROM table_name_67 WHERE college_junior_club_team = "canterbury (ushs)" | What player is from canterbury (ushs)? | CREATE TABLE table_name_67 (player VARCHAR, college_junior_club_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 = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND flight.departure_time = (SELECT MIN(FLIGHTalias1.departure_time) FROM airport_service AS AIRPORT_SERVICEalias2, airport_service AS AIRPORT_SERVICEalias3, city AS CITYalias2, city AS CITYalias3, flight AS FLIGHTalias1 WHERE CITYalias2.city_code = AIRPORT_SERVICEalias2.city_code AND CITYalias2.city_name = 'ATLANTA' AND CITYalias3.city_code = AIRPORT_SERVICEalias3.city_code AND CITYalias3.city_name = 'BOSTON' AND FLIGHTalias1.from_airport = AIRPORT_SERVICEalias2.airport_code AND FLIGHTalias1.to_airport = AIRPORT_SERVICEalias3.airport_code) | what is the earliest flight from ATLANTA to BOSTON | CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
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 city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description 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 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 state (
state_code text,
state_name text,
country_name 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 equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE code_description (
code varchar,
description 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 flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE 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 ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE compartment_class (
compartment varchar,
class_type 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 days (
days_code varchar,
day_name varchar
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
) |
SELECT prize_fund___¥__ FROM table_26144632_1 WHERE location = "Ibaraki" | What is the prize for the tournament at Ibaraki? | CREATE TABLE table_26144632_1 (prize_fund___¥__ VARCHAR, location VARCHAR) |
SELECT opponent FROM table_name_10 WHERE game = 33 | Which Opponent has a Game of 33? | CREATE TABLE table_name_10 (opponent VARCHAR, game VARCHAR) |
SELECT "Website" FROM table_33863 WHERE "Frequency" < '760' AND "Callsign" = 'kkyx' | Which Website has a Frequency smaller than 760 and a Callsign of kkyx? | CREATE TABLE table_33863 (
"Frequency" real,
"Callsign" text,
"Brand" text,
"City of License" text,
"Website" text,
"Webcast" text
) |
SELECT COUNT(title) FROM table_26150013_1 WHERE original_air_date = "April 3, 2012" | How many titles are there for the original air date April 3, 2012? | CREATE TABLE table_26150013_1 (title VARCHAR, original_air_date VARCHAR) |
SELECT score FROM table_name_14 WHERE december > 8 AND record = "25-8-3" | What's the Score that's got a listing of December that larger than 8 and Record of 25-8-3? | CREATE TABLE table_name_14 (score VARCHAR, december VARCHAR, record VARCHAR) |
SELECT team FROM table_name_15 WHERE drawn < 12 AND position > 3 AND goals_against > 85 | Which team has a position higher than 3, a Drawn lower than 12, and a Goals Against higher than 85? | CREATE TABLE table_name_15 (
team VARCHAR,
goals_against VARCHAR,
drawn VARCHAR,
position VARCHAR
) |
SELECT location FROM table_26166836_2 WHERE distance = "Marathon" AND month_held = "February" | What are all of the area where distance is marathon and month held is february | CREATE TABLE table_26166836_2 (location VARCHAR, distance VARCHAR, month_held VARCHAR) |
SELECT COUNT(earnings___) AS $__ FROM table_name_94 WHERE events = 28 AND wins > 2 | What is the total number of earnings for golfers who have 28 events and more than 2 wins? | CREATE TABLE table_name_94 (earnings___ VARCHAR, events VARCHAR, wins VARCHAR) |
SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 12927) AND prescriptions.drug = 'acetaminophen' AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month') | what is the total acetaminophen dose that has been prescribed this month to patient 12927? | 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 d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
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_labitems (
row_id number,
itemid number,
label text
)
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 diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
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 patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
) |
SELECT COUNT(country) FROM table_26166836_2 WHERE road_race = "Ottawa Marathon" | What's the whole range of united states where road race is ottawa marathon | CREATE TABLE table_26166836_2 (country VARCHAR, road_race VARCHAR) |
SELECT date FROM table_name_99 WHERE major = "the open championship" AND country = "japan" | On what Date was The Open Championship in Japan? | CREATE TABLE table_name_99 (date VARCHAR, major VARCHAR, country VARCHAR) |
SELECT "Data" FROM table_11393 WHERE "Percent gain" = '28.4%' | Name the data with a percent gain of 28.4% | CREATE TABLE table_11393 (
"Data" text,
"Total gain" text,
"Percent gain" text,
"2003" text,
"2000" text,
"1997" text,
"1994" text,
"1991" text,
"1988" text,
"1985" text,
"1982" text,
"1979" text,
"1976" text,
"1973" text,
"1970" text,
"1967" text
) |
SELECT road_race FROM table_26166836_3 WHERE country = "Germany" AND month_held = "May" | What race is held in Germany in the month of May? | CREATE TABLE table_26166836_3 (road_race VARCHAR, country VARCHAR, month_held VARCHAR) |
SELECT finish FROM table_name_54 WHERE player = "tom weiskopf" | What was Tom Weiskopf's Finish? | CREATE TABLE table_name_54 (finish VARCHAR, player VARCHAR) |
SELECT "Venue" FROM table_74712 WHERE "Away team" = 'geelong' | What is the venue when Geelong is the away team? | CREATE TABLE table_74712 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) |
SELECT COUNT(month_held) FROM table_26166836_3 WHERE distance = "Marathon" AND location = "Brighton" | How many times a year is the Brighton Marathon held? | CREATE TABLE table_26166836_3 (month_held VARCHAR, distance VARCHAR, location VARCHAR) |
SELECT laps FROM table_name_23 WHERE points = 29 | Which Laps have Points of 29? | CREATE TABLE table_name_23 (laps VARCHAR, points VARCHAR) |
SELECT COUNT(product_no) FROM table_10875694_11 WHERE title = "Jak 3" | How many products have the title 'Jak 3'? | CREATE TABLE table_10875694_11 (
product_no VARCHAR,
title VARCHAR
) |
SELECT month_held FROM table_26166836_3 WHERE location = "Paris" | What month is the Paris 20k Road Race held? | CREATE TABLE table_26166836_3 (month_held VARCHAR, location VARCHAR) |
SELECT SUM(grid) FROM table_name_98 WHERE driver = "cristiano da matta" AND points < 33 | Which Grid has a Driver of cristiano da matta, and Points smaller than 33? | CREATE TABLE table_name_98 (grid INTEGER, driver VARCHAR, points VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Cellulitis of hand" AND prescriptions.drug_type = "MAIN" | give me the number of patients whose diagnoses short title is cellulitis of hand and drug type is main? | CREATE TABLE diagnoses (
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 prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) |
SELECT COUNT(month_held) FROM table_26166836_3 WHERE road_race = "Paris 20K" | How many times a year is the Paris 20k road race held? | CREATE TABLE table_26166836_3 (month_held VARCHAR, road_race VARCHAR) |
SELECT team FROM table_name_16 WHERE laps < 105 AND grid < 18 AND points = 11 | Which Team has Laps smaller than 105, and a Grid smaller than 18, and Points of 11? | CREATE TABLE table_name_16 (team VARCHAR, points VARCHAR, laps VARCHAR, grid 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 = 'calcium gluconate 100 mg/ml (10 %) iv : 10 ml' AND STRFTIME('%y', medication.drugstarttime) <= '2101') AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE STRFTIME('%y', medication.drugstarttime) <= '2101') AS t2 ON t1.uniquepid = t2.uniquepid WHERE DATETIME(t1.drugstarttime) = DATETIME(t2.drugstarttime) GROUP BY t2.drugname) AS t3 WHERE t3.c1 <= 4 | what are the four most common medications prescribed for patients who were also prescribed calcium gluconate 100 mg/ml (10 %) iv : 10 ml at the same time until 2101? | 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 vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
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 diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
) |
SELECT road_race FROM table_26166836_3 WHERE location = "Omsk" | What is the name of the road race held in Omsk, Russia? | CREATE TABLE table_26166836_3 (road_race VARCHAR, location VARCHAR) |
SELECT COUNT(points) FROM table_name_7 WHERE team = "rusport" AND laps = 45 | How many Points have a Team of rusport, and Laps of 45? | CREATE TABLE table_name_7 (points VARCHAR, team VARCHAR, laps VARCHAR) |
SELECT T2.Name, COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID ORDER BY T2.Name | How many actors have appeared in each musical Plot them as bar chart, and order x axis in asc order please. | CREATE TABLE actor (
Actor_ID int,
Name text,
Musical_ID int,
Character text,
Duration text,
age int
)
CREATE TABLE musical (
Musical_ID int,
Name text,
Year int,
Award text,
Category text,
Nominee text,
Result text
) |
SELECT amman FROM table_26173058_2 WHERE qadisiya = "2-1" | what is the place where the location is 2-1 | CREATE TABLE table_26173058_2 (amman VARCHAR, qadisiya VARCHAR) |
SELECT name FROM table_name_95 WHERE position = "guard" | What is the players name in the guard position? | CREATE TABLE table_name_95 (name VARCHAR, position VARCHAR) |
SELECT MIN(demographic.age) FROM demographic WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND demographic.diagnosis = "ATRIAL FIBRILLATION\THORACOSCOPIC MAZE PROCEDURE BILATERAL/SDA" | what is the minimum age of patients whose admission location is transfer within this facility and diagnosed with primary disease atrial fibrillation\thoracoscopic maze procedure bilateral/sda? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title 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
)
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 qadisiya FROM table_26173058_2 WHERE × = "ramtha" | what is the capital where it is ramtha | CREATE TABLE table_26173058_2 (qadisiya VARCHAR, × VARCHAR) |
SELECT overall FROM table_name_5 WHERE pick = 17 | What is the Overall number for pick 17? | CREATE TABLE table_name_5 (overall VARCHAR, pick VARCHAR) |
SELECT "discipline" FROM table_204_345 WHERE id = 1 | what is the first discipline listed on this chart ? | CREATE TABLE table_204_345 (
id number,
"discipline" text,
"amanda" number,
"bernie" number,
"javine h" number,
"julia" number,
"michelle" number
) |
SELECT ahli FROM table_26173058_2 WHERE ramtha = "1-0" | what is the location where the record is 1-0 | CREATE TABLE table_26173058_2 (ahli VARCHAR, ramtha VARCHAR) |
SELECT round FROM table_name_48 WHERE overall = 123 | What number round has an overall of 123? | CREATE TABLE table_name_48 (round VARCHAR, overall VARCHAR) |
SELECT original_air_date FROM table_17623902_1 WHERE written_by = "Debbie Sarjeant" | What was the original air date of this episode that was written by Debbie Sarjeant? | CREATE TABLE table_17623902_1 (
original_air_date VARCHAR,
written_by VARCHAR
) |
SELECT ramtha FROM table_26173058_2 WHERE ahli = "1-1" | what is the score where the record is 1-1 | CREATE TABLE table_26173058_2 (ramtha VARCHAR, ahli VARCHAR) |
SELECT name FROM table_name_3 WHERE overall < 123 AND team = "detroit lions" | What is the Name with an overall of less than 123 for the Detroit Lions? | CREATE TABLE table_name_3 (name VARCHAR, overall VARCHAR, team VARCHAR) |
SELECT MAX("Grid") FROM table_55295 WHERE "Laps" > '137' AND "Rank" < '8' | Name the highest grid for Laps more than 137 and rank is less than 8 | CREATE TABLE table_55295 (
"Grid" real,
"Driver" text,
"Constructor" text,
"Qual" real,
"Rank" real,
"Laps" real,
"Time/Retired" text
) |
SELECT × FROM table_26173058_2 WHERE jeel = "1-1" AND ramtha = "1-1" | what the team where the record is 1-1 and the player is 1-1 | CREATE TABLE table_26173058_2 (× VARCHAR, jeel VARCHAR, ramtha VARCHAR) |
SELECT name FROM table_name_27 WHERE overall < 49 | Who is drafted overall less than 49? | CREATE TABLE table_name_27 (name VARCHAR, overall INTEGER) |
SELECT Posts.Id, Posts.Id AS "post_link", OwnerUserId AS "user_link", Score, ViewCount, AnswerCount, CreationDate, Tags FROM Posts WHERE Tags = '<##tagname?calculus##>' ORDER BY Posts.LastEditDate | Finding questions having ONLY the given tag. | 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 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 PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE CloseReasonTypes (
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 Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
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 PostTags (
PostId number,
TagId number
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE 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 ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE VoteTypes (
Id number,
Name 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 Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
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 ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
) |
SELECT COUNT(amman) FROM table_26173058_2 WHERE wehdat = "0-1" | what is the number of teams where the record is 0-1 | CREATE TABLE table_26173058_2 (amman VARCHAR, wehdat VARCHAR) |
SELECT position FROM table_name_47 WHERE college = "grambling" | What position is drafted from Grambling? | CREATE TABLE table_name_47 (position VARCHAR, college VARCHAR) |
SELECT AVG(points) FROM table_name_87 WHERE laps > 154 | What is the average amount of points larger than 154 laps? | CREATE TABLE table_name_87 (
points INTEGER,
laps INTEGER
) |
SELECT location FROM table_26166836_1 WHERE road_race = "Istanbul Marathon" | Where was the istanbul marathon? | CREATE TABLE table_26166836_1 (location VARCHAR, road_race VARCHAR) |
SELECT opponent FROM table_name_2 WHERE event = "sb 24 - return of the heavyweights 2" AND method = "tko (knee and punches)" | Which opponent's event was sb 24 - return of the heavyweights 2, and had a method of TKO (knee and punches)? | CREATE TABLE table_name_2 (opponent VARCHAR, event VARCHAR, method VARCHAR) |
SELECT LAST_NAME, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY LAST_NAME | For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about manager_id over the last_name by a bar chart, list by the LAST_NAME from low to high please. | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
) |
SELECT distance FROM table_26166836_1 WHERE road_race = "Great Manchester Run" | How long was the great manchester run? | CREATE TABLE table_26166836_1 (distance VARCHAR, road_race VARCHAR) |
SELECT method FROM table_name_68 WHERE opponent = "travis fulton" | Which method had Travis Fulton as an opponent? | CREATE TABLE table_name_68 (method VARCHAR, opponent VARCHAR) |
SELECT "Example" FROM table_33570 WHERE "Type" = 'associative' | What is the example with the associative type? | CREATE TABLE table_33570 (
"Type" text,
"Suffix" text,
"Valency change" text,
"Example" text,
"Meaning" text
) |
SELECT country FROM table_26166836_1 WHERE road_race = "Xiamen International Marathon" | In which country was the xiamen international marathon? | CREATE TABLE table_26166836_1 (country VARCHAR, road_race VARCHAR) |
SELECT opponent FROM table_name_45 WHERE round > 1 AND event = "pfp: ring of fire" | Which opponent had a round of more than 1 and an even of PFP: ring of fire? | CREATE TABLE table_name_45 (opponent VARCHAR, round VARCHAR, event VARCHAR) |
SELECT COUNT(*) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-200601')) AND DATETIME(medication.drugstarttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') | calculate the number of drugs prescribed to patient 006-200601 in a year before. | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
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 lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime 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 treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
) |
SELECT location FROM table_26166836_1 WHERE road_race = "Berlin Marathon" | In which city was the berlin marathon? | CREATE TABLE table_26166836_1 (location VARCHAR, road_race VARCHAR) |
SELECT segment_a FROM table_name_87 WHERE episode = 42 | What's the segment A in episode 42? | CREATE TABLE table_name_87 (segment_a VARCHAR, episode VARCHAR) |
SELECT dates FROM table_name_6 WHERE tournament_location = "ibaraki country club" AND champion = "masahiro kawamura" | What dates was champion masahiro kawamura at the ibaraki country club tournament? | CREATE TABLE table_name_6 (
dates VARCHAR,
tournament_location VARCHAR,
champion VARCHAR
) |
SELECT COUNT(road_race) FROM table_26166836_1 WHERE country = "Japan" AND location = "Fukuoka" | How many races were in fukuoka, japan? | CREATE TABLE table_26166836_1 (road_race VARCHAR, country VARCHAR, location VARCHAR) |
SELECT COUNT(ordered) FROM table_name_54 WHERE name = "sfax" | Sfax has a total ordered number of? | CREATE TABLE table_name_54 (ordered VARCHAR, name VARCHAR) |
SELECT score_in_final FROM table_2362606_1 WHERE year = 1988 | What was the score in the final in 1988? | CREATE TABLE table_2362606_1 (
score_in_final VARCHAR,
year VARCHAR
) |
SELECT COUNT(no_in_series) FROM table_26168687_3 WHERE vessel_operator = "Canadian Coast Guard" | How many times is the vessel operator canadian coast guard? | CREATE TABLE table_26168687_3 (no_in_series VARCHAR, vessel_operator VARCHAR) |
SELECT score FROM table_name_42 WHERE date = "march 5" | What was the score on March 5 at Vancouver? | CREATE TABLE table_name_42 (score VARCHAR, date VARCHAR) |
SELECT catalog_entry_name, COUNT(catalog_entry_name) FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = "8" GROUP BY catalog_entry_name ORDER BY catalog_entry_name DESC | Find the names of catalog entries with level number 8, and count them by a bar chart, I want to show x-axis in desc order. | CREATE TABLE Attribute_Definitions (
attribute_id INTEGER,
attribute_name VARCHAR(30),
attribute_data_type VARCHAR(10)
)
CREATE TABLE Catalog_Contents (
catalog_entry_id INTEGER,
catalog_level_number INTEGER,
parent_entry_id INTEGER,
previous_entry_id INTEGER,
next_entry_id INTEGER,
catalog_entry_name VARCHAR(80),
product_stock_number VARCHAR(50),
price_in_dollars DOUBLE,
price_in_euros DOUBLE,
price_in_pounds DOUBLE,
capacity VARCHAR(20),
length VARCHAR(20),
height VARCHAR(20),
width VARCHAR(20)
)
CREATE TABLE Catalog_Structure (
catalog_level_number INTEGER,
catalog_id INTEGER,
catalog_level_name VARCHAR(50)
)
CREATE TABLE Catalogs (
catalog_id INTEGER,
catalog_name VARCHAR(50),
catalog_publisher VARCHAR(80),
date_of_publication DATETIME,
date_of_latest_revision DATETIME
)
CREATE TABLE Catalog_Contents_Additional_Attributes (
catalog_entry_id INTEGER,
catalog_level_number INTEGER,
attribute_id INTEGER,
attribute_value VARCHAR(255)
) |
SELECT vessel_type FROM table_26168687_3 WHERE vessel_operator = "Jumbo Shipping" | What is the vessel type for vessel operator Jumbo shipping? | CREATE TABLE table_26168687_3 (vessel_type VARCHAR, vessel_operator VARCHAR) |
SELECT director_s_ FROM table_name_45 WHERE rank = "nominated" AND film = "blood on his hands" | Who directed the nominated film 'blood on his hands'? | CREATE TABLE table_name_45 (director_s_ VARCHAR, rank VARCHAR, film VARCHAR) |
SELECT AVG("Cars Entered") FROM table_67502 WHERE "Third Driver" = 'manny ayulo' | How many average Cars Entered have a Third Driver of manny ayulo? | CREATE TABLE table_67502 (
"Season" real,
"Cars Entered" real,
"Winning Driver" text,
"Second Driver" text,
"Third Driver" text,
"Race Report" text
) |
SELECT narrated_by FROM table_26168687_3 WHERE vessel_operator = "De Beers" | Who narrated when the vessel operator is de beers? | CREATE TABLE table_26168687_3 (narrated_by VARCHAR, vessel_operator VARCHAR) |
SELECT rank FROM table_name_30 WHERE film = "amelia and michael" | What is the rank of the film, Amelia and Michael? | CREATE TABLE table_name_30 (rank VARCHAR, film VARCHAR) |
SELECT COUNT("menteri besar") FROM table_204_668 WHERE "left office" - "took office" >= 4 | what is the number of menteri besar that served 4 or more years ? | CREATE TABLE table_204_668 (
id number,
"#" number,
"menteri besar" text,
"took office" text,
"left office" text,
"party" text
) |
SELECT COUNT(no_in_series) FROM table_2618061_1 WHERE production_code = 66210 | How many episodes had the production code 66210? | CREATE TABLE table_2618061_1 (no_in_series VARCHAR, production_code VARCHAR) |
SELECT director_s_ FROM table_name_53 WHERE rank = "nominated" AND film = "badmouth" | Who directed the nominated film, Badmouth? | CREATE TABLE table_name_53 (director_s_ VARCHAR, rank VARCHAR, film VARCHAR) |
SELECT demographic.language, demographic.admittime FROM demographic WHERE demographic.name = "Jesse Ran" | what is language and admission time of subject name jesse ran? | CREATE TABLE diagnoses (
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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title 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 COUNT(written_by) FROM table_2618061_1 WHERE directed_by = "James Quinn" | How many episodes were directed by james quinn? | CREATE TABLE table_2618061_1 (written_by VARCHAR, directed_by VARCHAR) |
SELECT production_company FROM table_name_54 WHERE director_s_ = "daniel cormack" | What was the production company for the film directed by Daniel Cormack? | CREATE TABLE table_name_54 (production_company VARCHAR, director_s_ VARCHAR) |
SELECT fatalities FROM table_name_78 WHERE time = "12:38:46" | What number of Fatalties is associated with the Time of 12:38:46? | CREATE TABLE table_name_78 (
fatalities VARCHAR,
time VARCHAR
) |
SELECT title FROM table_2618061_1 WHERE directed_by = "Daniel Sackheim" | What is the title of the episode written by daniel sackheim? | CREATE TABLE table_2618061_1 (title VARCHAR, directed_by VARCHAR) |
SELECT production_company FROM table_name_33 WHERE rank = "nominated" AND film = "badmouth" | What was the production company for the nominated film, Badmouth? | CREATE TABLE table_name_33 (production_company VARCHAR, rank VARCHAR, film VARCHAR) |
SELECT "Date" FROM table_77168 WHERE "Road Team" = 'boston' AND "Game" = 'game 3' | On what Date is Game 3 with Boston Road Team? | CREATE TABLE table_77168 (
"Game" text,
"Date" text,
"Home Team" text,
"Result" text,
"Road Team" text
) |
SELECT MIN(brup) FROM table_26176081_29 WHERE long = 94 | What is the lowest brup when long is 94? | CREATE TABLE table_26176081_29 (brup INTEGER, long VARCHAR) |
SELECT AVG(points) FROM table_name_23 WHERE opponent = "cleveland barons" AND january > 3 | What is the average number of points of the game after January 3 against the Cleveland Barons? | CREATE TABLE table_name_23 (points INTEGER, opponent VARCHAR, january VARCHAR) |
SELECT p FROM table_17596418_4 WHERE moving_from = "Everton" | What is the P for the player moving from Everton? | CREATE TABLE table_17596418_4 (
p VARCHAR,
moving_from VARCHAR
) |
SELECT MIN(gp) FROM table_26176081_29 | What is the lowest gp? | CREATE TABLE table_26176081_29 (gp INTEGER) |
SELECT COUNT(game) FROM table_name_69 WHERE opponent = "los angeles kings" AND january > 5 | What is the total number of games of the team against the Los Angeles Kings after January 5? | CREATE TABLE table_name_69 (game VARCHAR, opponent VARCHAR, january VARCHAR) |
SELECT "year" FROM table_203_258 WHERE "sacks" >= 15 | in what year did jason babin force at least 15 sacks ? | CREATE TABLE table_203_258 (
id number,
"year" number,
"team" text,
"games" number,
"combined tackles" number,
"tackles" number,
"assisted tackles" number,
"sacks" number,
"forced fumbles" number,
"fumble recoveries" number,
"fumble return yards" number,
"interceptions" number,
"interception return yards" number,
"yards per interception return" number,
"longest interception return" number,
"interceptions returned for touchdown" number,
"passes defended" number
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.