answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "MARRIED" AND procedures.long_title = "Percutaneous [endoscopic] gastrostomy [PEG]" | what is the number of patients whose marital status is married and procedure long title is percutaneous [endoscopic] gastrostomy [peg]? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... |
SELECT muslim___percentage_of_total_population_ FROM table_1532779_1 WHERE registered_mosques = 614 | What was the percentage of muslims during a time where there were 614 registered mosques? | CREATE TABLE table_1532779_1 (muslim___percentage_of_total_population_ VARCHAR, registered_mosques VARCHAR) |
SELECT County_name FROM county ORDER BY Population LIMIT 3 | Show the 3 counties with the smallest population. | CREATE TABLE county (County_name VARCHAR, Population VARCHAR) |
SELECT MAX(rd_1) FROM table_name_70 WHERE province = "utrecht" AND rd_4 > 0 | Which is the highest Rd 1 has a Province of utrecht and a Rd 4 larger than 0? | CREATE TABLE table_name_70 (
rd_1 INTEGER,
province VARCHAR,
rd_4 VARCHAR
) |
SELECT MAX(pa) FROM table_15333005_1 WHERE locale = Ontario | Name the most pa for ontario | CREATE TABLE table_15333005_1 (pa INTEGER, locale VARCHAR, Ontario VARCHAR) |
SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id HAVING COUNT(*) >= 2 | Show the names of counties that have at least two delegates. | CREATE TABLE election (District VARCHAR); CREATE TABLE county (County_name VARCHAR, County_id VARCHAR) |
SELECT job, MIN(age) FROM Person GROUP BY job ORDER BY job | how old is the youngest person for each job?, and could you order x-axis from low to high order? | CREATE TABLE Person (
name varchar(20),
age INTEGER,
city TEXT,
gender TEXT,
job TEXT
)
CREATE TABLE PersonFriend (
name varchar(20),
friend varchar(20),
year INTEGER
) |
SELECT Ends AS lost FROM table_15333005_1 WHERE pa = 67 | Name the ends lost for 67 pa | CREATE TABLE table_15333005_1 (Ends VARCHAR, pa VARCHAR) |
SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2 | Show the name of the party that has at least two records. | CREATE TABLE party (Party VARCHAR) |
SELECT "results\nteam record" FROM table_204_123 ORDER BY "week" DESC LIMIT 1 | what was the teams final record | CREATE TABLE table_204_123 (
id number,
"week" number,
"date" text,
"kickoff" text,
"opponent" text,
"results\nfinal score" text,
"results\nteam record" text,
"game site" text,
"attendance" number
) |
SELECT COUNT(Ends) AS won FROM table_15333005_1 WHERE l = 4 AND stolen_ends = 17 | Name the number ends won when L is 4 and stolen ends is 17 | CREATE TABLE table_15333005_1 (Ends VARCHAR, l VARCHAR, stolen_ends VARCHAR) |
SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party ORDER BY COUNT(*) DESC LIMIT 1 | Show the name of the party that has the most delegates. | CREATE TABLE election (Party VARCHAR); CREATE TABLE party (Party VARCHAR, Party_ID VARCHAR) |
SELECT AVG(attendance) FROM table_name_23 WHERE date = "september 16" | What is the average number in attendance on September 16? | CREATE TABLE table_name_23 (
attendance INTEGER,
date VARCHAR
) |
SELECT date FROM table_15346009_1 WHERE tournament = "JELD-WEN Tradition" | What day was Jeld-Wen Tradition held? | CREATE TABLE table_15346009_1 (date VARCHAR, tournament VARCHAR) |
SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1 | Show the people that have been governor the most times. | CREATE TABLE party (Governor VARCHAR) |
SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE course.department LIKE '%CLARCH%' AND program_course.category LIKE 'PreMajor' AND program_course.course_id = course.course_id | What classes are required to declare a major in CLARCH ? | CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
... |
SELECT date FROM table_15346009_1 WHERE winner = "Bernhard Langer (2)" | What day did Bernhard Langer (2) win? | CREATE TABLE table_15346009_1 (date VARCHAR, winner VARCHAR) |
SELECT Comptroller, COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1 | Show the people that have been comptroller the most times and the corresponding number of times. | CREATE TABLE party (Comptroller VARCHAR) |
SELECT COUNT(original_air_date) FROM table_23937219_3 WHERE prod_code = 212 | How many original air dates were there for the episode with production code 212? | CREATE TABLE table_23937219_3 (
original_air_date VARCHAR,
prod_code VARCHAR
) |
SELECT date FROM table_15346009_1 WHERE location = "Alabama" | On what day was the tournament in Alabama? | CREATE TABLE table_15346009_1 (date VARCHAR, location VARCHAR) |
SELECT Party FROM party WHERE NOT Party_ID IN (SELECT Party FROM election) | What are the names of parties that do not have delegates in election? | CREATE TABLE election (Party VARCHAR, Party_ID VARCHAR); CREATE TABLE party (Party VARCHAR, Party_ID VARCHAR) |
SELECT capacity FROM table_name_39 WHERE acceleration_0_100km_h = "11.1 s" | what is the capacity when the acceleration 1-100km/h is 11.1 s? | CREATE TABLE table_name_39 (
capacity VARCHAR,
acceleration_0_100km_h VARCHAR
) |
SELECT 1 AS st_prize__$__ FROM table_15346009_1 WHERE score = "271 (-9)" | What was the value of 1st prize when the score was 271 (-9)? | CREATE TABLE table_15346009_1 (score VARCHAR) |
SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = "Appropriations" INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = "Economic Matters" | What are the names of parties that have both delegates on "Appropriations" committee and | CREATE TABLE election (Party VARCHAR, Committee VARCHAR); CREATE TABLE party (Party VARCHAR, Party_ID VARCHAR) |
SELECT to_par FROM table_name_4 WHERE player = "payne stewart" | Name the To par of payne stewart? | CREATE TABLE table_name_4 (
to_par VARCHAR,
player VARCHAR
) |
SELECT date FROM table_15346009_1 WHERE score = "200 (-16)" | What day was the score 200 (-16)? | CREATE TABLE table_15346009_1 (date VARCHAR, score VARCHAR) |
SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = "Democratic" INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = "Liberal" | Which committees have delegates from both democratic party and liberal party? | CREATE TABLE election (Committee VARCHAR, Party VARCHAR); CREATE TABLE party (Party_ID VARCHAR, Party VARCHAR) |
SELECT MIN(demographic.age) FROM demographic WHERE demographic.diagnosis = "AORTIC INSUFFICIENCY\RE-DO STERNOTOMY; AORTIC VALVE REPLACEMENT " AND demographic.days_stay = "20" | what is minimum age of patients whose primary disease is aortic insufficiency\re-do sternotomy; aortic valve replacement and days of hospital stay is 20? | 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 (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... |
SELECT location FROM table_15346009_1 WHERE tournament = "Outback Steakhouse Pro-Am" | Where was Outback Steakhouse Pro-AM held? | CREATE TABLE table_15346009_1 (location VARCHAR, tournament VARCHAR) |
SELECT COUNT(*) FROM journalist | How many journalists are there? | CREATE TABLE journalist (Id VARCHAR) |
SELECT "employees" FROM table_203_83 WHERE "company" = 'vitol' | how many employees does vitol have ? | CREATE TABLE table_203_83 (
id number,
"ranking" number,
"company" text,
"industry" text,
"revenue (usd billions)" text,
"fy" text,
"capitalization (usd billions)" text,
"employees" number,
"listing" text,
"headquarters" text,
"ceo" text
) |
SELECT date_of_polls FROM table_15329030_1 WHERE state = "Mizoram" | Which dates of polls occur in the Mizoram state? | CREATE TABLE table_15329030_1 (date_of_polls VARCHAR, state VARCHAR) |
SELECT Name FROM journalist ORDER BY Years_working | List the names of journalists in ascending order of years working. | CREATE TABLE journalist (Name VARCHAR, Years_working VARCHAR) |
SELECT MIN("To par") FROM table_70516 WHERE "Player" = 'e.j. "dutch" harrison' | What was E.J. 'Dutch' Harrison's lowest To Par? | CREATE TABLE table_70516 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" real,
"Money ( $ )" text
) |
SELECT COUNT(date_of_polls) FROM table_15329030_1 WHERE state = "Madhya Pradesh" | How many dates of polls occur in the Madhya Pradesh state? | CREATE TABLE table_15329030_1 (date_of_polls VARCHAR, state VARCHAR) |
SELECT Nationality, Age FROM journalist | What are the nationalities and ages of journalists? | CREATE TABLE journalist (Nationality VARCHAR, Age VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.short_title = "Transplant cadaver donor" | count the number of private health insurance patients who had transplant from cadaver. | 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
)
... |
SELECT COUNT(against) FROM table_15352382_1 WHERE difference = 11 | How many under the category of Against have a Difference of 11 | CREATE TABLE table_15352382_1 (against VARCHAR, difference VARCHAR) |
SELECT Name FROM journalist WHERE Nationality = "England" OR Nationality = "Wales" | Show the names of journalists from "England" or "Wales". | CREATE TABLE journalist (Name VARCHAR, Nationality VARCHAR) |
SELECT "Centennial" FROM table_20448 WHERE "Information" = 'Location' | Name the centennial for location | CREATE TABLE table_20448 (
"Information" text,
"Akimel A-al The name is Tohono Oodham for children of the river" text,
"Altade\u00f1a" text,
"Aprende" text,
"Centennial" text,
"Kyrene MS" text,
"del Pueblo" text
) |
SELECT won FROM table_15352382_1 WHERE against = 20 | if Against is 20 how much is Won? | CREATE TABLE table_15352382_1 (won VARCHAR, against VARCHAR) |
SELECT AVG(Years_working) FROM journalist | What is the average number of years spent working as a journalist? | CREATE TABLE journalist (Years_working INTEGER) |
SELECT T1.invoice_date, T1.order_id, T2.order_details FROM invoices AS T1 JOIN orders AS T2 ON T1.order_id = T2.order_id | What are the invoice dates, order ids, and order details for all invoices? | CREATE TABLE financial_transactions (
transaction_id number,
account_id number,
invoice_number number,
transaction_type text,
transaction_date time,
transaction_amount number,
transaction_comment text,
other_transaction_details text
)
CREATE TABLE invoices (
invoice_number number,
... |
SELECT drawn FROM table_15352382_1 WHERE team = "Portuguesa Santista" | How many Drawn does the team Portuguesa Santista have? | CREATE TABLE table_15352382_1 (drawn VARCHAR, team VARCHAR) |
SELECT Nationality FROM journalist ORDER BY Years_working DESC LIMIT 1 | What is the nationality of the journalist with the largest number of years working? | CREATE TABLE journalist (Nationality VARCHAR, Years_working VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "NEWBORN" AND lab.flag = "abnormal" | give me the number of patients whose primary disease is newborn and lab test abnormal status is abnormal? | 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
)
... |
SELECT drawn FROM table_15352382_1 WHERE team = "Corinthians" | How many drawn does the team Corinthians have? | CREATE TABLE table_15352382_1 (drawn VARCHAR, team VARCHAR) |
SELECT Nationality, COUNT(*) FROM journalist GROUP BY Nationality | Show the different nationalities and the number of journalists of each nationality. | CREATE TABLE journalist (Nationality VARCHAR) |
SELECT "Home city" FROM table_44912 WHERE "Stadium" = 'stadion src mladost' | what is the home city for the stadion src mladost? | CREATE TABLE table_44912 (
"Team" text,
"Manager" text,
"Home city" text,
"Stadium" text,
"Capacity" real
) |
SELECT MAX(won) FROM table_15331868_1 WHERE difference = "1" | What is the highest number won with a difference of 1? | CREATE TABLE table_15331868_1 (won INTEGER, difference VARCHAR) |
SELECT Nationality FROM journalist GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1 | Show the most common nationality for journalists. | CREATE TABLE journalist (Nationality VARCHAR) |
WITH CandidatePosts AS (SELECT ParentId AS postId FROM Posts AS p WHERE p.OwnerUserId = '##UserId##' AND p.PostTypeId = 2 AND p.Score > 0) SELECT p1.Id AS "post_link", p1.OwnerUserId AS "user_link", Body FROM Posts AS p1 JOIN CandidatePosts AS cp ON cp.postId = p1.ParentId WHERE p1.OwnerUserId != '##UserId##' ORDER BY ... | How close am I to the sportsmanship badge?. | CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE FlagTypes (
Id ... |
SELECT MAX(position) FROM table_15331868_1 WHERE against = 28 | What the highest position when there is 28 against? | CREATE TABLE table_15331868_1 (position INTEGER, against VARCHAR) |
SELECT Nationality FROM journalist WHERE Years_working > 10 INTERSECT SELECT Nationality FROM journalist WHERE Years_working < 3 | Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of working. | CREATE TABLE journalist (Nationality VARCHAR, Years_working INTEGER) |
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'BALTIMORE' AND ground_service.city_code = city.city_code | list ground transportation in BALTIMORE | CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varcha... |
SELECT MAX(won) FROM table_15331868_1 WHERE points = 31 | What is the highest number won when the number of points is 31? | CREATE TABLE table_15331868_1 (won INTEGER, points VARCHAR) |
SELECT Date, Name, venue FROM event ORDER BY Event_Attendance DESC | Show the dates, places, and names of events in descending order of the attendance. | CREATE TABLE event (Date VARCHAR, Name VARCHAR, venue VARCHAR, Event_Attendance VARCHAR) |
SELECT COUNT("Name") FROM table_20094 WHERE "School/Club Team" = 'Washington' | How many players are listed for the school/club team Washington? | CREATE TABLE table_20094 (
"Name" text,
"Position" text,
"Number" real,
"School/Club Team" text,
"Season" text,
"Acquisition via" text
) |
SELECT MIN(position) FROM table_15331868_1 WHERE difference = "6" | What is the smalledt position when the difference was 6? | CREATE TABLE table_15331868_1 (position INTEGER, difference VARCHAR) |
SELECT T3.Name, T2.Date FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID | Show the names of journalists and the dates of the events they reported. | CREATE TABLE journalist (Name VARCHAR, journalist_ID VARCHAR); CREATE TABLE news_report (Event_ID VARCHAR, journalist_ID VARCHAR); CREATE TABLE event (Date VARCHAR, Event_ID VARCHAR) |
SELECT chipset FROM table_name_97 WHERE graphics = "pci express" AND model = "precision t3400" | What type of chipset is in the Precision t3400 model with the PCI Express graphics? | CREATE TABLE table_name_97 (
chipset VARCHAR,
graphics VARCHAR,
model VARCHAR
) |
SELECT COUNT(average_weekly_rank) FROM table_15358729_6 WHERE average_nightly_rank = "No. 2" | How many were the show's average weekly ranking when it reached No. 2 in average nightly ranking? | CREATE TABLE table_15358729_6 (average_weekly_rank VARCHAR, average_nightly_rank VARCHAR) |
SELECT T3.Name, T2.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID ORDER BY T2.Event_Attendance | Show the names of journalists and the names of the events they reported in ascending order | CREATE TABLE journalist (Name VARCHAR, journalist_ID VARCHAR); CREATE TABLE news_report (Event_ID VARCHAR, journalist_ID VARCHAR); CREATE TABLE event (Name VARCHAR, Event_ID VARCHAR, Event_Attendance VARCHAR) |
SELECT dorm_name, gender FROM dorm WHERE student_capacity > 300 OR student_capacity < 100 | Find the name and gender type of the dorms whose capacity is greater than 300 or less than 100. | CREATE TABLE dorm (
dormid number,
dorm_name text,
student_capacity number,
gender text
)
CREATE TABLE lives_in (
stuid number,
dormid number,
room_number number
)
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
a... |
SELECT timeslot FROM table_15358729_6 WHERE season = 3 | What is the show's time slot during season 3? | CREATE TABLE table_15358729_6 (timeslot VARCHAR, season VARCHAR) |
SELECT T3.Name, COUNT(*) FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name | Show the names of journalists and the number of events they reported. | CREATE TABLE journalist (Name VARCHAR, journalist_ID VARCHAR); CREATE TABLE news_report (Event_ID VARCHAR, journalist_ID VARCHAR); CREATE TABLE event (Event_ID VARCHAR) |
SELECT Date_Payment_Made, SUM(Amount_Payment) FROM Payments WHERE Payment_Method_Code = 'Visa' | For those payments processed with Visa, bin the payment day into the Day of Week interval and compute the total amount payment as the Y-axis. | CREATE TABLE Customers (
Customer_ID INTEGER,
Customer_Details VARCHAR(255)
)
CREATE TABLE Payments (
Payment_ID INTEGER,
Settlement_ID INTEGER,
Payment_Method_Code VARCHAR(255),
Date_Payment_Made DATE,
Amount_Payment INTEGER
)
CREATE TABLE Settlements (
Settlement_ID INTEGER,
Clai... |
SELECT february FROM table_1539201_1 | Name all of the february | CREATE TABLE table_1539201_1 (february VARCHAR) |
SELECT T3.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name HAVING COUNT(*) > 1 | Show the names of journalists that have reported more than one event. | CREATE TABLE journalist (Name VARCHAR, journalist_ID VARCHAR); CREATE TABLE news_report (Event_ID VARCHAR, journalist_ID VARCHAR); CREATE TABLE event (Event_ID VARCHAR) |
SELECT MAX(total) FROM table_name_99 WHERE horse = "spender s" | Tell me the highest total when the horse is spender s | CREATE TABLE table_name_99 (
total INTEGER,
horse VARCHAR
) |
SELECT june FROM table_1539201_1 | Name the junes | CREATE TABLE table_1539201_1 (june VARCHAR) |
SELECT Name FROM journalist WHERE NOT journalist_ID IN (SELECT journalist_ID FROM news_report) | List the names of journalists who have not reported any event. | CREATE TABLE journalist (Name VARCHAR, journalist_ID VARCHAR); CREATE TABLE news_report (Name VARCHAR, journalist_ID VARCHAR) |
SELECT "Original air date" FROM table_19608 WHERE "Title" = 'There Goes the Bride' | What is the air date for 'there goes the bride'? | CREATE TABLE table_19608 (
"Series #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production Code" real,
"U.S. viewers (millions)" text
) |
SELECT july FROM table_1539201_1 | Name the julys | CREATE TABLE table_1539201_1 (july VARCHAR) |
SELECT AVG(Event_Attendance), MAX(Event_Attendance) FROM event | what are the average and maximum attendances of all events? | CREATE TABLE event (Event_Attendance INTEGER) |
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight WHERE ((flight.to_airport = AIRPORT_SERVICE_1.airport_code AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND... | list the flights from ST. PAUL to SAN JOSE and from ST. PAUL to HOUSTON | CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
applica... |
SELECT COUNT(february) FROM table_1539201_1 | Name the number of februaries | CREATE TABLE table_1539201_1 (february VARCHAR) |
SELECT AVG(t1.age), AVG(Years_working), t2.work_type FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_id = t2.journalist_id GROUP BY t2.work_type | Find the average age and experience working length of journalists working on different role type. | CREATE TABLE news_report (work_type VARCHAR, journalist_id VARCHAR); CREATE TABLE journalist (age INTEGER, journalist_id VARCHAR) |
SELECT Location, SUM(Number_of_Platforms) FROM station GROUP BY Location ORDER BY SUM(Number_of_Platforms) DESC | Give me a bar chart about the number of platforms in different locations, and I want to list from high to low by the total number please. | CREATE TABLE train (
Train_ID int,
Name text,
Time text,
Service text
)
CREATE TABLE station (
Station_ID int,
Name text,
Annual_entry_exit real,
Annual_interchanges real,
Total_Passengers real,
Location text,
Main_Services text,
Number_of_Platforms int
)
CREATE TABLE t... |
SELECT MAX(points) FROM table_15405904_1 WHERE position = 2 | How many points are listed when the position is 2? | CREATE TABLE table_15405904_1 (points INTEGER, position VARCHAR) |
SELECT venue, name FROM event ORDER BY Event_Attendance DESC LIMIT 2 | List the event venues and names that have the top 2 most number of people attended. | CREATE TABLE event (venue VARCHAR, name VARCHAR, Event_Attendance VARCHAR) |
SELECT "Wins" FROM table_44077 WHERE "F/Laps" = 'test driver' AND "Team" = 'lotus racing' | what is the wins when the f/laps is test driver and team is lotus racing? | CREATE TABLE table_44077 (
"Season" text,
"Series" text,
"Team" text,
"Races" text,
"Wins" text,
"Poles" text,
"F/Laps" text,
"Podiums" text,
"Points" text,
"Pos." text
) |
SELECT MAX(drawn) FROM table_15405904_1 WHERE lost = 2 | When there is a lost of 2 what is the mumber drawn? | CREATE TABLE table_15405904_1 (drawn INTEGER, lost VARCHAR) |
SELECT ResName FROM Restaurant | Show me all the restaurants. | CREATE TABLE Restaurant (ResName VARCHAR) |
SELECT "Record" FROM table_21474 WHERE "High points" = 'Dirk Nowitzki (19)' | What was the final record for the game in which Dirk Nowitzki (19) had the high points? | CREATE TABLE table_21474 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) |
SELECT MIN(played) FROM table_15405904_1 | How many games are played? | CREATE TABLE table_15405904_1 (played INTEGER) |
SELECT Address FROM Restaurant WHERE ResName = "Subway" | What is the address of the restaurant Subway? | CREATE TABLE Restaurant (Address VARCHAR, ResName VARCHAR) |
SELECT "Record" FROM table_17290 WHERE "High assists" = 'Pierce (6)' | What is the record where high assists is pierce (6)? | CREATE TABLE table_17290 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) |
SELECT MIN(lost) FROM table_15405904_1 WHERE position = 2 | When the position is 2 what is the number lost? | CREATE TABLE table_15405904_1 (lost INTEGER, position VARCHAR) |
SELECT Rating FROM Restaurant WHERE ResName = "Subway" | What is the rating of the restaurant Subway? | CREATE TABLE Restaurant (Rating VARCHAR, ResName VARCHAR) |
SELECT "Chinese" FROM table_45211 WHERE "Pali" = 'atappa' | Which Chinese has a Pali of atappa? | CREATE TABLE table_45211 (
"English" text,
"Pali" text,
"Sanskrit" text,
"Chinese" text,
"Tibetan" text
) |
SELECT MIN(won) FROM table_15405904_1 WHERE team = "Ypiranga-SP" | When the team is ypiranga-sp what is the number of won games? | CREATE TABLE table_15405904_1 (won INTEGER, team VARCHAR) |
SELECT ResTypeName FROM Restaurant_Type | List all restaurant types. | CREATE TABLE Restaurant_Type (ResTypeName VARCHAR) |
SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'glucose - d5ns' AND DATETIME(treatment.treat... | what are the four most frequently ordered microbiology tests for patients who received glucose - d5ns earlier within 2 months since 2 years ago? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREAT... |
SELECT difference FROM table_15400878_1 WHERE drawn > 2.0 | Name the difference for when drawn is larger than 2.0 | CREATE TABLE table_15400878_1 (difference VARCHAR, drawn INTEGER) |
SELECT ResTypeDescription FROM Restaurant_Type WHERE ResTypeName = "Sandwich" | What is the description of the restaurant type Sandwich? | CREATE TABLE Restaurant_Type (ResTypeDescription VARCHAR, ResTypeName VARCHAR) |
SELECT COUNT(*) FROM treatment WHERE treatment.treatmentname = 'aneurysm resection / repair' AND DATETIME(treatment.treatmenttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') | what was the number of aneurysm resection / repair procedures that were performed a year before? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TAB... |
SELECT MAX(against) FROM table_15400878_1 WHERE team = "Minas Gerais" | Name the most against for minas gerais | CREATE TABLE table_15400878_1 (against INTEGER, team VARCHAR) |
SELECT ResName, Rating FROM Restaurant ORDER BY Rating DESC LIMIT 1 | Which restaurants have highest rating? List the restaurant name and its rating. | CREATE TABLE Restaurant (ResName VARCHAR, Rating VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "ASIAN" AND diagnoses.long_title = "Suicide and self-inflicted injury by hanging" | count the number of patients whose ethnicity is asian and diagnoses long title is suicide and self-inflicted injury by hanging? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.