answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT tag, COUNT(*) FROM Posts AS p JOIN LATERAL (SELECT tag = REPLACE(value, '<', '') FROM STRING_SPLIT(SUBSTRING(Tags, 2, LENGTH(Tags) - 2), '>')) AS tags WHERE PostTypeId = 1 AND Tags LIKE '%<bigdata>%' GROUP BY tag ORDER BY 2 DESC | Tags used along with tag 'bigdata'. | CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)... |
SELECT MAX(wins) FROM table_18594107_2 WHERE conceded = 18 | How many wins have conceded as 18? | CREATE TABLE table_18594107_2 (wins INTEGER, conceded VARCHAR) |
SELECT activity_name FROM Activity | What activities do we have? | CREATE TABLE Activity (activity_name VARCHAR) |
SELECT COUNT(*) FROM table_204_855 WHERE "winner" = 'chicago bears' | how many total games did the chicago bears win in the 1980s ? | CREATE TABLE table_204_855 (
id number,
"year" number,
"date" text,
"winner" text,
"result" text,
"loser" text,
"attendance" number,
"location" text
) |
SELECT COUNT(draws) FROM table_18594107_1 WHERE scored = 25 | How many draws occurred when 25 points were scored? | CREATE TABLE table_18594107_1 (draws VARCHAR, scored VARCHAR) |
SELECT COUNT(*) FROM Activity | How many activities do we have? | CREATE TABLE Activity (Id VARCHAR) |
SELECT timeslot FROM table_name_26 WHERE air_date = "april 28, 2009" | What is the timeslot for the episode that aired April 28, 2009? | CREATE TABLE table_name_26 (
timeslot VARCHAR,
air_date VARCHAR
) |
SELECT MIN(points) FROM table_18594107_1 WHERE team = "San Lorenzo" | What is the least number of poins for San Lorenzo? | CREATE TABLE table_18594107_1 (points INTEGER, team VARCHAR) |
SELECT COUNT(DISTINCT FacID) FROM Faculty_participates_in | How many faculty members participate in an activity? | CREATE TABLE Faculty_participates_in (FacID VARCHAR) |
SELECT composition FROM table_11464746_1 WHERE house_name = "Benue" | What is the benue house made of? | CREATE TABLE table_11464746_1 (
composition VARCHAR,
house_name VARCHAR
) |
SELECT draws FROM table_18594107_1 WHERE team = "12 de Octubre" | How many draws does 12 de Octubre have? | CREATE TABLE table_18594107_1 (draws VARCHAR, team VARCHAR) |
SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in | Show the ids of the faculty who don't participate in any activity. | CREATE TABLE Faculty (FacID VARCHAR); CREATE TABLE Faculty_participates_in (FacID VARCHAR) |
SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-187132' AND patient.hospitaldischargetime IS NULL)) AND lab.labname = 'lactate' ORD... | tell me the first value of lactate in patient 022-187132 in their current hospital visit? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospit... |
SELECT MAX(inaba) FROM table_18595004_7 | What is Inaba's maximum score? | CREATE TABLE table_18595004_7 (inaba INTEGER) |
SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student | Show the ids of all the faculty members who participate in an activity and advise a student. | CREATE TABLE Student (FacID VARCHAR, advisor VARCHAR); CREATE TABLE Faculty_participates_in (FacID VARCHAR, advisor VARCHAR) |
SELECT "Venue" FROM table_78357 WHERE "Home team" = 'footscray' | Which Venue is the one for the footscray Home team? | CREATE TABLE table_78357 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) |
SELECT COUNT(tonioli) FROM table_18595004_7 WHERE week__number = 3 | How many sets of marks does Tonioli get in week 3? | CREATE TABLE table_18595004_7 (tonioli VARCHAR, week__number VARCHAR) |
SELECT COUNT(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID WHERE T1.fname = "Mark" AND T1.lname = "Giuliano" | How many activities does Mark Giuliano participate in? | CREATE TABLE Faculty_participates_in (facID VARCHAR); CREATE TABLE Faculty (facID VARCHAR, fname VARCHAR, lname VARCHAR) |
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.Manufacturer | For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and manufacturer , and group by attribute founder, show from low to high by the Y-axis. | 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
) |
SELECT MIN(age) FROM table_1859855_2 WHERE hometown = "Columbia, South Carolina" | When columbia, south carolina is the hometown what is the lowest age? | CREATE TABLE table_1859855_2 (age INTEGER, hometown VARCHAR) |
SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN Activity AS T3 ON T3.actid = T2.actid WHERE T1.fname = "Mark" AND T1.lname = "Giuliano" | Show the names of all the activities Mark Giuliano participates in. | CREATE TABLE Activity (activity_name VARCHAR, actid VARCHAR); CREATE TABLE Faculty (facID VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE Faculty_participates_in (facID VARCHAR, actid VARCHAR) |
SELECT country FROM table_name_52 WHERE place = "t3" AND score = 70 - 65 = 135 | What country placed t3 with a score of 70-65=135? | CREATE TABLE table_name_52 (
country VARCHAR,
place VARCHAR,
score VARCHAR
) |
SELECT MIN(age) FROM table_1859855_2 WHERE hometown = "Austin, Texas" | When austin, texas is the hometown what is the lowest age? | CREATE TABLE table_1859855_2 (age INTEGER, hometown VARCHAR) |
SELECT T1.fname, T1.lname, COUNT(*), T1.FacID FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID | Show the first and last name of all the faculty members who participated in some activity, together with the number of activities they participated in. | CREATE TABLE Faculty_participates_in (facID VARCHAR); CREATE TABLE Faculty (fname VARCHAR, lname VARCHAR, FacID VARCHAR, facID VARCHAR) |
SELECT Carrier, COUNT(*) FROM phone GROUP BY Carrier | I want to know the proportion of the total number for each carrier. | CREATE TABLE market (
Market_ID int,
District text,
Num_of_employees int,
Num_of_shops real,
Ranking int
)
CREATE TABLE phone (
Name text,
Phone_ID int,
Memory_in_G int,
Carrier text,
Price real
)
CREATE TABLE phone_market (
Market_ID int,
Phone_ID text,
Num_of_stoc... |
SELECT result FROM table_1859855_2 WHERE candidate = "Stacy Schneider" | When stacy schneider is the candidate what are the results? | CREATE TABLE table_1859855_2 (result VARCHAR, candidate VARCHAR) |
SELECT T1.activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID | Show all the activity names and the number of faculty involved in each activity. | CREATE TABLE Faculty_participates_in (actID VARCHAR); CREATE TABLE Activity (activity_name VARCHAR, actID VARCHAR) |
SELECT DISTINCT writes.authorid FROM author, keyphrase, paper, paperkeyphrase, writes WHERE keyphrase.keyphrasename = 'semantic parsing' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year = 2016 AND writes.authorid = author.authorid AND writes.paperid = pape... | What authors wrote papers about semantic parsing in 2016 ? | CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby... |
SELECT township FROM table_18600760_15 WHERE land___sqmi__ = "35.766" | Which township is 35.766 sqmi? | CREATE TABLE table_18600760_15 (township VARCHAR, land___sqmi__ VARCHAR) |
SELECT T1.fname, T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID ORDER BY COUNT(*) DESC LIMIT 1 | What is the first and last name of the faculty participating in the most activities? | CREATE TABLE Faculty_participates_in (facID VARCHAR); CREATE TABLE Faculty (fname VARCHAR, lname VARCHAR, FacID VARCHAR, facID VARCHAR) |
SELECT away_team FROM table_name_50 WHERE home_team = "footscray" | What away team played against Footscray as the home team? | CREATE TABLE table_name_50 (
away_team VARCHAR,
home_team VARCHAR
) |
SELECT county FROM table_18600760_15 WHERE township = "Osborn" | What county is the township of Osborn in? | CREATE TABLE table_18600760_15 (county VARCHAR, township VARCHAR) |
SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY COUNT(*) DESC LIMIT 1 | What is the name of the activity that has the most faculty members involved in? | CREATE TABLE Faculty_participates_in (actID VARCHAR); CREATE TABLE Activity (activity_name VARCHAR, actID VARCHAR) |
SELECT DISTINCT instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'PSYCH' AND course.number = 359 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.... | Which person is the teacher of PSYCH 359 ? | CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE offering_instructor (
... |
SELECT longitude FROM table_18600760_15 WHERE latitude = "47.985154" | What is the longitude with a latitude of 47.985154? | CREATE TABLE table_18600760_15 (longitude VARCHAR, latitude VARCHAR) |
SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in | Show the ids of the students who don't participate in any activity. | CREATE TABLE Participates_in (StuID VARCHAR); CREATE TABLE Student (StuID VARCHAR) |
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE DATETIME(admissions.admittime) >= DATETIME(CURRENT_TIME(), '-5 year') | since 5 years ago, how many patients were admitted to the hospital? | CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
... |
SELECT water__sqmi_ FROM table_18600760_15 WHERE county = "Ramsey" AND geo_id > 3807159460.0 | How many square miles of water is in Ramsey County with a geo id larger than 3807159460.0? | CREATE TABLE table_18600760_15 (water__sqmi_ VARCHAR, county VARCHAR, geo_id VARCHAR) |
SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20 | Show the ids for all the students who participate in an activity and are under 20. | CREATE TABLE Student (StuID VARCHAR, age INTEGER); CREATE TABLE Participates_in (StuID VARCHAR, age INTEGER) |
SELECT "Candidates" FROM table_742 WHERE "Incumbent" = 'John Shelley' | What candidates ran in the election that included john shelley? | CREATE TABLE table_742 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) |
SELECT COUNT(latitude) FROM table_18600760_15 WHERE water__sqmi_ = "0.081" | how many latitudes have 0.081 (sqmi) of water? | CREATE TABLE table_18600760_15 (latitude VARCHAR, water__sqmi_ VARCHAR) |
SELECT T1.fname, T1.lname FROM Student AS T1 JOIN Participates_in AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY COUNT(*) DESC LIMIT 1 | What is the first and last name of the student participating in the most activities? | CREATE TABLE Student (fname VARCHAR, lname VARCHAR, StuID VARCHAR); CREATE TABLE Participates_in (StuID VARCHAR) |
SELECT prescriptions.drug_type FROM prescriptions WHERE prescriptions.drug = "Hydrocerin" | what is drug type of drug name hydrocerin? | 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... |
SELECT MIN(geo_id) FROM table_18600760_15 | what is the lowest geo id? | CREATE TABLE table_18600760_15 (geo_id INTEGER) |
SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY COUNT(*) DESC LIMIT 1 | What is the name of the activity with the most students? | CREATE TABLE Participates_in (actID VARCHAR); CREATE TABLE Activity (activity_name VARCHAR, actID VARCHAR) |
SELECT COUNT(*) FROM table_203_521 WHERE "regular season" = '1st, mid south' | how many total times has this team finished 1st in mid south ? | CREATE TABLE table_203_521 (
id number,
"year" number,
"division" number,
"league" text,
"regular season" text,
"playoffs" text,
"open cup" text
) |
SELECT MAX(geo_id) FROM table_18600760_10 WHERE water__sqmi_ = "0.771" | What is the geo ID for the township with 0.771 square miles of water? | CREATE TABLE table_18600760_10 (geo_id INTEGER, water__sqmi_ VARCHAR) |
SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking' | Find the first names of the faculty members who are playing Canoeing or Kayaking. | CREATE TABLE activity (activity_name VARCHAR); CREATE TABLE Faculty_participates_in (facID VARCHAR, actid VARCHAR); CREATE TABLE Faculty (lname VARCHAR, facID VARCHAR) |
SELECT LAST_NAME, MANAGER_ID FROM employees ORDER BY MANAGER_ID DESC | Give me a histogram, that simply displays the last name of the employee and the corresponding manager id, and display Y in desc order. | CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25... |
SELECT MAX(geo_id) FROM table_18600760_10 WHERE county = "Logan" | What is the geo id for Logan county? | CREATE TABLE table_18600760_10 (geo_id INTEGER, county VARCHAR) |
SELECT lname FROM faculty WHERE rank = 'Professor' EXCEPT SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking' | Find the first names of professors who are not playing Canoeing or Kayaking. | CREATE TABLE faculty (lname VARCHAR, rank VARCHAR); CREATE TABLE activity (activity_name VARCHAR); CREATE TABLE Faculty_participates_in (facID VARCHAR, actid VARCHAR); CREATE TABLE Faculty (lname VARCHAR, facID VARCHAR) |
SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instr... | Who is the instructor for Core Winter classes ? | CREATE TABLE gsi (
course_offering_id int,
student_id int
)
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 requirement (... |
SELECT land___sqmi__ FROM table_18600760_10 WHERE county = "Grand Forks" | How big is the land in square miles of Grand Forks county? | CREATE TABLE table_18600760_10 (land___sqmi__ VARCHAR, county VARCHAR) |
SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' INTERSECT SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WH... | Find the first names of the faculty members who participate in Canoeing and Kayaking. | CREATE TABLE activity (activity_name VARCHAR); CREATE TABLE Faculty_participates_in (facID VARCHAR, actid VARCHAR); CREATE TABLE Faculty (lname VARCHAR, facID VARCHAR) |
SELECT executions_in_effigie FROM table_name_26 WHERE tribunal = "lamego" | How man executions in effigie took place at the Lamego tribunal? | CREATE TABLE table_name_26 (
executions_in_effigie VARCHAR,
tribunal VARCHAR
) |
SELECT MAX(geo_id) FROM table_18600760_10 WHERE township = "Joliette" | What is the geo id for Joliette? | CREATE TABLE table_18600760_10 (geo_id INTEGER, township VARCHAR) |
SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Canoeing' INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Kayaking' | Find the ids of the students who participate in Canoeing and Kayaking. | CREATE TABLE activity (actid VARCHAR, activity_name VARCHAR); CREATE TABLE participates_in (stuid VARCHAR) |
SELECT opponent FROM table_name_96 WHERE date = "june 29" | On June 29, who was the opponent? | CREATE TABLE table_name_96 (
opponent VARCHAR,
date VARCHAR
) |
SELECT latitude FROM table_18600760_10 WHERE water__sqmi_ = "4.243" | What was the lattitude for the area with 4.243 square miles of water? | CREATE TABLE table_18600760_10 (latitude VARCHAR, water__sqmi_ VARCHAR) |
SELECT name FROM airports WHERE city = 'Goroka' | Find the name of the airport in the city of Goroka. | CREATE TABLE airports (name VARCHAR, city VARCHAR) |
SELECT MAX(ends_won) FROM table_name_4 WHERE ends_lost = 47 AND shot__percentage < 73 | What is the highest number of ends won of 47 Ends Lost and a Shot % less than 73? | CREATE TABLE table_name_4 (
ends_won INTEGER,
ends_lost VARCHAR,
shot__percentage VARCHAR
) |
SELECT township FROM table_18600760_10 WHERE land___sqmi__ = "28.597" | What township is 28.597 square miles of land? | CREATE TABLE table_18600760_10 (township VARCHAR, land___sqmi__ VARCHAR) |
SELECT name, city, country, elevation FROM airports WHERE city = 'New York' | Find the name, city, country, and altitude (or elevation) of the airports in the city of New York. | CREATE TABLE airports (name VARCHAR, city VARCHAR, country VARCHAR, elevation VARCHAR) |
SELECT "Game" FROM table_73525 WHERE "High rebounds" = 'Carlos Boozer (8)' | What's the number of the game in which Carlos Boozer (8) did the high rebounds? | CREATE TABLE table_73525 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) |
SELECT township FROM table_18600760_12 WHERE longitude = "-98.741656" | Which township has a longitude of -98.741656? | CREATE TABLE table_18600760_12 (township VARCHAR, longitude VARCHAR) |
SELECT COUNT(*) FROM airlines | How many airlines are there? | CREATE TABLE airlines (Id VARCHAR) |
SELECT treatment.treatmentname FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-77687' AND NOT patient.hospitaldischargetime IS NULL ORDER BY... | what procedure was first taken to patient 005-77687 in the last hospital visit? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE lab (
la... |
SELECT land___sqmi__ FROM table_18600760_12 WHERE township = "Lansing" | What is the land (sqmi) in lansing township? | CREATE TABLE table_18600760_12 (land___sqmi__ VARCHAR, township VARCHAR) |
SELECT COUNT(*) FROM airlines WHERE country = 'Russia' | How many airlines does Russia has? | CREATE TABLE airlines (country VARCHAR) |
SELECT format FROM table_name_61 WHERE region = "united states" AND catalog = "kem 072" | Which Format has a Region of united states, and a Catalog of kem 072? | CREATE TABLE table_name_61 (
format VARCHAR,
region VARCHAR,
catalog VARCHAR
) |
SELECT MIN(geo_id) FROM table_18600760_12 WHERE water__sqmi_ = "0.457" | What is the geo id when water is 0.457? | CREATE TABLE table_18600760_12 (geo_id INTEGER, water__sqmi_ VARCHAR) |
SELECT MAX(elevation) FROM airports WHERE country = 'Iceland' | What is the maximum elevation of all airports in the country of Iceland? | CREATE TABLE airports (elevation INTEGER, country VARCHAR) |
SELECT round FROM table_name_1 WHERE college = "connecticut" | In what Round was a player from College of Connecticut drafted? | CREATE TABLE table_name_1 (
round VARCHAR,
college VARCHAR
) |
SELECT MAX(geo_id) FROM table_18600760_12 WHERE land___sqmi__ = "35.999" | What is the geo id of the land at 35.999? | CREATE TABLE table_18600760_12 (geo_id INTEGER, land___sqmi__ VARCHAR) |
SELECT name FROM airports WHERE country = 'Cuba' OR country = 'Argentina' | Find the name of the airports located in Cuba or Argentina. | CREATE TABLE airports (name VARCHAR, country VARCHAR) |
SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T2.dept_name = 'Accounting' OR T2.dept_name = 'Biology' | How many professors who are from either Accounting or Biology department? | CREATE TABLE professor (
dept_code VARCHAR
)
CREATE TABLE department (
dept_code VARCHAR,
dept_name VARCHAR
) |
SELECT land___sqmi__ FROM table_18600760_12 WHERE geo_id = 3801947380 | What is the land (sqmi) at geo id 3801947380? | CREATE TABLE table_18600760_12 (land___sqmi__ VARCHAR, geo_id VARCHAR) |
SELECT country FROM airlines WHERE name LIKE 'Orbit%' | Find the country of the airlines whose name starts with 'Orbit'. | CREATE TABLE airlines (country VARCHAR, name VARCHAR) |
SELECT "Nationality" FROM table_14199 WHERE "Name" = 'erin donohue' | What nationality is Erin Donohue? | CREATE TABLE table_14199 (
"Rank" real,
"Heat" real,
"Name" text,
"Nationality" text,
"Time" text
) |
SELECT MAX(pop__2010_) FROM table_18600760_13 WHERE latitude = "48.676125" | What is the population associated with latitude 48.676125? | CREATE TABLE table_18600760_13 (pop__2010_ INTEGER, latitude VARCHAR) |
SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50 | Find the name of airports whose altitude is between -50 and 50. | CREATE TABLE airports (name VARCHAR, elevation INTEGER) |
SELECT MIN("Pick") FROM table_12800 WHERE "Player" = 'paul stasiuk' AND "Round" > '12' | What is the lowest pick of player paul stasiuk from a round greater than 12? | CREATE TABLE table_12800 (
"Draft" real,
"Round" real,
"Pick" real,
"Player" text,
"Nationality" text
) |
SELECT COUNT(ansi_code) FROM table_18600760_13 WHERE latitude = "48.247662" | How many places associated with latitude 48.247662? | CREATE TABLE table_18600760_13 (ansi_code VARCHAR, latitude VARCHAR) |
SELECT country FROM airports ORDER BY elevation DESC LIMIT 1 | Which country is the airport that has the highest altitude located in? | CREATE TABLE airports (country VARCHAR, elevation VARCHAR) |
SELECT SUM("tornadoes") FROM table_204_899 WHERE "date" = 1960 | what are the total number of tornado events that occurred in 1960 in the u.s. ? | CREATE TABLE table_204_899 (
id number,
"event" text,
"date" text,
"area" text,
"tornadoes" number,
"casualties" text,
"notes" text
) |
SELECT longitude FROM table_18600760_13 WHERE water__sqmi_ = "0.068" | What longitudes associated with a water (sqmi) area of 0.068? | CREATE TABLE table_18600760_13 (longitude VARCHAR, water__sqmi_ VARCHAR) |
SELECT COUNT(*) FROM airports WHERE name LIKE '%International%' | Find the number of airports whose name contain the word 'International'. | CREATE TABLE airports (name VARCHAR) |
SELECT COUNT(DISTINCT t2.uniquepid) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'bronchitis') AS t1 GROUP BY t1.uniquepid HAVING MIN(t1.diagnosis... | count the number of patients that died during the same month after having been diagnosed with bronchitis until 1 year ago. | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsysto... |
SELECT MIN(ansi_code) FROM table_18600760_13 | What is the smallest ansi code? | CREATE TABLE table_18600760_13 (ansi_code INTEGER) |
SELECT COUNT(DISTINCT city) FROM airports WHERE country = 'Greenland' | How many different cities do have some airport in the country of Greenland? | CREATE TABLE airports (city VARCHAR, country VARCHAR) |
SELECT t.TagName AS "tagname", t.Count AS TagCount FROM Tags AS t LEFT JOIN Posts AS e ON t.ExcerptPostId = e.Id LEFT JOIN TagSynonyms AS ts ON ts.SourceTagName = t.TagName WHERE LENGTH(e.Body) < 10 GROUP BY t.TagName, t.Count ORDER BY t.Count DESC | Tags without excerpts ordered by use. Lists the most commonly used tags with empty/missing tag wikis (wiki or excerpt). | CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedb... |
SELECT county FROM table_18600760_13 WHERE ansi_code = 1759686 | What county is associated with ansi code 1759686? | CREATE TABLE table_18600760_13 (county VARCHAR, ansi_code VARCHAR) |
SELECT COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines' | Find the number of routes operated by American Airlines. | CREATE TABLE routes (alid VARCHAR); CREATE TABLE airlines (alid VARCHAR, name VARCHAR) |
SELECT (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-11804' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospi... | is the glucose of patient 031-11804 second measured on the last hospital visit less than it was first measured on the last hospital visit? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (
med... |
SELECT COUNT(geo_id) FROM table_18600760_13 WHERE township = "Malcolm" | What is the geo id for malcolm township? | CREATE TABLE table_18600760_13 (geo_id VARCHAR, township VARCHAR) |
SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE country = 'Canada' | Find the number of routes whose destination airports are in Canada. | CREATE TABLE routes (dst_apid VARCHAR); CREATE TABLE airports (apid VARCHAR) |
SELECT COUNT(candidates) FROM table_1341718_14 WHERE district = "Illinois 18" | how many times was it the district illinois 18? | CREATE TABLE table_1341718_14 (
candidates VARCHAR,
district VARCHAR
) |
SELECT land___sqmi__ FROM table_18600760_18 WHERE township = "Reed" | What is the land area of Reed Township? | CREATE TABLE table_18600760_18 (land___sqmi__ VARCHAR, township VARCHAR) |
SELECT name, city, country FROM airports ORDER BY elevation LIMIT 1 | Find the name, city, and country of the airport that has the lowest altitude. | CREATE TABLE airports (name VARCHAR, city VARCHAR, country VARCHAR, elevation VARCHAR) |
SELECT "playoffs" FROM table_203_521 WHERE "year" = (SELECT "year" FROM table_203_521 WHERE "playoffs" = 'champions') + 1 | what was the team 's playoff result in the year after being champions ? | CREATE TABLE table_203_521 (
id number,
"year" number,
"division" number,
"league" text,
"regular season" text,
"playoffs" text,
"open cup" text
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.