table stringlengths 33 7.14k | question stringlengths 4 1.06k | output stringlengths 2 4.44k ⌀ |
|---|---|---|
CREATE TABLE table_27711 (
"Software" text,
"Description" text,
"Platform" text,
"License" text,
"Developer" text
) | What is the description of the intact software? | SELECT "Description" FROM table_27711 WHERE "Software" = 'IntAct' |
CREATE TABLE table_13555999_1 (
university_students_and_adults__18yrs VARCHAR,
_ VARCHAR,
senior_high_school__15_18_yrs_ VARCHAR
) | What amount of the university students and adults ehre the the senior high school is 26mm? | SELECT university_students_and_adults__18yrs + _ FROM table_13555999_1 WHERE senior_high_school__15_18_yrs_ = "26mm" |
CREATE TABLE table_40291 (
"Week #" text,
"Theme" text,
"Song choice" text,
"Original artist" text,
"Order #" real,
"Result" text
) | Which week had safe as the result and Dolly Parton as the theme? | SELECT "Week #" FROM table_40291 WHERE "Result" = 'safe' AND "Theme" = 'dolly parton' |
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE instructor (
... | What will Prof. Lindsey Lepley be teaching next year ? | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Lindsey Lepley%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.of... |
CREATE TABLE table_name_10 (
silver INTEGER,
total VARCHAR,
gold VARCHAR
) | Which Silver has a Total of 7, and a Gold larger than 1? | SELECT AVG(silver) FROM table_name_10 WHERE total = 7 AND gold > 1 |
CREATE TABLE table_54513 (
"Year" real,
"Winner" text,
"Jockey" text,
"Trainer" text,
"Owner" text,
"Distance (Miles)" text,
"Time" text
) | Who was the trainer with Robert Courtney was owner? | SELECT "Trainer" FROM table_54513 WHERE "Owner" = 'robert courtney' |
CREATE TABLE table_60505 (
"Date" text,
"Opponent" text,
"Score" text,
"Site/Stadium" text,
"Loss" text,
"Save" text,
"Attendance" real,
"Overall Record" text,
"NCAAT Record" text
) | What is the save of the game where moran (1-2) lost? | SELECT "Save" FROM table_60505 WHERE "Loss" = 'moran (1-2)' |
CREATE TABLE table_name_64 (
date VARCHAR,
record VARCHAR
) | When was the record 27-25? | SELECT date FROM table_name_64 WHERE record = "27-25" |
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,
... | how many of the patients aged below 68 were cape speaking? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "CAPE" AND demographic.age < "68" |
CREATE TABLE table_name_46 (
year__ceremony_ VARCHAR,
film_title_used_in_nomination VARCHAR
) | In what Year was Labyrinth nominated? | SELECT year__ceremony_ FROM table_name_46 WHERE film_title_used_in_nomination = "labyrinth" |
CREATE TABLE musical (
Musical_ID int,
Name text,
Year int,
Award text,
Category text,
Nominee text,
Result text
)
CREATE TABLE actor (
Actor_ID int,
Name text,
Musical_ID int,
Character text,
Duration text,
age int
) | Return a bar chart on how many musicals has each nominee been nominated for?, and could you order by the X in asc? | SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee ORDER BY Nominee |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE vitalperiodic (
vitalperio... | had patient 027-165214 in 02/this year been allergic to any substance? | SELECT COUNT(*) > 0 FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-165214')) AND DATETIME(allergy.allergytime, 'start of year') = DATETIME(CURR... |
CREATE TABLE table_49621 (
"Region (year)" text,
"No. 1" text,
"No. 2" text,
"No. 3" text,
"No. 4" text,
"No. 5" text,
"No. 6" text,
"No. 7" text,
"No. 8" text,
"No. 9" text,
"No. 10" text
) | What is the No. 6 of the person with a No. 10 of Joshua and a No. 8 of Andrew? | SELECT "No. 6" FROM table_49621 WHERE "No. 10" = 'joshua' AND "No. 8" = 'andrew' |
CREATE TABLE table_name_66 (
record VARCHAR,
score VARCHAR
) | Score of 2 1 has what record? | SELECT record FROM table_name_66 WHERE score = "2–1" |
CREATE TABLE table_24126 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Black Knights points" real,
"Opponents" real,
"Record" text
) | Name the opponents stanford | SELECT "Opponents" FROM table_24126 WHERE "Opponent" = 'Stanford' |
CREATE TABLE table_name_70 (
year INTEGER,
english_title VARCHAR
) | What is the Year of submission of the Film The Art of Crying? | SELECT MIN(year) FROM table_name_70 WHERE english_title = "the art of crying" |
CREATE TABLE member_attendance (
Member_ID int,
Performance_ID int,
Num_of_Pieces int
)
CREATE TABLE member (
Member_ID text,
Name text,
Nationality text,
Role text
)
CREATE TABLE performance (
Performance_ID real,
Date text,
Host text,
Location text,
Attendance int
) | Show different locations and the number of performances at each location by a bar chart. | SELECT Location, COUNT(*) FROM performance GROUP BY Location |
CREATE TABLE table_204_987 (
id number,
"city/municipality" text,
"no. of\nbarangays" number,
"area\n(km2)" number,
"population\n(2010 census)" number,
"pop. density\n(per km2)" number
) | which municipality has the largest area ? | SELECT "city/municipality" FROM table_204_987 ORDER BY "area\n(km2)" DESC LIMIT 1 |
CREATE TABLE table_name_47 (
million_czk VARCHAR
) | What 2007 number when the million CZK shows operating revenues? | SELECT COUNT(2007) FROM table_name_47 WHERE million_czk = "operating revenues" |
CREATE TABLE table_name_20 (
position VARCHAR,
player VARCHAR
) | Which position does Robert Nkemdiche play? | SELECT position FROM table_name_20 WHERE player = "robert nkemdiche" |
CREATE TABLE table_name_23 (
to_par VARCHAR,
score VARCHAR
) | Who has the par score of 70-76-68-214? | SELECT to_par FROM table_name_23 WHERE score = "70-76-68-214" |
CREATE TABLE professor (
emp_num number,
dept_code text,
prof_office text,
prof_extension text,
prof_high_degree text
)
CREATE TABLE employee (
emp_num number,
emp_lname text,
emp_fname text,
emp_initial text,
emp_jobcode text,
emp_hiredate time,
emp_dob time
)
CREATE T... | Find the number of classes offered for all class rooms that held at least 2 classes. | SELECT COUNT(*), class_room FROM class GROUP BY class_room HAVING COUNT(*) >= 2 |
CREATE TABLE table_name_2 (
date VARCHAR,
away_team VARCHAR
) | What is Date, when Away Team is 'Gillingham'? | SELECT date FROM table_name_2 WHERE away_team = "gillingham" |
CREATE TABLE Dorm (
dormid INTEGER,
dorm_name VARCHAR(20),
student_capacity INTEGER,
gender VARCHAR(1)
)
CREATE TABLE Lives_in (
stuid INTEGER,
dormid INTEGER,
room_number INTEGER
)
CREATE TABLE Has_amenity (
dormid INTEGER,
amenid INTEGER
)
CREATE TABLE Dorm_amenity (
amenid ... | Bar chart of mean age from each city code, could you display bars from high to low order? | SELECT city_code, AVG(Age) FROM Student GROUP BY city_code ORDER BY city_code DESC |
CREATE TABLE table_name_77 (
date VARCHAR,
circuit VARCHAR
) | On what Date is there a race on the Circuit of brands hatch? | SELECT date FROM table_name_77 WHERE circuit = "brands hatch" |
CREATE TABLE table_30047613_12 (
streak VARCHAR,
date VARCHAR
) | in april 13 what was the streak | SELECT streak FROM table_30047613_12 WHERE date = "April 13" |
CREATE TABLE table_21091145_1 (
black_knights_points VARCHAR,
game VARCHAR
) | Name the number of black knights points for 3 game | SELECT COUNT(black_knights_points) FROM table_21091145_1 WHERE game = 3 |
CREATE TABLE table_78573 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
) | Which To par has a Place of t4, and wayne grady is in? | SELECT "To par" FROM table_78573 WHERE "Place" = 't4' AND "Player" = 'wayne grady' |
CREATE TABLE Products (
product_id INTEGER,
color_code VARCHAR(15),
product_category_code VARCHAR(15),
product_name VARCHAR(80),
typical_buying_price VARCHAR(20),
typical_selling_price VARCHAR(20),
product_description VARCHAR(255),
other_product_details VARCHAR(255)
)
CREATE TABLE Ref_P... | A bar chart for finding the number of the category descriptions of the products whose descriptions include letter 't'. | SELECT product_category_description, COUNT(product_category_description) FROM Ref_Product_Categories AS T1 JOIN Products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%' GROUP BY product_category_description |
CREATE TABLE table_name_44 (
matches INTEGER,
points VARCHAR,
results VARCHAR
) | Points larger than 6, and a Results of 522:443 had what lowest matches? | SELECT MIN(matches) FROM table_name_44 WHERE points > 6 AND results = "522:443" |
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
... | Which courses are available that provide 16 credits ? | SELECT DISTINCT name, number FROM course WHERE credits = 16 AND department = 'EECS' |
CREATE TABLE students (
student_id number,
date_of_registration time,
date_of_latest_logon time,
login_name text,
password text,
personal_name text,
middle_name text,
family_name text
)
CREATE TABLE course_authors_and_tutors (
author_id number,
author_tutor_atb text,
login_n... | What are the login names used both by some course authors and some students? | SELECT login_name FROM course_authors_and_tutors INTERSECT SELECT login_name FROM students |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
a... | tell me the three most common diagnoses of patients aged 40s since 4 years ago? | SELECT t1.diagnosisname FROM (SELECT diagnosis.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 40 AND 49) AND DATETIME(diagnosis.diagnosistime) >= DATETIME(CURRENT_TIME(), '-4 yea... |
CREATE TABLE table_name_75 (
player VARCHAR,
hometown VARCHAR
) | What Player comes from the Hometown of Wichita, KS? | SELECT player FROM table_name_75 WHERE hometown = "wichita, ks" |
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 employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL v... | For those employees who did not have any job in the past, return a scatter chart about the correlation between salary and department_id . | SELECT SALARY, DEPARTMENT_ID FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) |
CREATE TABLE table_204_33 (
id number,
"number" number,
"name" text,
"year built" number,
"boat builder" text,
"current status" text
) | what boat builder created the hie after the hirondelle ? | SELECT "boat builder" FROM table_204_33 WHERE "name" = 'hie' |
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 demographic (... | provide the number of patients whose ethnicity is black/cape verdean and drug name is posaconazole suspension? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND prescriptions.drug = "Posaconazole Suspension" |
CREATE TABLE table_45249 (
"Name" text,
"Pinnacle height" text,
"Structure type" text,
"Main use" text,
"Country" text,
"Town" text
) | What's the name of the structure at Egypt, Arkansas? | SELECT "Name" FROM table_45249 WHERE "Town" = 'egypt, arkansas' |
CREATE TABLE table_name_65 (
romaji_title VARCHAR,
tv_station VARCHAR,
average_ratings VARCHAR
) | Which Romaji Title has a TV Station of fuji tv, and Average Ratings of 12.41%? | SELECT romaji_title FROM table_name_65 WHERE tv_station = "fuji tv" AND average_ratings = "12.41%" |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE prescriptio... | what is the three year survival probability of a patient who was prescribed clindamycin hcl after having been diagnosed with complic med care nec/nos? | SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t4.charttime) > 3 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.subject_id, t2.charttime FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd... |
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
)
CRE... | Positive scoring comments for a given user. https://chat.stackoverflow.com/transcript/message/49083575#49083575 | SELECT Id AS "comment_link", Score, CreationDate, PostId AS "post_link" FROM Comments WHERE UserId = '##userid:int?2756409##' AND Score > 5 ORDER BY Score DESC |
CREATE TABLE table_25012 (
"English name" text,
"Georgian name" text,
"Transliteration" text,
"Date" text,
"Author" text,
"Period covered" text
) | what is the date for when the georgian name is ? | SELECT "Date" FROM table_25012 WHERE "Georgian name" = 'ცხოვრება და უწყება ბაგრატონიანთა' |
CREATE TABLE table_name_61 (
order VARCHAR,
elector VARCHAR
) | What's the Order with an Elector of Marino Bulcani? | SELECT order FROM table_name_61 WHERE elector = "marino bulcani" |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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 job_history (
EMPLOYEE... | Use a histogram to show the department's id and corresponding employees' first name, list from high to low by the FIRST_NAME. | SELECT FIRST_NAME, DEPARTMENT_ID FROM employees ORDER BY FIRST_NAME DESC |
CREATE TABLE table_34101 (
"Round" real,
"Track" text,
"Date" text,
"Pole Position" text,
"Fastest Race Lap" text,
"Winner" text,
"Team" text
) | what is the pole position of Round 9 | SELECT "Pole Position" FROM table_34101 WHERE "Round" = '9' |
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comme... | Find answers with a given user's comments. | SELECT c.Id AS "Comment ID", c.CreationDate AS "Comment Date", u.Id AS "User ID", u.DisplayName AS "User Name", a.Id AS "Answer ID", q.Id AS "Question ID", q.Title AS "Question Title" FROM Posts AS a JOIN Posts AS q ON q.Id = a.ParentId JOIN Comments AS c ON c.PostId = a.Id JOIN Users AS u ON u.Id = a.OwnerUserId WHERE... |
CREATE TABLE table_58457 (
"Driver" text,
"Constructor" text,
"Laps" text,
"Time/Retired" text,
"Grid" text
) | What is the time/retired when the grid is 19? | SELECT "Time/Retired" FROM table_58457 WHERE "Grid" = '19' |
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 ... | how many hours have passed since last time patient 23436 was diagnosed with senile dementia uncomp during this hospital visit? | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', diagnoses_icd.charttime)) FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'senile dementia uncomp') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admi... |
CREATE TABLE table_64098 (
"Driver" text,
"Team" text,
"Laps" real,
"Time/Retired" text,
"Grid" real,
"Points" real
) | What is the average amount of points larger than 154 laps? | SELECT AVG("Points") FROM table_64098 WHERE "Laps" > '154' |
CREATE TABLE table_name_41 (
event VARCHAR,
opponent VARCHAR
) | What event was Donald Ouimet involved? | SELECT event FROM table_name_41 WHERE opponent = "donald ouimet" |
CREATE TABLE table_4678 (
"Team" text,
"Constructor" text,
"Motorcycle" text,
"Rider" text,
"Rounds" text
) | Which round has the mv agusta f4 1000 mt? | SELECT "Rounds" FROM table_4678 WHERE "Motorcycle" = 'mv agusta f4 1000 mt' |
CREATE TABLE table_22560 (
"Date" real,
"Single" text,
"Backed with" text,
"Record label" text,
"Format" text,
"Other details" text
) | What year was 'moped girls' released? | SELECT "Date" FROM table_22560 WHERE "Single" = 'Moped Girls' |
CREATE TABLE table_7705 (
"Year" real,
"Date" text,
"Home" text,
"Score" text,
"Away" text,
"Venue" text
) | Who was at Home at the Bucharest Venue with a Score of 9-9? | SELECT "Home" FROM table_7705 WHERE "Venue" = 'bucharest' AND "Score" = '9-9' |
CREATE TABLE table_12648 (
"Perpetrator" text,
"Year" text,
"Location" text,
"Country" text,
"Killed" text
) | What is the location for Egypt in 2013? | SELECT "Location" FROM table_12648 WHERE "Year" = '2013' AND "Country" = 'egypt' |
CREATE TABLE table_name_87 (
time VARCHAR,
date VARCHAR
) | What was the time of the game on April 5? | SELECT time FROM table_name_87 WHERE date = "april 5" |
CREATE TABLE AssignedTo (
Scientist int,
Project char(4)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50),
Hours int
)
CREATE TABLE Scientists (
SSN int,
Name Char(30)
) | Find the number of the name of the project for which a scientist whose name contains Smith is assigned to, and show by the how many name in descending please. | SELECT T2.Name, COUNT(T2.Name) FROM AssignedTo AS T1 JOIN Projects AS T2 ON T1.Project = T2.Code JOIN Scientists AS T3 ON T1.Scientist = T3.SSN WHERE T3.Name LIKE '%Smith%' GROUP BY T2.Name ORDER BY COUNT(T2.Name) DESC |
CREATE TABLE table_name_79 (
ε__m__1_cm__1__ VARCHAR,
mass__g_mol_ VARCHAR
) | Which (M -1 cm -1) has a molar mass of 1008 g/mol? | SELECT ε__m__1_cm__1__ FROM table_name_79 WHERE mass__g_mol_ = "1008" |
CREATE TABLE table_16706 (
"Rnd" real,
"Race" text,
"Date" text,
"Location" text,
"Pole Position" text,
"Fastest Lap" text,
"Race Winner" text,
"Constructor" text,
"Report" text
) | What was the date for monaco grand prix? | SELECT "Date" FROM table_16706 WHERE "Race" = 'Monaco Grand Prix' |
CREATE TABLE table_name_63 (
prog_cons VARCHAR,
dates VARCHAR,
polling_firm VARCHAR,
liberal VARCHAR
) | According to the February 2009 poll by the Corporate Research Associates that reported 31% Liberal., what percentage aligned with the Prog. Cons. party? | SELECT prog_cons FROM table_name_63 WHERE polling_firm = "corporate research associates" AND liberal = "31%" AND dates = "february 2009" |
CREATE TABLE table_79003 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Difference" text,
"Points 1" text
) | WHAT IS THE POSITION WITH A LOST OF 6, FOR CAERNARFON TOWN? | SELECT SUM("Position") FROM table_79003 WHERE "Lost" = '6' AND "Team" = 'caernarfon town' |
CREATE TABLE broadcast_share (
channel_id number,
program_id number,
date text,
share_in_percent number
)
CREATE TABLE broadcast (
channel_id number,
program_id number,
time_of_day text
)
CREATE TABLE channel (
channel_id number,
name text,
owner text,
share_in_percent numb... | find the names of programs whose origin is not in Beijing. | SELECT name FROM program WHERE origin <> 'Beijing' |
CREATE TABLE table_name_98 (
competition VARCHAR,
goal INTEGER
) | Which competition has goals less than 2? | SELECT competition FROM table_name_98 WHERE goal < 2 |
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 demographic (... | what is maximum age of patients whose marital status is single and gender is m? | SELECT MAX(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.gender = "M" |
CREATE TABLE table_72009 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text
) | What was the score on April 8? | SELECT "Score" FROM table_72009 WHERE "Date" = 'april 8' |
CREATE TABLE table_name_26 (
type VARCHAR,
locomotive_number VARCHAR
) | What type is locomotive number CTN 46? | SELECT type FROM table_name_26 WHERE locomotive_number = "ctn 46" |
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
... | Show me about the distribution of Nationality and the average of meter_100 , and group by attribute Nationality in a bar chart. | SELECT Nationality, AVG(meter_100) FROM swimmer GROUP BY Nationality |
CREATE TABLE table_name_28 (
attendance VARCHAR,
date VARCHAR
) | What is the total attendance on April 25? | SELECT COUNT(attendance) FROM table_name_28 WHERE date = "april 25" |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_lo... | i need information on flights leaving PHILADELPHIA on friday arriving in OAKLAND california | 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, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'OAKLAND' AND date_day.day_number = 25 AND date_day.month_number = 6 AND d... |
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 t... | How many patients have been diagnosed with type 1 diabetes with neurological manifestations not stated as uncontrolled? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "DMI neuro nt st uncntrld" |
CREATE TABLE table_1140080_2 (
rnd INTEGER,
race VARCHAR
) | what's the minimum rnd with race italian grand prix | SELECT MIN(rnd) FROM table_1140080_2 WHERE race = "Italian Grand Prix" |
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
) | Find the number of different products that are produced by companies at different headquarter cities Plot them as bar chart, I want to display by the name) in ascending. | SELECT Headquarter, COUNT(DISTINCT T1.Name) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code ORDER BY COUNT(DISTINCT T1.Name) |
CREATE TABLE table_name_86 (
opponent VARCHAR,
date VARCHAR
) | Who was the opponent on June 29? | SELECT opponent FROM table_name_86 WHERE date = "june 29" |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title 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
)
C... | what is minimum age of patients whose admission type is elective and year of death is less than 2115? | SELECT MIN(demographic.age) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.dod_year < "2115.0" |
CREATE TABLE table_name_89 (
tamil_months VARCHAR,
english_transliteration VARCHAR
) | What are the months in Tamil that has an english transliteration of Mun-pani? | SELECT tamil_months FROM table_name_89 WHERE english_transliteration = "mun-pani" |
CREATE TABLE table_name_22 (
rating VARCHAR,
air_date VARCHAR,
share VARCHAR
) | What is the total number of Rating(s), when Air Date is June 25, 2008, and when Share is greater than 3? | SELECT COUNT(rating) FROM table_name_22 WHERE air_date = "june 25, 2008" AND share > 3 |
CREATE TABLE table_10547 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was the attendance at the game when the away team scored 21.14 (140)? | SELECT "Crowd" FROM table_10547 WHERE "Away team score" = '21.14 (140)' |
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE student_record (
student_id int,
course_id int,
semest... | For NRE classes , are there any that do not meet on Friday ? | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course_offering.friday = 'N' AND course.department = 'NRE' AND semester.semester = 'WN' AND se... |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title 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
)
... | how many female patients are lab tested under category blood gas? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.gender = "F" AND lab."CATEGORY" = "Blood Gas" |
CREATE TABLE table_50192 (
"Player" text,
"Country" text,
"Year(s) won" real,
"Total" real,
"To par" real,
"Finish" text
) | What is Year(s) Won, when Player is Arnold Palmer? | SELECT "Year(s) won" FROM table_50192 WHERE "Player" = 'arnold palmer' |
CREATE TABLE table_name_41 (
rowers VARCHAR,
notes VARCHAR
) | What rowers have FA as the notes? | SELECT rowers FROM table_name_41 WHERE notes = "fa" |
CREATE TABLE table_10669 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | what is the least laps for driver gerhard berger with a grid more than 6? | SELECT MIN("Laps") FROM table_10669 WHERE "Driver" = 'gerhard berger' AND "Grid" > '6' |
CREATE TABLE table_47756 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the final" text,
"Score" text
) | What is the Date of the match with Opponent in the final of Filip Pol ek? | SELECT "Date" FROM table_47756 WHERE "Opponent in the final" = 'filip polášek' |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
va... | show me patient 28020's length of stay of the last hospital stay. | SELECT STRFTIME('%j', admissions.dischtime) - STRFTIME('%j', admissions.admittime) FROM admissions WHERE admissions.subject_id = 28020 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1 |
CREATE TABLE table_44398 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | What team was the home team when Tottenham Hotspur is the away team? | SELECT "Home team" FROM table_44398 WHERE "Away team" = 'tottenham hotspur' |
CREATE TABLE room (
blockcode VARCHAR,
unavailable VARCHAR
) | What are the unique block codes that have available rooms? | SELECT DISTINCT blockcode FROM room WHERE unavailable = 0 |
CREATE TABLE table_18018 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Record" text,
"Attendance" real
) | What week did the Seahawks play at los angeles memorial coliseum? | SELECT MIN("Week") FROM table_18018 WHERE "Game site" = 'Los Angeles Memorial Coliseum' |
CREATE TABLE table_43687 (
"Nationality" text,
"Position" text,
"Gillingham career" text,
"Apps." real,
"Goals" real
) | When did the mf from England play for Gillingham that made 0 goals and less than 37 appearances? | SELECT "Gillingham career" FROM table_43687 WHERE "Goals" = '0' AND "Apps." < '37' AND "Nationality" = 'england' AND "Position" = 'mf' |
CREATE TABLE table_62598 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" text,
"Finish" text
) | What is the Total for Seve Ballesteros? | SELECT SUM("Total") FROM table_62598 WHERE "Player" = 'seve ballesteros' |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code tex... | tell me the first ward id patient 005-47601 got during the last year? | SELECT patient.wardid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-47601') AND DATETIME(patient.unitadmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY patient.unitadmittime LIMIT 1 |
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 demographic (... | how many patients whose marital status is divorced and procedure long title is small-to-small intestinal anastomosis? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "DIVORCED" AND procedures.long_title = "Small-to-small intestinal anastomosis" |
CREATE TABLE region (
Region_ID int,
Region_name text,
Date text,
Label text,
Format text,
Catalogue text
)
CREATE TABLE member (
Member_ID int,
Member_Name text,
Party_ID text,
In_office text
)
CREATE TABLE party_events (
Event_ID int,
Event_Name text,
Party_ID int... | Show all ministers who do not belong to Progress Party, and count them by a pie chart | SELECT Minister, COUNT(Minister) FROM party WHERE Party_name <> 'Progress Party' GROUP BY Minister |
CREATE TABLE table_14300 (
"Name A[\u203a ]" text,
"Dam or A[\u203a ] Reservoir" text,
"GNIS Feature ID # Link A[\u203a ] B[\u203a ]" real,
"Elevation A[\u203a ]" text,
"Borough or A[\u203a ] Census area" text
) | what is the name a[ ] when the borough or a[ ] census area is ketchikan gateway and the dam or a[ ] reservoir is reservoir? | SELECT "Name A[\u203a ]" FROM table_14300 WHERE "Borough or A[\u203a ] Census area" = 'ketchikan gateway' AND "Dam or A[\u203a ] Reservoir" = 'reservoir' |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
... | when was the last time that until 09/2102 patient 3267 was prescribed a medicine via an subcut route? | SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3267) AND prescriptions.route = 'subcut' AND STRFTIME('%y-%m', prescriptions.startdate) <= '2102-09' ORDER BY prescriptions.startdate DESC LIMIT 1 |
CREATE TABLE table_1571238_2 (
third_place VARCHAR,
team VARCHAR
) | When the team is Toronto how many times did they place third? | SELECT COUNT(third_place) FROM table_1571238_2 WHERE team = "Toronto" |
CREATE TABLE table_58923 (
"Rank" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the fewest bronze medals when the total medals is less than 10, and the gold medals less than 0? | SELECT MIN("Bronze") FROM table_58923 WHERE "Total" < '10' AND "Gold" < '0' |
CREATE TABLE table_72591 (
"Year" text,
"Channel" text,
"Play-by-play" text,
"Color commentator(s)" text,
"Courtside reporter" text,
"Studio host" text,
"Studio analysts" text
) | Who is the studio host for the year 2006-07? | SELECT "Studio host" FROM table_72591 WHERE "Year" = '2006-07' |
CREATE TABLE table_61627 (
"Fin. Pos" real,
"Car No." real,
"Driver" text,
"Team" text,
"Laps" real,
"Time/Retired" text,
"Grid" real,
"Laps Led" real,
"Points" text
) | Which driver finished in position 8? | SELECT "Driver" FROM table_61627 WHERE "Fin. Pos" = '8' |
CREATE TABLE table_train_276 (
"id" int,
"hbv" bool,
"systolic_blood_pressure_sbp" int,
"hiv_infection" bool,
"hcv" bool,
"diastolic_blood_pressure_dbp" int,
"body_mass_index_bmi" float,
"hypertension" bool,
"NOUSE" float
) | subjects must have a bp < 130 / 80 mm hg and no prior history of hypertension. | SELECT * FROM table_train_276 WHERE hypertension = 0 OR systolic_blood_pressure_sbp < 130 OR diastolic_blood_pressure_dbp < 80 |
CREATE TABLE table_1940144_1 (
change_since_2006 VARCHAR,
county VARCHAR
) | How many places did the rank change since 22006 for County Leitrim? | SELECT COUNT(change_since_2006) FROM table_1940144_1 WHERE county = "county Leitrim" |
CREATE TABLE table_name_16 (
round VARCHAR,
player VARCHAR
) | Which round was Tom Morris picked in? | SELECT COUNT(round) FROM table_name_16 WHERE player = "tom morris" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.