answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT t2.firstname FROM Performance AS t1 JOIN Band AS t2 ON t1.bandmate = t2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY firstname ORDER BY COUNT(*) DESC LIMIT 1 | Find the first name of the band mate that has performed in most songs. | CREATE TABLE Songs (SongId VARCHAR); CREATE TABLE Band (firstname VARCHAR, id VARCHAR); CREATE TABLE Performance (bandmate VARCHAR) |
SELECT "Status" FROM table_59850 WHERE "Name" = 'ins ranvir' | What is the status of the ship INS Ranvir? | CREATE TABLE table_59850 (
"Name" text,
"Pennant" text,
"Builder" text,
"Homeport" text,
"Commissioned" text,
"Status" text
) |
SELECT high_points FROM table_17323042_6 WHERE date = "December 17" | Who had the high points on December 17? | CREATE TABLE table_17323042_6 (high_points VARCHAR, date VARCHAR) |
SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = "Marianne" GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 | Which vocal type has the band mate with first name "Marianne" played the most? | CREATE TABLE vocals (bandmate VARCHAR); CREATE TABLE band (id VARCHAR) |
SELECT school AS website FROM table_28523_3 WHERE religious_affiliation = "Church of England" | What is the website of the school affiliated with the Church of England? | CREATE TABLE table_28523_3 (
school VARCHAR,
religious_affiliation VARCHAR
) |
SELECT COUNT(score) FROM table_17323042_7 WHERE team = "Houston" | How many scores are listed for the game against Houston | CREATE TABLE table_17323042_7 (score VARCHAR, team VARCHAR) |
SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = "Der Kapitan" AND T1.StagePosition = "back" | Who is performing in the back stage position for the song "Der Kapitan"? Show the first name and last name. | CREATE TABLE Band (firstname VARCHAR, lastname VARCHAR, id VARCHAR); CREATE TABLE Performance (bandmate VARCHAR, SongId VARCHAR, StagePosition VARCHAR); CREATE TABLE Songs (SongId VARCHAR, Title VARCHAR) |
SELECT "County" FROM table_19089 WHERE "Code" = '2' | what's the county with code being 2 | CREATE TABLE table_19089 (
"Code" real,
"County" text,
"Former Province" text,
"Area (km 2 )" text,
"Population Census 2009" real,
"Capital" text
) |
SELECT location_attendance FROM table_17323042_11 WHERE high_assists = "Andre Miller (7)" | What was the location and attendance of the game when High Assists were Andre Miller (7)? | CREATE TABLE table_17323042_11 (location_attendance VARCHAR, high_assists VARCHAR) |
SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE T1.title = "A Kiss Before You Go: Live in Hamburg" | What are the songs in album "A Kiss Before You Go: Live in Hamburg"? | CREATE TABLE songs (title VARCHAR, songid VARCHAR); CREATE TABLE albums (aid VARCHAR, title VARCHAR); CREATE TABLE tracklists (albumid VARCHAR, songid VARCHAR) |
SELECT JOB_ID, SUM(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY SUM(SALARY) | 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 salary over the job_id , and group by attribute job_id by a bar chart, list y axis in asc order please. | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),... |
SELECT high_assists FROM table_17323042_11 WHERE game = 1 | Who was the High Assist in game 1? | CREATE TABLE table_17323042_11 (high_assists VARCHAR, game VARCHAR) |
SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.label = "Universal Music Group" | What are all the songs in albums under label "Universal Music Group"? | CREATE TABLE songs (title VARCHAR, songid VARCHAR); CREATE TABLE albums (aid VARCHAR); CREATE TABLE tracklists (albumid VARCHAR, songid VARCHAR) |
SELECT "Score" FROM table_66202 WHERE "Opponent in the final" = 'ashley harkleroad' | In the final against Ashley Harkleroad what was the score? | CREATE TABLE table_66202 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the final" text,
"Score" text
) |
SELECT high_assists FROM table_17323042_11 WHERE high_rebounds = "Andre Iguodala (8)" | Who was the High Assist when the High Rebounds was andre iguodala (8)? | CREATE TABLE table_17323042_11 (high_assists VARCHAR, high_rebounds VARCHAR) |
SELECT COUNT(DISTINCT T3.title) FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.type = "Studio" | Find the number of songs in all the studio albums. | CREATE TABLE songs (title VARCHAR, songid VARCHAR); CREATE TABLE albums (aid VARCHAR); CREATE TABLE tracklists (albumid VARCHAR, songid VARCHAR) |
SELECT MAX("Ends Lost") FROM table_21220 | What is the highest number of ends lost? | CREATE TABLE table_21220 (
"Province" text,
"Skip" text,
"W" real,
"L" real,
"PF" real,
"PA" real,
"Ends Won" real,
"Ends Lost" real,
"Blank Ends" real,
"Stolen Ends" real,
"Shot Pct." real
) |
SELECT record FROM table_17323042_11 WHERE high_points = "Andre Miller (30)" | What was the W-L record when HIgh Points was andre miller (30)? | CREATE TABLE table_17323042_11 (record VARCHAR, high_points VARCHAR) |
SELECT founder FROM manufacturers WHERE name = 'Sony' | Who is the founder of Sony? | CREATE TABLE manufacturers (founder VARCHAR, name VARCHAR) |
SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY COUNT(HIRE_DATE) DESC | For those employees who did not have any job in the past, give me the comparison about the amount of hire_date over the hire_date bin hire_date by time, and I want to sort the number of hire date in desc order. | CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE locations (
LOCAT... |
SELECT score FROM table_17323042_11 WHERE high_points = "Andre Miller (17)" | What was the score and game outcome when High Points was andre miller (17)? | CREATE TABLE table_17323042_11 (score VARCHAR, high_points VARCHAR) |
SELECT headquarter FROM manufacturers WHERE founder = 'James' | Where is the headquarter of the company founded by James? | CREATE TABLE manufacturers (headquarter VARCHAR, founder VARCHAR) |
SELECT MAX(vitalperiodic.sao2) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-4131')) AND NOT vitalperiodic.sao2 IS NULL AND DATETI... | on last month/27, what is maximum value of sao2 for patient 012-4131? | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime t... |
SELECT COUNT(game) FROM table_17323042_11 WHERE high_points = "Andre Iguodala (29)" | How many games was High Points andre iguodala (29)? | CREATE TABLE table_17323042_11 (game VARCHAR, high_points VARCHAR) |
SELECT name, headquarter FROM manufacturers ORDER BY revenue DESC | Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first. | CREATE TABLE manufacturers (name VARCHAR, headquarter VARCHAR, revenue VARCHAR) |
SELECT course_id FROM section WHERE semester = 'Fall' AND year = 2009 INTERSECT SELECT course_id FROM section WHERE semester = 'Spring' AND year = 2010 | What are the ids for courses that were offered in both Fall of 2009 and Spring of 2010? | CREATE TABLE teaches (
id text,
course_id text,
sec_id text,
semester text,
year number
)
CREATE TABLE time_slot (
time_slot_id text,
day text,
start_hr number,
start_min number,
end_hr number,
end_min number
)
CREATE TABLE classroom (
building text,
room_number tex... |
SELECT COUNT(game) FROM table_17323042_9 WHERE date = "March 15" | How many games were played on March 15? | CREATE TABLE table_17323042_9 (game VARCHAR, date VARCHAR) |
SELECT AVG(revenue), MAX(revenue), SUM(revenue) FROM manufacturers | What are the average, maximum and total revenues of all companies? | CREATE TABLE manufacturers (revenue INTEGER) |
SELECT "Democratic Coalition" FROM table_28761 WHERE "Together We Can Do More" = 'Sergio Castro ( PC )' | What is the democratic coalation when together we can do more is sergio castro ( pc )? | CREATE TABLE table_28761 (
"Dist." real,
"Democratic Coalition" text,
"Alliance" text,
"Together We Can Do More" text,
"Independent Regional Force" text,
"Independents" text
) |
SELECT record FROM table_17323042_5 WHERE team = "Orlando" | What was the team's record when they faced orlando? | CREATE TABLE table_17323042_5 (record VARCHAR, team VARCHAR) |
SELECT COUNT(*) FROM manufacturers WHERE founder = 'Andy' | How many companies were created by Andy? | CREATE TABLE manufacturers (founder VARCHAR) |
SELECT location FROM table_name_29 WHERE date = "sun. oct. 1" | Date of sun. oct. 1 has what location? | CREATE TABLE table_name_29 (
location VARCHAR,
date VARCHAR
) |
SELECT team FROM table_17323092_5 WHERE score = "L 97–107 (OT)" | Whic teams scored l 97–107 (ot) | CREATE TABLE table_17323092_5 (team VARCHAR, score VARCHAR) |
SELECT SUM(revenue) FROM manufacturers WHERE headquarter = 'Austin' | Find the total revenue created by the companies whose headquarter is located at Austin. | CREATE TABLE manufacturers (revenue INTEGER, headquarter VARCHAR) |
SELECT "winner" FROM table_204_874 WHERE "year" = 1992 | who was the winner in the first year of 1992 ? | CREATE TABLE table_204_874 (
id number,
"year" number,
"winner" text,
"runner-up" text,
"final score" text,
"third" text
) |
SELECT high_assists FROM table_17323092_7 WHERE team = "@ Minnesota" | Who had the high assists when the team was @ Minnesota? | CREATE TABLE table_17323092_7 (high_assists VARCHAR, team VARCHAR) |
SELECT DISTINCT headquarter FROM manufacturers | What are the different cities listed? | CREATE TABLE manufacturers (headquarter VARCHAR) |
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hypothyroidism' AND STRFTIME('%y', diagnosis.diagnosistime) >= '2105') AS t1 JOIN (SELECT patient.uniquepid,... | how many patients received mechanical ventilation during the same month after having been diagnosed with hypothyroidism, since 2105? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE medication (
me... |
SELECT date FROM table_17323092_7 WHERE team = "Minnesota" | On what date did the Team Minnesota play? | CREATE TABLE table_17323092_7 (date VARCHAR, team VARCHAR) |
SELECT COUNT(*) FROM manufacturers WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing' | Find the number of manufactures that are based in Tokyo or Beijing. | CREATE TABLE manufacturers (headquarter VARCHAR) |
SELECT T2.state, T3.average_scale_score FROM finrev_fed_key_17 AS T2 JOIN finrev_fed_17 AS T1 ON T1.state_code = T2.state_code JOIN ndecoreexcel_math_grade8 AS T3 ON T2.state = T3.state GROUP BY T2.state ORDER BY SUM(T1.t_fed_rev) LIMIT 1 | Which state spent the least revenue towards schools and whats the state average score | CREATE TABLE finrev_fed_key_17 (
state_code number,
state text,
#_records text
)
CREATE TABLE ndecoreexcel_math_grade8 (
year number,
state text,
all_students text,
average_scale_score number
)
CREATE TABLE finrev_fed_17 (
state_code number,
idcensus number,
school_district tex... |
SELECT high_points FROM table_17323092_7 WHERE date = "February 10" | Who had the high points on the date February 10? | CREATE TABLE table_17323092_7 (high_points VARCHAR, date VARCHAR) |
SELECT founder FROM manufacturers WHERE name LIKE 'S%' | Find the founder of the company whose name begins with the letter 'S'. | CREATE TABLE manufacturers (founder VARCHAR, name VARCHAR) |
SELECT COUNT(*) FROM papers | How many papers are published in total? | CREATE TABLE papers (
Id VARCHAR
) |
SELECT COUNT(high_points) FROM table_17323092_7 WHERE location_attendance = "FedExForum 11,498" | How many players had high points in the location/attendance FedexForum 11,498 respectively? | CREATE TABLE table_17323092_7 (high_points VARCHAR, location_attendance VARCHAR) |
SELECT name FROM manufacturers WHERE revenue BETWEEN 100 AND 150 | Find the name of companies whose revenue is between 100 and 150. | CREATE TABLE manufacturers (name VARCHAR, revenue INTEGER) |
SELECT MAX(keynote_version) FROM table_name_18 WHERE numbers_version = "2.3" AND pages_version > 4.3 | What's the latest keynote version of version 2.3 of numbers with pages greater than 4.3? | CREATE TABLE table_name_18 (
keynote_version INTEGER,
numbers_version VARCHAR,
pages_version VARCHAR
) |
SELECT high_rebounds FROM table_17323092_7 WHERE high_assists = "Shawn Marion (6)" | When the high assists were Shawn Marion (6) who had high rebounds? | CREATE TABLE table_17323092_7 (high_rebounds VARCHAR, high_assists VARCHAR) |
SELECT SUM(revenue) FROM manufacturers WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan' | What is the total revenue of all companies whose main office is at Tokyo or Taiwan? | CREATE TABLE manufacturers (revenue INTEGER, Headquarter VARCHAR) |
SELECT SUM(attendance) FROM table_name_58 WHERE home_team = "oxford united" | What was the Attendance when Oxford United was the Home team? | CREATE TABLE table_name_58 (
attendance INTEGER,
home_team VARCHAR
) |
SELECT date FROM table_17323092_8 WHERE team = "Miami" | What dates did they play Miami? | CREATE TABLE table_17323092_8 (date VARCHAR, team VARCHAR) |
SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Creative Labs' INTERSECT SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony' | Find the name of product that is produced by both companies Creative Labs and Sony. | CREATE TABLE manufacturers (code VARCHAR, name VARCHAR); CREATE TABLE products (name VARCHAR, Manufacturer VARCHAR) |
SELECT STRFTIME('%j', icustays.outtime) - STRFTIME('%j', icustays.intime) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 72107) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1 | what is patient 72107's length of stay in the icu for the first time? | CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE transfers (
r... |
SELECT date FROM table_17323092_8 WHERE high_points = "Chris Bosh (18)" | What dates did Chris Bosh (18) score the high points? | CREATE TABLE table_17323092_8 (date VARCHAR, high_points VARCHAR) |
SELECT name, headquarter, founder FROM manufacturers ORDER BY revenue DESC LIMIT 1 | Find the name, headquarter and founder of the manufacturer that has the highest revenue. | CREATE TABLE manufacturers (name VARCHAR, headquarter VARCHAR, founder VARCHAR, revenue VARCHAR) |
SELECT "Home team score" FROM table_12023 WHERE "Home team" = 'collingwood' | What is the home team score when the home team is Collingwood? | CREATE TABLE table_12023 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) |
SELECT location_attendance FROM table_17323092_8 WHERE high_assists = "Anthony Parker (7)" | Where was the location and what was the attendance in the game that Anthony Parker (7) earned high assists? | CREATE TABLE table_17323092_8 (location_attendance VARCHAR, high_assists VARCHAR) |
SELECT name, headquarter, revenue FROM manufacturers ORDER BY revenue DESC | Find the name, headquarter and revenue of all manufacturers sorted by their revenue in the descending order. | CREATE TABLE manufacturers (name VARCHAR, headquarter VARCHAR, revenue VARCHAR) |
SELECT "Country" FROM table_38159 WHERE "IATA" = 'cju' | What is the Country when the IATA shows cju? | CREATE TABLE table_38159 (
"City" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
) |
SELECT high_points FROM table_17323092_8 WHERE game = 69 | Who earned high points in game 69? | CREATE TABLE table_17323092_8 (high_points VARCHAR, game VARCHAR) |
SELECT name FROM manufacturers WHERE revenue > (SELECT AVG(revenue) FROM manufacturers) | Find the name of companies whose revenue is greater than the average revenue of all companies. | CREATE TABLE manufacturers (name VARCHAR, revenue INTEGER) |
SELECT chassis FROM table_name_62 WHERE rounds = "1" AND driver = "maria teresa de filippis" | What is the name of the Chassis of Diver Maria Teresa de Filippis in round 1? | CREATE TABLE table_name_62 (
chassis VARCHAR,
rounds VARCHAR,
driver VARCHAR
) |
SELECT COUNT(high_points) FROM table_17323092_6 WHERE date = "January 21" | What is the total number of high points on January 21? | CREATE TABLE table_17323092_6 (high_points VARCHAR, date VARCHAR) |
SELECT name FROM manufacturers WHERE revenue < (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin') | Find the name of companies whose revenue is smaller than the revenue of all companies based in Austin. | CREATE TABLE manufacturers (name VARCHAR, revenue INTEGER, headquarter VARCHAR) |
SELECT Tags.TagName, COUNT(PostTags.TagId) AS no FROM PostTags, Tags WHERE Tags.Id = PostTags.TagId AND TagName = 'france' GROUP BY TagName ORDER BY no DESC | Get country tags and their frequency. | CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewRejectionReasons (
Id... |
SELECT location_attendance FROM table_17323092_6 WHERE team = "Orlando" | What is the location and attendance for the Orlando team? | CREATE TABLE table_17323092_6 (location_attendance VARCHAR, team VARCHAR) |
SELECT SUM(revenue) FROM manufacturers WHERE revenue > (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin') | Find the total revenue of companies whose revenue is larger than the revenue of some companies based in Austin. | CREATE TABLE manufacturers (revenue INTEGER, headquarter VARCHAR) |
SELECT AVG(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-111547')) AND intakeoutput.celllabel = 'vasc... | what was the yearly average dose of vascular 5 flush amount (ml) that patient 021-111547 was taking since 04/2105? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wa... |
SELECT score FROM table_17325580_5 WHERE team = "Milwaukee" | what was the final score of the game versus Milwaukee? | CREATE TABLE table_17325580_5 (score VARCHAR, team VARCHAR) |
SELECT SUM(revenue), founder FROM manufacturers GROUP BY founder | Find the total revenue of companies of each founder. | CREATE TABLE manufacturers (founder VARCHAR, revenue INTEGER) |
SELECT branding FROM table_name_73 WHERE callsign = "dxed-tv" | What is Branding, when Callsign is 'DXED-TV'? | CREATE TABLE table_name_73 (
branding VARCHAR,
callsign VARCHAR
) |
SELECT record FROM table_17323529_8 WHERE team = "Boston" | What is the record against Boston? | CREATE TABLE table_17323529_8 (record VARCHAR, team VARCHAR) |
SELECT name, MAX(revenue), Headquarter FROM manufacturers GROUP BY Headquarter | Find the name and revenue of the company that earns the highest revenue in each city. | CREATE TABLE manufacturers (name VARCHAR, Headquarter VARCHAR, revenue INTEGER) |
SELECT AVG(first_elected) FROM table_name_75 WHERE district = "south carolina 2" | What is the average first elected for the district South Carolina 2? | CREATE TABLE table_name_75 (
first_elected INTEGER,
district VARCHAR
) |
SELECT high_points FROM table_17325580_6 WHERE team = "Washington" | What is every high point when the team is Washington? | CREATE TABLE table_17325580_6 (high_points VARCHAR, team VARCHAR) |
SELECT SUM(revenue), name FROM manufacturers GROUP BY name | Find the total revenue for each manufacturer. | CREATE TABLE manufacturers (name VARCHAR, revenue INTEGER) |
SELECT t1.drugname FROM (SELECT medication.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM medication WHERE STRFTIME('%y', medication.drugstarttime) = '2104' GROUP BY medication.drugname) AS t1 WHERE t1.c1 <= 3 | what are the three drugs that are prescribed the most frequently in 2104? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
intakeoutputid numb... |
SELECT COUNT(game) FROM table_17325580_6 WHERE date = "December 12" | How many games occur on the date December 12? | CREATE TABLE table_17325580_6 (game VARCHAR, date VARCHAR) |
SELECT AVG(T1.price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name | Find the average prices of all products from each manufacture, and list each company's name. | CREATE TABLE products (price INTEGER, Manufacturer VARCHAR); CREATE TABLE manufacturers (name VARCHAR, code VARCHAR) |
SELECT meter_300, ID FROM swimmer ORDER BY ID DESC | Show me about the distribution of meter_300 and ID in a bar chart, could you order by the y-axis in descending? | CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE swimme... |
SELECT COUNT(high_assists) FROM table_17325580_6 WHERE date = "December 13" | How many high assist are on the date December 13? | CREATE TABLE table_17325580_6 (high_assists VARCHAR, date VARCHAR) |
SELECT COUNT(DISTINCT T1.name), T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.Headquarter | Find the number of different products that are produced by companies at different headquarter cities. | CREATE TABLE manufacturers (Headquarter VARCHAR, code VARCHAR); CREATE TABLE products (name VARCHAR, Manufacturer VARCHAR) |
SELECT "Freedom in the World 2013" FROM table_1415 WHERE "Country" = 'Guinea' | How much freedom can did the people of Guinea experience in 2013? | CREATE TABLE table_1415 (
"Country" text,
"Freedom in the World 2013" text,
"2013 Index of Economic Freedom" text,
"2013 Press Freedom Index" text,
"2012 Democracy Index" text
) |
SELECT location_attendance FROM table_17325580_6 WHERE date = "December 12" | What is every location attendance on the date December 12? | CREATE TABLE table_17325580_6 (location_attendance VARCHAR, date VARCHAR) |
SELECT COUNT(DISTINCT name) FROM products WHERE NOT name IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony') | Find number of products which Sony does not make. | CREATE TABLE manufacturers (code VARCHAR, name VARCHAR); CREATE TABLE products (name VARCHAR); CREATE TABLE products (name VARCHAR, Manufacturer VARCHAR) |
SELECT DISTINCT advisory_requirement FROM course WHERE department = 'PIBS' AND number = 507 | Is there a course that can help prepare me for PIBS 507 ? | CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
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... |
SELECT high_rebounds FROM table_17325937_5 WHERE date = "November 26" | What was the high rebounds on November 26? | CREATE TABLE table_17325937_5 (high_rebounds VARCHAR, date VARCHAR) |
SELECT name FROM manufacturers EXCEPT SELECT T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T1.name = 'DVD drive' | Find the name of companies that do not make DVD drive. | CREATE TABLE manufacturers (name VARCHAR, code VARCHAR); CREATE TABLE products (Manufacturer VARCHAR, name VARCHAR); CREATE TABLE manufacturers (name VARCHAR) |
SELECT result FROM table_19810459_1 WHERE background = "Business major" | What was the result for the contestant whose background was as a business major? | CREATE TABLE table_19810459_1 (
result VARCHAR,
background VARCHAR
) |
SELECT high_assists FROM table_17325937_5 WHERE date = "November 14" | What was the high assists on November 14? | CREATE TABLE table_17325937_5 (high_assists VARCHAR, date VARCHAR) |
SELECT COUNT(*), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name | Find the number of products for each manufacturer, showing the name of each company. | CREATE TABLE products (Manufacturer VARCHAR); CREATE TABLE manufacturers (name VARCHAR, code VARCHAR) |
SELECT "Pos." FROM table_60545 WHERE "Name" = 'eftychia karagianni' | What is Eftychia Karagianni Pos.? | CREATE TABLE table_60545 (
"Name" text,
"Pos." text,
"Height" text,
"Weight" text,
"Date of Birth" text,
"Club" text
) |
SELECT high_assists FROM table_17325937_8 WHERE team = "Miami" | Who had the most assists in the game against Miami? | CREATE TABLE table_17325937_8 (high_assists VARCHAR, team VARCHAR) |
SELECT Name FROM Products | Select the names of all the products in the store. | CREATE TABLE Products (Name VARCHAR) |
SELECT "Loss" FROM table_15053 WHERE "Record" = '42-36' | What is the loss for the record of 42-36? | CREATE TABLE table_15053 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
) |
SELECT COUNT(high_assists) FROM table_17325937_8 WHERE team = "San Antonio" | How many assists were made in the game against San Antonio? | CREATE TABLE table_17325937_8 (high_assists VARCHAR, team VARCHAR) |
SELECT name, price FROM products | Select the names and the prices of all the products in the store. | CREATE TABLE products (name VARCHAR, price VARCHAR) |
SELECT MIN(grid) FROM table_name_79 WHERE team = "mi-jack conquest racing" AND points = "16" | What is the smallest grid value that had 16 points and a team of Mi-Jack Conquest Racing? | CREATE TABLE table_name_79 (
grid INTEGER,
team VARCHAR,
points VARCHAR
) |
SELECT high_rebounds FROM table_17326036_5 WHERE date = "November 1" | Who did the most high rebounds in the game played on November 1? | CREATE TABLE table_17326036_5 (high_rebounds VARCHAR, date VARCHAR) |
SELECT name FROM products WHERE price <= 200 | Select the name of the products with a price less than or equal to $200. | CREATE TABLE products (name VARCHAR, price VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.