table stringlengths 33 7.14k | question stringlengths 4 1.06k | output stringlengths 2 4.44k ⌀ |
|---|---|---|
CREATE TABLE table_1211545_2 (
name VARCHAR,
heavy_vehicle__2_axles_ VARCHAR
) | What is the name of the plaza where the told for heavy vehicles with 2 axles is r20.50? | SELECT name FROM table_1211545_2 WHERE heavy_vehicle__2_axles_ = "R20.50" |
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_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
... | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the sum of manager_id over the hire_date bin hire_date by time by a bar chart, and list Y-axis from high to low order. | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY SUM(MANAGER_ID) DESC |
CREATE TABLE table_10116 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text
) | Who was the visiting team where the decision was Biron on October 4? | SELECT "Visitor" FROM table_10116 WHERE "Decision" = 'biron' AND "Date" = 'october 4' |
CREATE TABLE table_59351 (
"Player" text,
"Round" real,
"Pick" real,
"Position" text,
"NFL Club" text
) | What is the NFL club with pick # 153? | SELECT "NFL Club" FROM table_59351 WHERE "Pick" = '153' |
CREATE TABLE table_75860 (
"Date" text,
"Time" text,
"Home" text,
"Away" text,
"Score" text,
"Ground" text
) | What is the Time with a Ground that is humber college north? | SELECT "Time" FROM table_75860 WHERE "Ground" = 'humber college north' |
CREATE TABLE table_63635 (
"Year" real,
"Category" text,
"Nominee(s)" text,
"Episode" text,
"Result" text
) | What is the latest year when Neal Baer was a nominee, and the result was nominated? | SELECT MAX("Year") FROM table_63635 WHERE "Result" = 'nominated' AND "Nominee(s)" = 'neal baer' |
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 tex... | in a year before, what are the top four most frequent lab tests ordered for patients within 2 months after being diagnosed with acute renal failure - due to sepsis? | SELECT t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'acute renal failure - due to sepsis' AND DATETIME(di... |
CREATE TABLE table_name_38 (
nba_draft VARCHAR,
college VARCHAR
) | What is the NBA Draft status of the person who went to college at LSU? | SELECT nba_draft FROM table_name_38 WHERE college = "lsu" |
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
)
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
... | Give me the comparison about meter_100 over the meter_300 , and could you order by the bar from high to low? | SELECT meter_300, meter_100 FROM swimmer ORDER BY meter_300 DESC |
CREATE TABLE table_70647 (
"Player" text,
"Date" text,
"Original Team" text,
"Offer Team" text,
"Result" text
) | What was David Backes' Offer Team? | SELECT "Offer Team" FROM table_70647 WHERE "Player" = 'david backes' |
CREATE TABLE table_203_465 (
id number,
"name" text,
"population (2002 census)" number,
"population (2007 estimation)" number,
"population (2011 census)" number,
"area (km2)" number,
"density (pop/km2)" number
) | which locality has the least amount of area according to this chart ? | SELECT "name" FROM table_203_465 ORDER BY "area (km2)" LIMIT 1 |
CREATE TABLE table_204_43 (
id number,
"name" text,
"rural\nmunicipality (rm)" text,
"population\n(2011)" number,
"population\n(2006)" number,
"change\n(%)" number,
"land\narea\n(km2)" number,
"population\ndensity\n(per km2)" number
) | what is the total population for aberdeen in 2011 ? | SELECT "population\n(2011)" FROM table_204_43 WHERE "name" = 'aberdeen' |
CREATE TABLE table_3336 (
"Settlement" text,
"Cyrillic Name Other Names" text,
"Type" text,
"Population (2011)" real,
"Largest ethnic group (2002)" text,
"Dominant religion (2002)" text
) | Name the cyrillic name for lazarevo | SELECT "Cyrillic Name Other Names" FROM table_3336 WHERE "Settlement" = 'Lazarevo' |
CREATE TABLE table_name_92 (
name VARCHAR,
maglia_rosa VARCHAR,
young_rider VARCHAR,
country VARCHAR,
giro_wins VARCHAR
) | Who is from italy has 0 giro wins, 0 young rider and less than 3 maglia rosa? | SELECT name FROM table_name_92 WHERE country = "italy" AND giro_wins = 0 AND young_rider = 0 AND maglia_rosa < 3 |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | What is the number of names for each product in the store?, and sort by the Name in descending. | SELECT Name, COUNT(Name) FROM Products GROUP BY Name ORDER BY Name DESC |
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments ... | Who are the upper-level class teachers ? | SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN program_... |
CREATE TABLE Benefits_Overpayments (
council_tax_id VARCHAR,
cmi_cross_ref_id VARCHAR
)
CREATE TABLE CMI_Cross_References (
source_system_code VARCHAR,
cmi_cross_ref_id VARCHAR
) | What is the tax source system code related to the benefits and overpayments? List the code and the benifit id, order by benifit id. | SELECT T1.source_system_code, T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Benefits_Overpayments AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id ORDER BY T2.council_tax_id |
CREATE TABLE table_name_9 (
silver VARCHAR,
rank VARCHAR,
gold VARCHAR
) | What kind of Silver has a Rank of 3, and a Gold smaller than 2? | SELECT COUNT(silver) FROM table_name_9 WHERE rank = "3" AND gold < 2 |
CREATE TABLE table_8894 (
"Position" real,
"Name" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Points" real
) | What is the largest number played with 16 points in a position over 4? | SELECT MAX("Played") FROM table_8894 WHERE "Points" = '16' AND "Position" > '4' |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE course (
c... | Next semester , what classes are offered at 300 -level ? | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number BETWEEN 300 AND 300 + 100 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester... |
CREATE TABLE table_name_47 (
place VARCHAR,
player VARCHAR
) | What place is David Graham in? | SELECT place FROM table_name_47 WHERE player = "david graham" |
CREATE TABLE table_26986076_1 (
sat_21_aug VARCHAR,
thurs_26_aug VARCHAR
) | How many times was the time 20' 05.19 112.703mph on Thurs Aug 26th? | SELECT COUNT(sat_21_aug) FROM table_26986076_1 WHERE thurs_26_aug = "20' 05.19 112.703mph" |
CREATE TABLE table_80032 (
"Type" text,
"Person(s)" text,
"Publisher(s)" text,
"Publication date" text,
"Reported price" text
) | What was the publication date of the photos of Sean Preston Federline that cost $500,000 and were published by People? | SELECT "Publication date" FROM table_80032 WHERE "Reported price" = '$500,000' AND "Publisher(s)" = 'people' AND "Person(s)" = 'sean preston federline' |
CREATE TABLE table_18184 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | what's the result with district being washington 7 | SELECT "Result" FROM table_18184 WHERE "District" = 'Washington 7' |
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
)
... | Get me the number of white russian patients born before year 2103. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND demographic.dob_year < "2103" |
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
)
... | what is procedure long title of subject id 2560? | SELECT procedures.long_title FROM procedures WHERE procedures.subject_id = "2560" |
CREATE TABLE table_name_2 (
october INTEGER,
record VARCHAR,
game VARCHAR
) | Which October has a Record of 5 1 0, and a Game larger than 6? | SELECT AVG(october) FROM table_name_2 WHERE record = "5–1–0" AND game > 6 |
CREATE TABLE table_11622562_1 (
winner VARCHAR,
tournament VARCHAR
) | What's the winner of the Painewebber Invitational tournament? | SELECT winner FROM table_11622562_1 WHERE tournament = "PaineWebber Invitational" |
CREATE TABLE table (
platform VARCHAR,
weight VARCHAR
) | What is the platform if the weight is 131.5g? | SELECT platform FROM table WHERE weight = "131.5g" |
CREATE TABLE table_4885 (
"Year" text,
"Player" text,
"Nationality" text,
"Position" text,
"Club" text
) | What player played for the Balmain Tigers? | SELECT "Player" FROM table_4885 WHERE "Club" = 'balmain tigers' |
CREATE TABLE table_22464685_1 (
author VARCHAR,
english_name VARCHAR
) | Who is the auther when the english name was histories and eulogies of the sovereigns? | SELECT author FROM table_22464685_1 WHERE english_name = "Histories and Eulogies of the Sovereigns" |
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... | Visualize a bar chart about the distribution of ACC_Regular_Season and Team_ID , show by the y axis in asc. | SELECT ACC_Regular_Season, Team_ID FROM basketball_match ORDER BY Team_ID |
CREATE TABLE table_6034 (
"Year" real,
"Group" text,
"Award" text,
"Film/Series" text,
"Result" text
) | Which group nominated Kim in years before 2010 for Thirst? | SELECT "Group" FROM table_6034 WHERE "Year" < '2010' AND "Film/Series" = 'thirst' |
CREATE TABLE table_9571 (
"Year" real,
"Character" text,
"Title" text,
"Author" text,
"Artist" text,
"Imprint" text
) | what is the title when the imprint is dengeki bunko and the artist is kiyotaka haimura? | SELECT "Title" FROM table_9571 WHERE "Imprint" = 'dengeki bunko' AND "Artist" = 'kiyotaka haimura' |
CREATE TABLE table_66230 (
"!Event" real,
"Round" text,
"Surface" text,
"Winner" text,
"Opponent" text,
"Result" text
) | Who is iv n navarro's opponent? | SELECT "Opponent" FROM table_66230 WHERE "Result" = 'iván navarro' |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt 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,
... | what is the cheapest fare for a one way flight from BOSTON to ATLANTA | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_... |
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... | what is maximum age of patients whose insurance is private and discharge location is home health care? | SELECT MAX(demographic.age) FROM demographic WHERE demographic.insurance = "Private" AND demographic.discharge_location = "HOME HEALTH CARE" |
CREATE TABLE table_78544 (
"Tujunga" text,
"La Crescenta- Montrose" text,
"Glendale" text,
"La Ca\u00f1ada Flintridge" text,
"Pasadena" text
) | When Pasadena is at 10%, what is La Crescenta-Montrose? | SELECT "La Crescenta- Montrose" FROM table_78544 WHERE "Pasadena" = '10%' |
CREATE TABLE table_12387 (
"Year" real,
"Gold" text,
"Silver" text,
"Bronze" text,
"Notes" text
) | What is Notes, when Bronze is 'Pasi Ikonen'? | SELECT "Notes" FROM table_12387 WHERE "Bronze" = 'pasi ikonen' |
CREATE TABLE table_73389 (
"District" text,
"Vacator" text,
"Reason for change" text,
"Successor" text,
"Date successor seated" text
) | How many vacators were in the Pennsylvania 33rd district? | SELECT COUNT("Vacator") FROM table_73389 WHERE "District" = 'Pennsylvania 33rd' |
CREATE TABLE table_15608800_2 (
wheel_arrangement VARCHAR,
class VARCHAR
) | Name the number of wheel arrangement when class is d14 | SELECT COUNT(wheel_arrangement) FROM table_15608800_2 WHERE class = "D14" |
CREATE TABLE table_74105 (
"Status" text,
"2001 number (,000)" real,
"2001 %" text,
"2011 number (,000)" real,
"2011 %" text
) | What si the 2011 number (,000) when 2001 % is 28.1? | SELECT MAX("2011 number (,000)") FROM table_74105 WHERE "2001 %" = '28.1' |
CREATE TABLE table_45694 (
"Election" real,
"Candidates fielded" real,
"# of seats won" real,
"Total votes" real,
"% of popular vote" text,
"Place" text
) | Can you tell me the highest Total votes that has the % of popular vote of 0.86%, and the # of seats won larger than 0? | SELECT MAX("Total votes") FROM table_45694 WHERE "% of popular vote" = '0.86%' AND "# of seats won" > '0' |
CREATE TABLE table_62618 (
"Opposing Teams" text,
"Against" real,
"Date" text,
"Venue" text,
"Status" text
) | What is Venue, when Date is '14/12/1996'? | SELECT "Venue" FROM table_62618 WHERE "Date" = '14/12/1996' |
CREATE TABLE table_714 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | What is the number of results for james shannon? | SELECT COUNT("Result") FROM table_714 WHERE "Incumbent" = 'James Shannon' |
CREATE TABLE table_name_4 (
played INTEGER,
points VARCHAR,
lost VARCHAR,
team VARCHAR
) | Which Played has a Lost larger than 4, and a Team of am rica, and Points smaller than 5? | SELECT SUM(played) FROM table_name_4 WHERE lost > 4 AND team = "américa" AND points < 5 |
CREATE TABLE table_25561560_2 (
yacht VARCHAR
) | What is the yacht type of Icap Leopard? | SELECT yacht AS type FROM table_25561560_2 WHERE yacht = "ICAP Leopard" |
CREATE TABLE table_42319 (
"Date" text,
"Score" text,
"Set 1" text,
"Set 2" text,
"Set 3" text,
"Set 4" text,
"Set 5" text,
"Total" text
) | What is the Set 5 with a Date that is jun 29? | SELECT "Set 5" FROM table_42319 WHERE "Date" = 'jun 29' |
CREATE TABLE table_name_81 (
long INTEGER,
name VARCHAR,
avg_g VARCHAR
) | What is the lowest Long, when Name is Kass, Rob, and when Avg/g is less than -0.30000000000000004? | SELECT MIN(long) FROM table_name_81 WHERE name = "kass, rob" AND avg_g < -0.30000000000000004 |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and manufacturer , and group by attribute founder, and could you sort by the bar in asc? | SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name ORDER BY T1.Name |
CREATE TABLE table_name_41 (
Id VARCHAR
) | What is the value in 1988 when it is 2R in 1997 and SF in 1993? | SELECT 1988 FROM table_name_41 WHERE 1997 = "2r" AND 1993 = "sf" |
CREATE TABLE table_1261 (
"Name" text,
"Position" text,
"Number" real,
"School/Club Team" text,
"Season" text,
"Acquisition via" text
) | Namethe school team for season 2008 | SELECT "School/Club Team" FROM table_1261 WHERE "Season" = '2008' |
CREATE TABLE table_name_18 (
points INTEGER,
rider VARCHAR,
manufacturer VARCHAR,
wins VARCHAR,
rank VARCHAR
) | Wins of 0, and a Rank larger than 6, and a Manufacturer of kawasaki, and a Rider of massimo broccoli involved what highest points? | SELECT MAX(points) FROM table_name_18 WHERE wins = 0 AND rank > 6 AND manufacturer = "kawasaki" AND rider = "massimo broccoli" |
CREATE TABLE table_16376436_1 (
player VARCHAR,
pick__number VARCHAR
) | Which player was pick number 150? | SELECT player FROM table_16376436_1 WHERE pick__number = 150 |
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 the number of patients whose days of hospital stay is greater than 20 and procedure icd9 code is 9907? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "20" AND procedures.icd9_code = "9907" |
CREATE TABLE table_20785990_2 (
position VARCHAR,
home_town VARCHAR
) | What position is the player from Chapel Hill, NC? | SELECT position FROM table_20785990_2 WHERE home_town = "Chapel Hill, NC" |
CREATE TABLE table_name_43 (
driver VARCHAR,
constructor VARCHAR,
time_retired VARCHAR
) | who is the driver for the car constructed by ferrari with a time/retired of +1:06.683? | SELECT driver FROM table_name_43 WHERE constructor = "ferrari" AND time_retired = "+1:06.683" |
CREATE TABLE table_1342013_12 (
result VARCHAR,
incumbent VARCHAR
) | What was the result when Leo E. Allen was elected? | SELECT result FROM table_1342013_12 WHERE incumbent = "Leo E. Allen" |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,... | Top 10 Questions by view. | SELECT Id, Body, Title, OwnerDisplayName, ViewCount FROM Posts ORDER BY ViewCount DESC LIMIT 10 |
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
... | flights from DENVER to PITTSBURGH on thursday | 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 = 'PITTSBURGH' AND date_day.day_number = 24 AND date_day.month_number = 5 AN... |
CREATE TABLE table_name_25 (
class VARCHAR,
laps VARCHAR,
year VARCHAR,
team VARCHAR
) | Which Class Pos has a Year larger than 1997, a Team of corvette racing, a Class of gt1, and 327 laps? | SELECT class AS pos FROM table_name_25 WHERE year > 1997 AND team = "corvette racing" AND class = "gt1" AND laps = 327 |
CREATE TABLE table_69502 (
"Year" text,
"Start" text,
"Qual" text,
"Rank" text,
"Finish" text,
"Laps" real
) | What is the highest number of laps with a 21 start? | SELECT MAX("Laps") FROM table_69502 WHERE "Start" = '21' |
CREATE TABLE product (
product VARCHAR,
max_page_size VARCHAR,
pages_per_minute_color VARCHAR
) | Find products with max page size as 'A4' and pages per minute color smaller than 5. | SELECT product FROM product WHERE max_page_size = "A4" AND pages_per_minute_color < 5 |
CREATE TABLE table_56111 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was the away team's score in Junction Oval? | SELECT "Away team score" FROM table_56111 WHERE "Venue" = 'junction oval' |
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
Di... | SELECT * FROM posts WHERE Id < 100000 and AnswerCount > 0 and Tags NOT NULL. | SELECT * FROM Posts WHERE Id < 100000 AND AnswerCount > 0 AND NOT Tags IS NULL |
CREATE TABLE table_4338 (
"Engine" text,
"Horsepower" text,
"Torque" text,
"Carburetor" text,
"Compression Ratio" text,
"Bore & Stroke" text,
"VIN Code" text
) | Name the horsepower for VIN code of h and engine for 351-2v cleveland v8 | SELECT "Horsepower" FROM table_4338 WHERE "VIN Code" = 'h' AND "Engine" = '351-2v cleveland v8' |
CREATE TABLE table_26460435_7 (
status VARCHAR,
monarch VARCHAR
) | What is the status for the monarch Mingyinyo? | SELECT status FROM table_26460435_7 WHERE monarch = "Mingyinyo" |
CREATE TABLE table_name_25 (
power VARCHAR,
name VARCHAR
) | Which Power has a Name of 9 ad? | SELECT power FROM table_name_25 WHERE name = "9 ad" |
CREATE TABLE table_name_48 (
hangul VARCHAR,
kana VARCHAR
) | What is the Hangul of the Province with a Kana of ? | SELECT hangul FROM table_name_48 WHERE kana = "へいあんなんどう" |
CREATE TABLE table_name_33 (
party VARCHAR,
president VARCHAR
) | What is the party affiliation for President Stefano Baccelli? | SELECT party FROM table_name_33 WHERE president = "stefano baccelli" |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id numb... | until 2104, how many patients with patent ductus arteriosus were diagnosed within 2 months after being diagnosed with lack of coordination? | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'patent ductus arte... |
CREATE TABLE table_23998 (
"Name" text,
"Completions" real,
"Attempts" real,
"Completion %" text,
"Yards" real,
"Touchdowns" real,
"Interceptions" real,
"QB Rating" text
) | How many attempts did Charley Johnson have? | SELECT COUNT("Attempts") FROM table_23998 WHERE "Name" = 'Charley Johnson' |
CREATE TABLE table_18123 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Results" text,
"Candidates" text
) | How many party were listed for district oklahoma 5? | SELECT COUNT("Party") FROM table_18123 WHERE "District" = 'Oklahoma 5' |
CREATE TABLE table_64196 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | How many silver for rank 22 when gold count was more than 0 and Bronze count was less than 5? | SELECT SUM("Silver") FROM table_64196 WHERE "Bronze" < '5' AND "Gold" > '0' AND "Rank" = '22' |
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 (... | Calculate the number of private insurance patients who have had other closed (endoscopic) biopsy of biliary duct or sphincter of oddi. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.long_title = "Other closed [endoscopic] biopsy of biliary duct or sphincter of Oddi" |
CREATE TABLE table_22815568_3 (
status VARCHAR,
county VARCHAR
) | How many statuses are listed for Wayne county? | SELECT COUNT(status) FROM table_22815568_3 WHERE county = "Wayne" |
CREATE TABLE table_10741 (
"Player" text,
"Team" text,
"Date" text,
"Opposition" text,
"Game" text,
"D\u00e9but" real
) | What is the name of the game whose team is Waterford and debuted later than 1995? | SELECT "Game" FROM table_10741 WHERE "Team" = 'waterford' AND "D\u00e9but" > '1995' |
CREATE TABLE table_name_83 (
player VARCHAR,
wins VARCHAR
) | What player has 14 wins? | SELECT player FROM table_name_83 WHERE wins = 14 |
CREATE TABLE files (
f_id number,
artist_name text,
file_size text,
duration text,
formats text
)
CREATE TABLE genre (
g_name text,
rating text,
most_popular_in text
)
CREATE TABLE song (
song_name text,
artist_name text,
country text,
f_id number,
genre_is text,
... | What are the names of the songs whose rating is below the rating of all songs in English? | SELECT song_name FROM song WHERE rating < (SELECT MIN(rating) FROM song WHERE languages = 'english') |
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 diagnoses (
... | count the number of patients who have had transitional epithelial cells lab test. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.label = "Transitional Epithelial Cells" |
CREATE TABLE table_1630 (
"Rank" real,
"Administrative Division" text,
"Area (km\u00b2)" real,
"Area (sq mi)" real,
"National Share (%)" text,
"Comparable Country" text
) | What is the national share of the country whose area is 148064 km^2? | SELECT "National Share (%)" FROM table_1630 WHERE "Area (km\u00b2)" = '148064' |
CREATE TABLE table_name_46 (
nationality VARCHAR,
round INTEGER
) | Name the nationality of the player with round more than 4 | SELECT nationality FROM table_name_46 WHERE round > 4 |
CREATE TABLE table_name_39 (
year VARCHAR,
laps VARCHAR
) | What year resulted in 54 laps? | SELECT year FROM table_name_39 WHERE laps = 54 |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | A scatter chart shows the correlation between Team_ID and ACC_Percent , and group by attribute ACC_Regular_Season. | SELECT Team_ID, ACC_Percent FROM basketball_match GROUP BY ACC_Regular_Season |
CREATE TABLE table_68827 (
"Date" text,
"Location" text,
"Nature of incident" text,
"Circumstances" text,
"Casualties" text
) | What is the nature of the incident that's a bomb attack? | SELECT "Nature of incident" FROM table_68827 WHERE "Circumstances" = 'bomb attack' |
CREATE TABLE table_name_31 (
province VARCHAR,
region VARCHAR,
area VARCHAR
) | What province has a v valpara so region and an area of 927.2? | SELECT province FROM table_name_31 WHERE region = "v valparaíso" AND area = 927.2 |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardi... | count the number of patients who have received a coronar arteriogr-2 cath treatment in this year. | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT procedures_icd.hadm_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'coronar arteriogr-2 cath') AND DATETIME(procedures_i... |
CREATE TABLE table_name_59 (
score VARCHAR,
set_1 VARCHAR
) | What is the score for Set 1 at 19:21? | SELECT score FROM table_name_59 WHERE set_1 = "19:21" |
CREATE TABLE table_name_88 (
mark VARCHAR,
lane VARCHAR,
react VARCHAR
) | What is Mark, when Lane is less than 5, and when React is 0.217? | SELECT mark FROM table_name_88 WHERE lane < 5 AND react = 0.217 |
CREATE TABLE table_name_89 (
voltage_input_ VARCHAR,
v_a VARCHAR,
model VARCHAR
) | What is the voltage iinput [V/A] of the whr-g54s model? | SELECT voltage_input_ AS "v_a" FROM table_name_89 WHERE model = "whr-g54s" |
CREATE TABLE table_name_33 (
time VARCHAR,
opponent VARCHAR
) | What was the time of the bout against Dave Menne? | SELECT time FROM table_name_33 WHERE opponent = "dave menne" |
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 is the monthly average of arterial bp [diastolic] for patient 13528 in the first hospital visit? | SELECT AVG(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 13528 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)) AND chartevent... |
CREATE TABLE table_203_648 (
id number,
"date" text,
"opposition" text,
"result" text,
"score" text,
"brazil scorers" text,
"competition" text
) | total number of wins | SELECT COUNT(*) FROM table_203_648 WHERE "result" = 'w' |
CREATE TABLE table_36119 (
"Album#" text,
"English title" text,
"Chinese title" text,
"Released" text,
"Label" text
) | Album # of 3rd is what chinese title? | SELECT "Chinese title" FROM table_36119 WHERE "Album#" = '3rd' |
CREATE TABLE table_70458 (
"Episode No." real,
"Airdate" text,
"Total Viewers" real,
"Share" text,
"BBC One Weekly Ranking" real
) | What date did the episode with a weekly ranking of 14 air? | SELECT "Airdate" FROM table_70458 WHERE "BBC One Weekly Ranking" = '14' |
CREATE TABLE APPELLATIONS (
County VARCHAR
) | How many appelations are in Napa Country? | SELECT COUNT(*) FROM APPELLATIONS WHERE County = "Napa" |
CREATE TABLE table_name_58 (
artist VARCHAR,
draw INTEGER
) | Which artist has a draw greater than 15? | SELECT artist FROM table_name_58 WHERE draw > 15 |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of founder and the average of price , and group by attribute founder. | SELECT Founder, AVG(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder |
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... | Find All_Road and All_Games_Percent , and visualize them by a bar chart, display bar in asc order please. | SELECT All_Road, All_Games_Percent FROM basketball_match ORDER BY All_Road |
CREATE TABLE table_27927185_1 (
viewers__millions_ VARCHAR,
episode__number INTEGER
) | How many million viewers watched episodes prior to episode 2.0? | SELECT viewers__millions_ FROM table_27927185_1 WHERE episode__number < 2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.