table stringlengths 33 7.14k | question stringlengths 4 1.06k | output stringlengths 2 4.44k ⌀ |
|---|---|---|
CREATE TABLE table_74126 (
"Game" real,
"December" real,
"Opponent" text,
"Score" text,
"Decision" text,
"Location/Attendance" text,
"Record" text
) | Name the december for record 14-17-4 | SELECT "December" FROM table_74126 WHERE "Record" = '14-17-4' |
CREATE TABLE table_54507 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | What are the average laps for jackie stewart? | SELECT AVG("Laps") FROM table_54507 WHERE "Driver" = 'jackie stewart' |
CREATE TABLE products (
code number,
name text,
price number,
manufacturer number
)
CREATE TABLE manufacturers (
code number,
name text,
headquarter text,
founder text,
revenue number
) | Select the names and the prices of all the products in the store. | SELECT name, price FROM products |
CREATE TABLE table_31551 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
) | On what date was Patty Fendick an opponent? | SELECT "Date" FROM table_31551 WHERE "Opponent" = 'patty fendick' |
CREATE TABLE table_24516 (
"Regional" text,
"Champions" text,
"Runners-up" text,
"Third place" text,
"Fourth place" text
) | who got the first place when the Japanese Regional Leagues was in hokushinetsu? | SELECT "Champions" FROM table_24516 WHERE "Regional" = 'Hokushinetsu' |
CREATE TABLE table_10135 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What is the away team score when Home team is fitzroy? | SELECT "Away team score" FROM table_10135 WHERE "Home team" = 'fitzroy' |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | Show me about the distribution of Team_Name and School_ID in a bar chart, show in desc by the bar. | SELECT Team_Name, School_ID FROM basketball_match ORDER BY Team_Name DESC |
CREATE TABLE table_57755 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Series" text
) | What is the Visitor with a Score with 4 3? | SELECT "Visitor" FROM table_57755 WHERE "Score" = '4 – 3' |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
... | For all employees who have the letters D or S in their first name, a bar chart shows the distribution of hire_date and the average of manager_id bin hire_date by weekday. | SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' |
CREATE TABLE table_204_111 (
id number,
"name" text,
"animal type" text,
"introduced" number,
"reintroduced" text,
"retired" number,
"beanie baby resembled" text
) | which is the only pillow pal without a listed animal type ? | SELECT "name" FROM table_204_111 WHERE "animal type" IS NULL |
CREATE TABLE table_72921 (
"School" text,
"Est. Denotes original date of establishment of the school, changes in name and/or location noted in corresponding ootnote" real,
"Location Denotes location of school by Seattle neighborhood, does not necessary correspond with attendance area" text,
"Nickname" t... | Name the location for school eckstein | SELECT "Location Denotes location of school by Seattle neighborhood, does not necessary correspond with attendance area" FROM table_72921 WHERE "School" = 'Eckstein' |
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_season int,
Title text,
Directed_by text,
Original_air_date text,
Production_code text
)
CREATE TABLE cinema (
Cinema_ID int,
Name text,
Openning_year int,
Capacity int,
Location text
)
CREATE TABLE schedule... | List all directors along with the number of films directed by each director Plot them as bar chart, list X-axis from high to low order please. | SELECT Directed_by, COUNT(*) FROM film GROUP BY Directed_by ORDER BY Directed_by DESC |
CREATE TABLE table_name_85 (
date VARCHAR,
home_team VARCHAR
) | What date did the home team of footscray play? | SELECT date FROM table_name_85 WHERE home_team = "footscray" |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CRE... | what is the minimum total cost to the hospital that includes mch since 2102? | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT lab.patientunitstayid FROM lab WHERE lab.labname = 'mch')) AND STRFTIME('%y', cost.chargetime) >= '2102' GROUP BY cost.p... |
CREATE TABLE table_35494 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponen" text,
"Score" text
) | Which tournament happened on september 25, 2006? | SELECT "Tournament" FROM table_35494 WHERE "Date" = 'september 25, 2006' |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE i... | how many times have patient 15119's been visited in icu when they visited the hospital first time? | SELECT COUNT(DISTINCT icustays.icustay_id) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 15119 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) |
CREATE TABLE table_64771 (
"Band" real,
"Frequency (MHz)" text,
"Wavelength" text,
"Type" text,
"Power (W)" real
) | What Band number has a Power (W) of 400 or less? | SELECT SUM("Band") FROM table_64771 WHERE "Power (W)" < '400' |
CREATE TABLE table_name_61 (
prime_mover VARCHAR,
model VARCHAR
) | Which prime mover had a Model of rs-18? | SELECT prime_mover FROM table_name_61 WHERE model = "rs-18" |
CREATE TABLE table_6643 (
"Club" text,
"Played" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
) | What did the loss come from a Club of mumbles rfc? | SELECT "Lost" FROM table_6643 WHERE "Club" = 'mumbles rfc' |
CREATE TABLE Minor_in (
StuID INTEGER,
DNO INTEGER
)
CREATE TABLE Member_of (
FacID INTEGER,
DNO INTEGER,
Appt_Type VARCHAR(15)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
... | Give me the comparison about the amount of Days over the Days , and group by attribute Days by a bar chart. | SELECT Days, COUNT(Days) FROM Course GROUP BY Days ORDER BY Credits |
CREATE TABLE table_name_94 (
years_for_grizzlies VARCHAR,
player VARCHAR
) | What are years that Obinna Ekezie played for the Grizzlies? | SELECT years_for_grizzlies FROM table_name_94 WHERE player = "obinna ekezie" |
CREATE TABLE table_dev_32 (
"id" int,
"post_challenge_capillary_glucose" int,
"gender" string,
"blood_donation" bool,
"untreated_hyperlipidemia" bool,
"hemoglobin_a1c_hba1c" float,
"hematocrit_hct" float,
"fasting_triglycerides" int,
"fasting_blood_glucose_fbg" float,
"fasting_pl... | baseline hemoglobin < 10.5 g / dl in female , or < 12.5 g / dl in male . blood donation within 30 days of the study | SELECT * FROM table_dev_32 WHERE (baseline_hemoglobin_hgb < 10.5 AND gender = 'female') OR (baseline_hemoglobin_hgb < 12.5 AND gender = 'male') AND blood_donation = 1 |
CREATE TABLE table_28137918_5 (
new_adherents_per_year INTEGER
) | Name the least amount of new adherents per year | SELECT MIN(new_adherents_per_year) FROM table_28137918_5 |
CREATE TABLE table_22733 (
"State and District of Columbia" text,
"Obese adults" text,
"Overweight (incl. obese) adults" text,
"Obese children and adolescents" text,
"Obesity rank" real
) | How many states or District of Columbia have 65.4% overweight or obese adults? | SELECT COUNT("State and District of Columbia") FROM table_22733 WHERE "Overweight (incl. obese) adults" = '65.4%' |
CREATE TABLE table_18052353_4 (
state_assembly VARCHAR,
year VARCHAR
) | What was the composition of the state assembly in 2008? | SELECT state_assembly FROM table_18052353_4 WHERE year = "2008" |
CREATE TABLE table_54884 (
"Candidate" text,
"Total Receipts" real,
"Loans Received" real,
"Receipts w/o Loans" real,
"Money Spent" real,
"Cash On Hand" real,
"Total Debt" text,
"Cash on Hand Minus Debt" real
) | What is the low money with 374,164$ of debt and receipts larger than 3,898,226 without loans? | SELECT MIN("Money Spent") FROM table_54884 WHERE "Total Debt" = '374,164' AND "Receipts w/o Loans" > '3,898,226' |
CREATE TABLE table_name_44 (
week INTEGER,
result VARCHAR
) | What is the Week of the game with a Result of L 24-0? | SELECT MAX(week) FROM table_name_44 WHERE result = "l 24-0" |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE patient (
uniquepid text,
patientheal... | what was the first prescription drug that was prescribed to patient 022-34558 since 114 months ago? | SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-34558')) AND DATETIME(medication.drugstarttime) >= DATETIME(CUR... |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
... | what is the number of patients whose ethnicity is hispanic/latino - puerto rican and drug code is warf5? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND prescriptions.formulary_drug_cd = "WARF5" |
CREATE TABLE table_name_81 (
record VARCHAR,
score VARCHAR,
points VARCHAR,
february VARCHAR
) | Which Record has a Points smaller than 62 and a February larger than 16, and a Score of 8 7? | SELECT record FROM table_name_81 WHERE points < 62 AND february > 16 AND score = "8–7" |
CREATE TABLE table_204_801 (
id number,
"year" number,
"derby\nwinner" text,
"galaxy" number,
"draw" number,
"chivas" number
) | in what year did chivas have the same number of wins as in 2012 ? | SELECT "year" FROM table_204_801 WHERE "year" <> 2012 AND "chivas" = (SELECT "chivas" FROM table_204_801 WHERE "year" = 2012) |
CREATE TABLE table_1601792_4 (
transmitted VARCHAR,
frequency VARCHAR
) | How many stations are transmitted on frequency 7 uhf? | SELECT COUNT(transmitted) FROM table_1601792_4 WHERE frequency = "7 UHF" |
CREATE TABLE table_name_51 (
margin_of_victory VARCHAR,
runner_s__up VARCHAR
) | What was the margin of victory over Brad Faxon? | SELECT margin_of_victory FROM table_name_51 WHERE runner_s__up = "brad faxon" |
CREATE TABLE table_name_84 (
recorded VARCHAR,
translation VARCHAR
) | What is the record for Brussels translations? | SELECT recorded FROM table_name_84 WHERE translation = "brussels" |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostTypes (
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 n... | Members by Age oldest first. StackOverflow members from oldest to youngest, by reputation over 1000. | SELECT TOP(1500) AS Id, DisplayName, Age, Reputation, CreationDate, LastAccessDate, 'http://stackoverflow.com/users/' + CAST(Id AS VARCHAR) AS Url FROM Users WHERE NOT Age IS NULL AND Reputation > 1 ORDER BY Age DESC, Reputation DESC |
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 jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE departments (
DEP... | For those employees who did not have any job in the past, return a bar chart about the distribution of job_id and the average of department_id , and group by attribute job_id, and I want to list from high to low by the y axis. | SELECT JOB_ID, AVG(DEPARTMENT_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY AVG(DEPARTMENT_ID) DESC |
CREATE TABLE table_18519 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text,
"Candidates" text
) | What was the result in the election where the incumbent was first elected in 1942? | SELECT "Result" FROM table_18519 WHERE "First elected" = '1942' |
CREATE TABLE table_77999 (
"Round" text,
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text
) | What is the Venue with a Date with 14 april 2002? | SELECT "Venue" FROM table_77999 WHERE "Date" = '14 april 2002' |
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE time_zone (
time_zone_code tex... | flights from NASHVILLE to SEATTLE | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'NASHVILLE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SEAT... |
CREATE TABLE table_28243691_2 (
institution VARCHAR,
location VARCHAR
) | What school is located in Huntsville, Texas? | SELECT institution FROM table_28243691_2 WHERE location = "Huntsville, Texas" |
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as ... | List all Meth Res Physiology courses that give 9 credits . | SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%Meth Res Physiology%' OR name LIKE '%Meth Res Physiology%') AND credits = 9 |
CREATE TABLE table_12232526_2 (
hull_numbers INTEGER
) | what is the maximum number of hull numbers? | SELECT MAX(hull_numbers) FROM table_12232526_2 |
CREATE TABLE table_11690135_1 (
interview VARCHAR,
country VARCHAR
) | How many interviews were there for Miss Virginia? | SELECT COUNT(interview) FROM table_11690135_1 WHERE country = "Virginia" |
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
)
... | How many of the Spanish speaking patients were born before the year 2052? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "SPAN" AND demographic.dob_year < "2052" |
CREATE TABLE table_name_29 (
length VARCHAR,
junctions VARCHAR,
route_name VARCHAR
) | What's the length of route FM 2895 with junctions sh 359 us 59? | SELECT length FROM table_name_29 WHERE junctions = "sh 359 us 59" AND route_name = "fm 2895" |
CREATE TABLE table_43214 (
"Rank" real,
"Name" text,
"Span metres" real,
"Span feet" real,
"Material" text,
"Year opened" text,
"Country" text
) | Which country's material was concrete when the span metres were less than 270, span feet is more than 837, and the year opened was 1943? | SELECT "Country" FROM table_43214 WHERE "Material" = 'concrete' AND "Span metres" < '270' AND "Span feet" > '837' AND "Year opened" = '1943' |
CREATE TABLE table_name_56 (
tries_against VARCHAR,
tries_for VARCHAR
) | What is Tries Against, when Tries For is 21? | SELECT tries_against FROM table_name_56 WHERE tries_for = "21" |
CREATE TABLE endowment (
endowment_id int,
School_id int,
donator_name text,
amount real
)
CREATE TABLE budget (
School_id int,
Year int,
Budgeted int,
total_budget_percent_budgeted real,
Invested int,
total_budget_percent_invested real,
Budget_invested_percent text
)
CREAT... | Compare the total enrollment in each county with a bar chart, sort y-axis from low to high order. | SELECT County, SUM(Enrollment) FROM School GROUP BY County ORDER BY SUM(Enrollment) |
CREATE TABLE table_25926120_3 (
awardee_s_ VARCHAR,
name_of_award VARCHAR
) | Who won best actress? | SELECT awardee_s_ FROM table_25926120_3 WHERE name_of_award = "Best Actress" |
CREATE TABLE table_57765 (
"Heat." real,
"Race Title" text,
"Circuit" text,
"Location / State" text,
"Date" text,
"Winner" text,
"Team" text
) | What is the location/state of the race on 16 Jun? | SELECT "Location / State" FROM table_57765 WHERE "Date" = '16 jun' |
CREATE TABLE table_name_3 (
mall_name VARCHAR,
stores VARCHAR
) | Which Mall has 140 stores? | SELECT mall_name FROM table_name_3 WHERE stores = "140" |
CREATE TABLE table_name_39 (
poles INTEGER,
points VARCHAR,
class VARCHAR,
team VARCHAR
) | How many Poles have a Class of 125cc, and a Team of matteoni racing team, and Points larger than 3? | SELECT SUM(poles) FROM table_name_39 WHERE class = "125cc" AND team = "matteoni racing team" AND points > 3 |
CREATE TABLE table_name_28 (
money___ VARCHAR,
to_par VARCHAR,
score VARCHAR
) | What is the amount of money that a +5 to par with a score of 76-69-70-70=285? | SELECT COUNT(money___) AS $__ FROM table_name_28 WHERE to_par = "+5" AND score = 76 - 69 - 70 - 70 = 285 |
CREATE TABLE table_39885 (
"Name" text,
"Novelty" text,
"Status" text,
"Authors" text,
"Unit" text,
"Location" text,
"Notes" text
) | Who has the status of jr synonym of protosialis casca? | SELECT "Novelty" FROM table_39885 WHERE "Status" = 'jr synonym of protosialis casca' |
CREATE TABLE table_2560677_1 (
artist_s_ VARCHAR,
start_date VARCHAR
) | How many artist(s) have a start date is 1966-12-12? | SELECT COUNT(artist_s_) FROM table_2560677_1 WHERE start_date = "1966-12-12" |
CREATE TABLE table_11867 (
"Name" text,
"Premiere" text,
"Finale" text,
"Original teams" text,
"The Biggest Loser" text,
"At-Home Winner" text
) | What were the original teams for the season that was won by Danni Allen? | SELECT "Original teams" FROM table_11867 WHERE "The Biggest Loser" = 'danni allen' |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | what is date of birth of subject id 65652? | SELECT demographic.dob FROM demographic WHERE demographic.subject_id = "65652" |
CREATE TABLE table_38991 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | Who ha the gold and 1 bronze, and more than 0 silver? | SELECT "Gold" FROM table_38991 WHERE "Bronze" = '1' AND "Silver" > '0' |
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 ... | what was the medication patient 17462 was prescribed for the first time on this hospital visit via the iv route? | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 17462 AND admissions.dischtime IS NULL) AND prescriptions.route = 'iv' ORDER BY prescriptions.startdate LIMIT 1 |
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,... | what economy flights are available from DALLAS to BALTIMORE on 7 25 1991 | 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, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis AS FARE_BASIS_0, fare_basis AS FARE_BASIS_1, flight, flight_fare WHERE ((DATE... |
CREATE TABLE table_68325 (
"Year" text,
"Human Resources & Operations" text,
"Local Affairs" text,
"Academic & University Affairs" text,
"External Affairs" text
) | Who was in external affairs when Jakki Doyle was in Human Resources & Operations? | SELECT "External Affairs" FROM table_68325 WHERE "Human Resources & Operations" = 'jakki doyle' |
CREATE TABLE table_12856 (
"Designation" text,
"Launch date/time ( GMT )" text,
"Mass" text,
"Apogee" text,
"Inclination" text
) | What is Mass, when Designation is Prognoz 2? | SELECT "Mass" FROM table_12856 WHERE "Designation" = 'prognoz 2' |
CREATE TABLE table_57184 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" text
) | What is the earliest year a chassis of ferrari 312t and results of 31 points occurred? | SELECT MIN("Year") FROM table_57184 WHERE "Chassis" = 'ferrari 312t' AND "Points" = '31' |
CREATE TABLE railway_manage (
railway_id number,
manager_id number,
from_year text
)
CREATE TABLE train (
train_id number,
train_num text,
name text,
from text,
arrival text,
railway_id number
)
CREATE TABLE railway (
railway_id number,
railway text,
builder text,
b... | Show the working years of managers in descending order of their level. | SELECT working_year_starts FROM manager ORDER BY level DESC |
CREATE TABLE table_name_74 (
top_5 INTEGER,
top_10 VARCHAR,
top_25 VARCHAR
) | What is the average Top-5 finishes with 2 as the Top-10 and a greater than 4 Top-25? | SELECT AVG(top_5) FROM table_name_74 WHERE top_10 = 2 AND top_25 > 4 |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,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 T... | For all employees who have the letters D or S in their first name, give me the comparison about the sum of manager_id over the hire_date bin hire_date by weekday by a bar chart, and rank in desc by the total number please. | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SUM(MANAGER_ID) DESC |
CREATE TABLE table_name_74 (
icao VARCHAR,
airport VARCHAR
) | Name the ICAO for lilongwe international airport | SELECT icao FROM table_name_74 WHERE airport = "lilongwe international airport" |
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 (
allergy... | had patient 021-100763 undergone any procedure of ct scan in 2105? | SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-100763')) AND treatment.treatmentname = 'ct scan' AND STRFTIME('%y', tre... |
CREATE TABLE loan (
loan_id text,
loan_type text,
cust_id text,
branch_id text,
amount number
)
CREATE TABLE bank (
branch_id number,
bname text,
no_of_customers number,
city text,
state text
)
CREATE TABLE customer (
cust_id text,
cust_name text,
acc_type text,
... | Count the number of bank branches. | SELECT COUNT(*) FROM bank |
CREATE TABLE table_26315 (
"Rank" real,
"Operators Name" text,
"Technology" text,
"Subscribers (in millions)" text,
"Ownership" text,
"Market Share" text
) | What was the market share of the operator whose technology is CDMA EVDO GSM EDGE HSPA+? | SELECT "Market Share" FROM table_26315 WHERE "Technology" = 'CDMA EVDO GSM EDGE HSPA+' |
CREATE TABLE table_name_57 (
role VARCHAR,
genre VARCHAR,
year VARCHAR
) | What drama role does she play in 1973? | SELECT role FROM table_name_57 WHERE genre = "drama" AND year = 1973 |
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 medication (
medi... | what is the name of a procedure that patient 015-94351 has been given for two times in 07/last year? | SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, COUNT(treatment.treatmenttime) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid ... |
CREATE TABLE table_30108930_6 (
position VARCHAR,
player VARCHAR
) | What is Tyrell Francisco's player position? | SELECT position FROM table_30108930_6 WHERE player = "Tyrell Francisco" |
CREATE TABLE table_17738 (
"Year" real,
"Song title" text,
"Artist" text,
"Master recording ?" text,
"Release date" text,
"Single / Pack" text
) | How many master recordings are there for 'Famous for Nothing'? | SELECT COUNT("Master recording ?") FROM table_17738 WHERE "Song title" = 'Famous For Nothing' |
CREATE TABLE table_name_90 (
rank VARCHAR,
title VARCHAR
) | What rank did Best Friends receive? | SELECT rank FROM table_name_90 WHERE title = "best friends" |
CREATE TABLE table_21729 (
"Series #" real,
"Episode #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"U.S. viewers (million)" text,
"Original airdate" text,
"Production Code" text
) | What is the production code of the episode 'The Night Moves', which was directed by Patrick Norris? | SELECT "Production Code" FROM table_21729 WHERE "Directed by" = 'Patrick Norris' AND "Title" = 'The Night Moves' |
CREATE TABLE table_name_74 (
nation VARCHAR,
second VARCHAR
) | Glenys Bakker was second for which nation? | SELECT nation FROM table_name_74 WHERE second = "glenys bakker" |
CREATE TABLE table_53062 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | Tell me the driver for grid less than 19 and Laps more than 59 with time/retired of +0.294 | SELECT "Driver" FROM table_53062 WHERE "Grid" < '19' AND "Laps" > '59' AND "Time/Retired" = '+0.294' |
CREATE TABLE table_24074130_5 (
against VARCHAR,
opponent VARCHAR
) | What is every entry for against with opponent Andreas Vinciguerra? | SELECT against FROM table_24074130_5 WHERE opponent = "Andreas Vinciguerra" |
CREATE TABLE film_market_estimation (
Estimation_ID int,
Low_Estimate real,
High_Estimate real,
Film_ID int,
Type text,
Market_ID int,
Year int
)
CREATE TABLE film (
Film_ID int,
Title text,
Studio text,
Director text,
Gross_in_dollar int
)
CREATE TABLE market (
Mar... | Please show the number of films for each type in a bar chart, could you order in descending by the Y-axis? | SELECT Type, COUNT(Type) FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID GROUP BY Type ORDER BY COUNT(Type) DESC |
CREATE TABLE route (
train_id int,
station_id int
)
CREATE TABLE station (
id int,
network_name text,
services text,
local_authority text
)
CREATE TABLE train (
id int,
train_number int,
name text,
origin text,
destination text,
time text,
interval text
)
CREATE TA... | Give me a bar chart for the number of services of each services, and could you display x-axis in desc order? | SELECT services, COUNT(services) FROM station GROUP BY services ORDER BY services DESC |
CREATE TABLE table_11924 (
"Tallangatta DFL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | What is the total number of byes that has 11 wins and a Tallangatta DFL of Barnawartha? | SELECT COUNT("Byes") FROM table_11924 WHERE "Wins" = '11' AND "Tallangatta DFL" = 'barnawartha' |
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 (
... | what is days of hospital stay and lab test category of subject id 18372? | SELECT demographic.days_stay, lab."CATEGORY" FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.subject_id = "18372" |
CREATE TABLE volume (
Volume_ID int,
Volume_Issue text,
Issue_Date text,
Weeks_on_Top real,
Song text,
Artist_ID int
)
CREATE TABLE artist (
Artist_ID int,
Artist text,
Age int,
Famous_Title text,
Famous_Release_date text
)
CREATE TABLE music_festival (
ID int,
Musi... | Return the results of all music festivals using a bar chart, list in descending by the X. | SELECT Result, COUNT(Result) FROM music_festival GROUP BY Result ORDER BY Result DESC |
CREATE TABLE table_34910 (
"Version" text,
"Length" text,
"Album" text,
"Remixed by" text,
"Year" real
) | How long was the instrumental version in 1986? | SELECT "Length" FROM table_34910 WHERE "Year" = '1986' AND "Version" = 'instrumental' |
CREATE TABLE table_66418 (
"School" text,
"Location" text,
"Mascot" text,
"Enrollment" real,
"IHSAA Class" text,
"# / County" text
) | Which IHSAA Class has a Location of columbia city? | SELECT "IHSAA Class" FROM table_66418 WHERE "Location" = 'columbia city' |
CREATE TABLE cinema (
name VARCHAR,
openning_year VARCHAR,
capacity VARCHAR
) | Show name, opening year, and capacity for each cinema. | SELECT name, openning_year, capacity FROM cinema |
CREATE TABLE table_7853 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
) | WHAT IS THE PLACE THAT HAS SCORE OF 65 OR BETTER, FOR ROCCO MEDIATE? | SELECT "Place" FROM table_7853 WHERE "Score" > '65' AND "Player" = 'rocco mediate' |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id num... | how many days has it been since the last time patient 65582 stayed on the current hospital visit in careunit micu? | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 65582 AND admissions.dischtime IS NULL) AND transfers.careunit = 'micu' ORDER BY transfers.intime DESC LIMIT 1 |
CREATE TABLE table_79723 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What's the rank of Turkey (TUR) with a total more than 2? | SELECT COUNT("Rank") FROM table_79723 WHERE "Nation" = 'turkey (tur)' AND "Total" > '2' |
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_p... | Who has not taught TURKISH 202 ? | SELECT DISTINCT name FROM instructor WHERE NOT name IN (SELECT INSTRUCTORalias1.name FROM course AS COURSEalias0 INNER JOIN course_offering AS COURSE_OFFERINGalias0 ON COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id INNER JOIN offering_instructor AS OFFERING_INSTRUCTOR ON OFFERING_OFFERING_ID = COURSE_OFFERING... |
CREATE TABLE table_49307 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | What is the average Week, when Opponent is Minnesota Vikings? | SELECT AVG("Week") FROM table_49307 WHERE "Opponent" = 'minnesota vikings' |
CREATE TABLE table_61327 (
"Outcome" text,
"Date" real,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score in the final" text
) | Name the Partner which is in 1979, and Opponents in the final of heinz g nthardt bob hewitt? | SELECT "Partner" FROM table_61327 WHERE "Date" = '1979' AND "Opponents in the final" = 'heinz günthardt bob hewitt' |
CREATE TABLE table_2484 (
"Issuer" text,
"Issue Date" text,
"ISIN" text,
"Amount Issued [\u20ac]" text,
"Coupon" text,
"Maturity" text
) | What is the ISIN that has a coupon of 1.02 and a value issued of 447,000,000? | SELECT "ISIN" FROM table_2484 WHERE "Coupon" = '1.02' AND "Amount Issued [\u20ac]" = '447,000,000' |
CREATE TABLE table_name_34 (
party VARCHAR,
electorate VARCHAR
) | What party is the member that has an electorate of Lindsay? | SELECT party FROM table_name_34 WHERE electorate = "lindsay" |
CREATE TABLE table_21716 (
"Class" text,
"Part 1" text,
"Part 2" text,
"Part 3" text,
"Part 4" text,
"Verb meaning" text,
"Usual PIE origin" text
) | What is the verb meaning for *bundun? | SELECT "Verb meaning" FROM table_21716 WHERE "Part 3" = '*bundun' |
CREATE TABLE Subjects (
subject_id INTEGER,
subject_name VARCHAR(120)
)
CREATE TABLE Course_Authors_and_Tutors (
author_id INTEGER,
author_tutor_ATB VARCHAR(3),
login_name VARCHAR(40),
password VARCHAR(40),
personal_name VARCHAR(80),
middle_name VARCHAR(80),
family_name VARCHAR(80),... | Find the enrollment date for all the tests that have 'Pass' result, and count them by a bar chart | SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass" |
CREATE TABLE table_64429 (
"Player" text,
"Original Season" text,
"Gender" text,
"Eliminated" text,
"Placing" text
) | Who's the player eliminated on episode 8 of Fresh Meat? | SELECT "Player" FROM table_64429 WHERE "Original Season" = 'fresh meat' AND "Eliminated" = 'episode 8' |
CREATE TABLE editor (
editor_id number,
name text,
age number
)
CREATE TABLE journal_committee (
editor_id number,
journal_id number,
work_type text
)
CREATE TABLE journal (
journal_id number,
date text,
theme text,
sales number
) | List the names of editors who are older than 25. | SELECT name FROM editor WHERE age > 25 |
CREATE TABLE table_name_3 (
date VARCHAR,
week VARCHAR,
result VARCHAR
) | What was the date of the game with a result of bye before week 12? | SELECT date FROM table_name_3 WHERE week < 12 AND result = "bye" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.