answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT "Result" FROM table_73999 WHERE "Incumbent" = 'Willis Alston' | Name the result for willis alston | CREATE TABLE table_73999 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text,
"Candidates" text
) |
SELECT team FROM table_1769428_2 WHERE date = "June 27" | What was the represented team on June 27? | CREATE TABLE table_1769428_2 (team VARCHAR, date VARCHAR) |
SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count > 100 OR amount_of_transaction > 1000 | Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000. | CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, share_count VARCHAR, amount_of_transaction VARCHAR) |
SELECT statement_id, COUNT(*) FROM accounts GROUP BY statement_id | Show all statement id and the number of accounts for each statement. | CREATE TABLE documents_with_expenses (
document_id number,
budget_type_code text,
document_details text
)
CREATE TABLE projects (
project_id number,
project_details text
)
CREATE TABLE statements (
statement_id number,
statement_details text
)
CREATE TABLE ref_budget_codes (
budget_ty... |
SELECT winning_driver FROM table_1769428_2 WHERE team = "Hendrick Motorsports" AND make = "Chevrolet Impala SS" | Who was the winning driver for Hendrick Motorsports in a Chevrolet Impala SS? | CREATE TABLE table_1769428_2 (winning_driver VARCHAR, team VARCHAR, make VARCHAR) |
SELECT T1.transaction_type_description, T2.date_of_transaction FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code WHERE T2.share_count < 10 | Show the transaction type descriptions and dates if the share count is smaller than 10. | CREATE TABLE Ref_Transaction_Types (transaction_type_description VARCHAR, transaction_type_code VARCHAR); CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, transaction_type_code VARCHAR, share_count INTEGER) |
SELECT procedures.short_title FROM procedures WHERE procedures.subject_id = "8323" | what is procedure short title of subject id 8323? | 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 lost FROM table_17718005_2 WHERE drawn = 10 AND goals_for = 45 | When 45 is the goals for and 10 is the drawn what is the lost? | CREATE TABLE table_17718005_2 (lost VARCHAR, drawn VARCHAR, goals_for VARCHAR) |
SELECT T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.share_count > 100 | Show details of all investors if they make any transaction with share count greater than 100. | CREATE TABLE TRANSACTIONS (investor_id VARCHAR, share_count INTEGER); CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR) |
SELECT COUNT(debut_album) FROM table_1646960_3 WHERE winner = "Mike Mohede" | How many debut albums did mike mohede have? | CREATE TABLE table_1646960_3 (
debut_album VARCHAR,
winner VARCHAR
) |
SELECT goals_for FROM table_17718005_2 WHERE goal_difference = "+10" | When +10 is the goal difference what is the goals for? | CREATE TABLE table_17718005_2 (goals_for VARCHAR, goal_difference VARCHAR) |
SELECT COUNT(DISTINCT transaction_type_code) FROM TRANSACTIONS | How many distinct transaction types are used in the transactions? | CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR) |
SELECT "Country" FROM table_29566 WHERE "A\u00f1o" = '2012' | When the a o was 2012, who was the county? | CREATE TABLE table_29566 (
"A\u00f1o" real,
"Trabajo nominado" text,
"Premio" text,
"Categor\u00eda" text,
"Country" text,
"Resultado" text
) |
SELECT points_1 FROM table_17718005_2 WHERE team = "Ellesmere Port & Neston" | When ellesmere port & neston is the team what are the points 1? | CREATE TABLE table_17718005_2 (points_1 VARCHAR, team VARCHAR) |
SELECT lot_details, investor_id FROM LOTS | Return the lot details and investor ids. | CREATE TABLE LOTS (lot_details VARCHAR, investor_id VARCHAR) |
SELECT "League" FROM table_77175 WHERE "Finish" = '2nd' AND "Losses" = '3' | What league had a finish of 2nd and 3 losses? | CREATE TABLE table_77175 (
"Season" real,
"League" text,
"Finish" text,
"Wins" real,
"Losses" real,
"Ties" real
) |
SELECT COUNT(driver) FROM table_1771753_3 WHERE season = "2005" | When 2005 is the season how many drivers are there? | CREATE TABLE table_1771753_3 (driver VARCHAR, season VARCHAR) |
SELECT T2.lot_details FROM INVESTORS AS T1 JOIN LOTS AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = "l" | Return the lot details of lots that belong to investors with details "l"? | CREATE TABLE LOTS (lot_details VARCHAR, investor_id VARCHAR); CREATE TABLE INVESTORS (investor_id VARCHAR, Investor_details VARCHAR) |
SELECT "City of license" FROM table_41555 WHERE "Class" = 'lp' | What is the city of license that has lp as the class? | CREATE TABLE table_41555 (
"City of license" text,
"Identifier" text,
"Frequency" text,
"Power" text,
"Class" text,
"RECNet" text
) |
SELECT average_speed__mph_ FROM table_1771753_3 WHERE driver = "Tony Kanaan" | When tony kanaan is the driver what is the average speed miles per hour? | CREATE TABLE table_1771753_3 (average_speed__mph_ VARCHAR, driver VARCHAR) |
SELECT T1.purchase_details FROM PURCHASES AS T1 JOIN TRANSACTIONS AS T2 ON T1.purchase_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction > 10000 | What are the purchase details of transactions with amount bigger than 10000? | CREATE TABLE PURCHASES (purchase_details VARCHAR, purchase_transaction_id VARCHAR); CREATE TABLE TRANSACTIONS (transaction_id VARCHAR, amount_of_transaction INTEGER) |
SELECT SUM(crowd) FROM table_name_90 WHERE home_team = "fitzroy" | What is Fitzroy's Home team Crowd? | CREATE TABLE table_name_90 (
crowd INTEGER,
home_team VARCHAR
) |
SELECT chassis FROM table_1771753_3 WHERE average_speed__mph_ = "169.182" | When 169.182 is the average speed miles per hour what is the chassis? | CREATE TABLE table_1771753_3 (chassis VARCHAR, average_speed__mph_ VARCHAR) |
SELECT T1.sales_details, T2.date_of_transaction FROM SALES AS T1 JOIN TRANSACTIONS AS T2 ON T1.sales_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction < 3000 | What are the sale details and dates of transactions with amount smaller than 3000? | CREATE TABLE SALES (sales_details VARCHAR, sales_transaction_id VARCHAR); CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, transaction_id VARCHAR, amount_of_transaction INTEGER) |
SELECT "Week 8" FROM table_65573 WHERE "Week 1" = 'carol roopali' | Who did the housemate that nominated Carol Roopali in week 1 nominate in week 8? | CREATE TABLE table_65573 (
"Week 1" text,
"Week 3" text,
"Week 4" text,
"Week 6" text,
"Week 7" text,
"Week 8" text,
"Week 9" text,
"Week 10" text,
"Final Week 12" text
) |
SELECT miles__km_ FROM table_1771753_3 WHERE race_time = "1:34:01" | When 1:34:01 is the race time what is the miles in kilometers? | CREATE TABLE table_1771753_3 (miles__km_ VARCHAR, race_time VARCHAR) |
SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count < 50 | What are the lot details of lots associated with transactions with share count smaller than 50? | CREATE TABLE LOTS (lot_details VARCHAR, lot_id VARCHAR); CREATE TABLE TRANSACTIONS_LOTS (transaction_id VARCHAR); CREATE TABLE TRANSACTIONS (transaction_id VARCHAR, share_count INTEGER) |
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissi... | what are the four most frequently ordered procedures for patients who were previously diagnosed with pure hypercholesterolem within 2 months, in 2101? | CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE outputevents... |
SELECT race_time FROM table_1771753_3 WHERE team = "Chip Ganassi Racing" AND laps = "228" | When 228 is the lap and chip ganassi racing is the team what is the race time? | CREATE TABLE table_1771753_3 (race_time VARCHAR, team VARCHAR, laps VARCHAR) |
SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count > 100 AND T3.transaction_type_code = "PUR" | What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is "PUR"? | CREATE TABLE LOTS (lot_details VARCHAR, lot_id VARCHAR); CREATE TABLE TRANSACTIONS_LOTS (transaction_id VARCHAR); CREATE TABLE TRANSACTIONS (transaction_id VARCHAR, share_count VARCHAR, transaction_type_code VARCHAR) |
SELECT COUNT("Awardee(s)") FROM table_3059 WHERE "Name of Award" = 'Best Screenplay' | Name the total number of awardees for best screenplay | CREATE TABLE table_3059 (
"Name of Award" text,
"Name of Film" text,
"Language" text,
"Awardee(s)" text,
"Cash Prize" text
) |
SELECT MIN(tie_no) FROM table_17736890_5 WHERE home_team = "Chelsea" | What tie number featured Chelsea as the home team? | CREATE TABLE table_17736890_5 (tie_no INTEGER, home_team VARCHAR) |
SELECT transaction_type_code, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY transaction_type_code | Show the average transaction amount for different transaction types. | CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR, amount_of_transaction INTEGER) |
SELECT MIN(olympics_so_far) FROM table_name_80 WHERE sailors > 1 AND first_og > 1948 AND class = "flying dutchman" | What is the lowest value for Olympics, when Sailors is greater than 1, when First OG is after 1948, and when Class is 'Flying Dutchman'? | CREATE TABLE table_name_80 (
olympics_so_far INTEGER,
class VARCHAR,
sailors VARCHAR,
first_og VARCHAR
) |
SELECT MAX(tie_no) FROM table_17736890_5 WHERE away_team = "Leeds United" | In what tie were Leeds United the away team? | CREATE TABLE table_17736890_5 (tie_no INTEGER, away_team VARCHAR) |
SELECT transaction_type_code, MAX(share_count), MIN(share_count) FROM TRANSACTIONS GROUP BY transaction_type_code | Show the maximum and minimum share count of different transaction types. | CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR, share_count INTEGER) |
SELECT MAX("Points") FROM table_70779 WHERE "Chassis" = 'maserati 250f' AND "Year" > '1955' | What is the most points that the Maserati 250F chassis scored in years after 1955? | CREATE TABLE table_70779 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
) |
SELECT home_team FROM table_17736890_5 WHERE away_team = "Burnley" | Who was the home team when Burnley were the away team? | CREATE TABLE table_17736890_5 (home_team VARCHAR, away_team VARCHAR) |
SELECT investor_id, AVG(share_count) FROM TRANSACTIONS GROUP BY investor_id | Show the average share count of transactions for different investors. | CREATE TABLE TRANSACTIONS (investor_id VARCHAR, share_count INTEGER) |
SELECT t1.drug FROM (SELECT prescriptions.drug, COUNT(prescriptions.startdate) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 94229 AND admissions.dischtime IS NULL) GROUP BY prescriptions.drug) AS t1 WHERE t1.c1 = 2 | what is the name of a drug patient 94229 had been prescribed two times in the current hospital encounter? | 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 ... |
SELECT MIN(year) FROM table_177273_2 | what is the lowest year represented? | CREATE TABLE table_177273_2 (year INTEGER) |
SELECT investor_id, AVG(share_count) FROM TRANSACTIONS GROUP BY investor_id ORDER BY AVG(share_count) | Show the average share count of transactions each each investor, ordered by average share count. | CREATE TABLE TRANSACTIONS (investor_id VARCHAR, share_count INTEGER) |
SELECT HIRE_DATE, EMPLOYEE_ID FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY HIRE_DATE | 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, return a line chart about the change of employee_id over hire_date , and list in ascending by the X. | 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),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JO... |
SELECT score FROM table_177273_2 WHERE partner = "Françoise Dürr" | What was the score when Françoise Dürr was partner? | CREATE TABLE table_177273_2 (score VARCHAR, partner VARCHAR) |
SELECT investor_id, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY investor_id | Show the average amount of transactions for different investors. | CREATE TABLE TRANSACTIONS (investor_id VARCHAR, amount_of_transaction INTEGER) |
SELECT "Population density (per km\u00b2)" FROM table_13796 WHERE "Population (2006)" = '84' | What population density (per km) that has 84 as the population (2006)? | CREATE TABLE table_13796 (
"Name" text,
"Population (2011)" real,
"Population (2006)" text,
"Change (%)" text,
"Land area (km\u00b2)" text,
"Population density (per km\u00b2)" text
) |
SELECT outcome FROM table_177273_2 WHERE year = 1975 | What was the outcome in 1975? | CREATE TABLE table_177273_2 (outcome VARCHAR, year VARCHAR) |
SELECT T2.lot_id, AVG(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id | Show the average amount of transactions for different lots. | CREATE TABLE TRANSACTIONS (transaction_id VARCHAR); CREATE TABLE Transactions_Lots (lot_id VARCHAR, transaction_id VARCHAR) |
SELECT COUNT("Ashmolean") FROM table_67358 WHERE "Harrison" = '14s' AND "Image" < '542' | What is the number of Ashmolean with 14s Harrison, and image less than 542? | CREATE TABLE table_67358 (
"Image" real,
"Smith" text,
"Ashmolean" real,
"Foster" real,
"Hahland" real,
"Dinsmoor" text,
"Hofkes-Brukker" text,
"Harrison" text,
"Cooper" text,
"BM/Corbett" text
) |
SELECT surface FROM table_177273_2 WHERE score = "6–4, 6–4" | On what surface was the game played with a score of 6–4, 6–4? | CREATE TABLE table_177273_2 (surface VARCHAR, score VARCHAR) |
SELECT T2.lot_id, AVG(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id ORDER BY AVG(amount_of_transaction) | Show the average amount of transactions for different lots, ordered by average amount of transactions. | CREATE TABLE TRANSACTIONS (transaction_id VARCHAR); CREATE TABLE Transactions_Lots (lot_id VARCHAR, transaction_id VARCHAR) |
SELECT year__ceremony_ FROM table_26385848_1 WHERE film_title = "Eldra" | What is the year (ceremony) for the film title Eldra? | CREATE TABLE table_26385848_1 (
year__ceremony_ VARCHAR,
film_title VARCHAR
) |
SELECT years_of_appearance FROM table_17751942_4 WHERE team = "Prince Albert Raiders" | What is the year of appearance for the Prince Albert Raiders? | CREATE TABLE table_17751942_4 (years_of_appearance VARCHAR, team VARCHAR) |
SELECT investor_id, COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code = "SALE" GROUP BY investor_id | Show the number of transactions with transaction type code "SALE" for different investors if it is larger than 0. | CREATE TABLE TRANSACTIONS (investor_id VARCHAR, transaction_type_code VARCHAR) |
SELECT club_province FROM table_name_51 WHERE player = "steve borthwick" | Name the club/province for steve borthwick | CREATE TABLE table_name_51 (
club_province VARCHAR,
player VARCHAR
) |
SELECT wins FROM table_17751942_4 WHERE team = "Erie Otters" | How many wins do the Erie Otters have? | CREATE TABLE table_17751942_4 (wins VARCHAR, team VARCHAR) |
SELECT investor_id, COUNT(*) FROM TRANSACTIONS GROUP BY investor_id | Show the number of transactions for different investors. | CREATE TABLE TRANSACTIONS (investor_id VARCHAR) |
SELECT COUNT(age) FROM table_197638_7 WHERE player = "Maureen Connolly Brinker" | How many ages have Maureen Connolly Brinker as the player? | CREATE TABLE table_197638_7 (
age VARCHAR,
player VARCHAR
) |
SELECT final_win__percentage FROM table_17751942_4 WHERE team = "Sault Ste. Marie Greyhounds" | What is the final win percentage of the Sault Ste. Marie Greyhounds? | CREATE TABLE table_17751942_4 (final_win__percentage VARCHAR, team VARCHAR) |
SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) LIMIT 1 | Show the transaction type code that occurs the fewest times. | CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR) |
SELECT "Coach" FROM table_37980 WHERE "Year" = '1953' | Who was the coach in 1953? | CREATE TABLE table_37980 (
"Year" text,
"Conference" text,
"Overall Record" text,
"Conference Record" text,
"Coach" text
) |
SELECT MAX(Semi) - final_losses FROM table_17751942_4 WHERE team = "Kitchener Rangers" | What is the total number of semi-final losses for the Kitchener Rangers? | CREATE TABLE table_17751942_4 (final_losses VARCHAR, Semi INTEGER, team VARCHAR) |
SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1 | Show the transaction type code that occurs the most frequently. | CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR) |
SELECT Tags.TagName, Tags.Count FROM Tags WHERE Tags.TagName = 'angularjs' OR Tags.TagName = 'angular' OR Tags.TagName = 'reactjs' OR Tags.TagName = 'vue.js' OR Tags.TagName = 'vuejs2' OR Tags.TagName = 'ember.js' OR Tags.TagName = 'backbone.js' OR Tags.TagName = 'polymer' | Technology Trends (# Questions per Tag). | CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,... |
SELECT MAX(wins) FROM table_17751942_4 WHERE team = "Red Deer Rebels" | How many wins do the Red Deer Rebels have? | CREATE TABLE table_17751942_4 (wins INTEGER, team VARCHAR) |
SELECT T1.transaction_type_description FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code GROUP BY T1.transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1 | Show the description of the transaction type that occurs most frequently. | CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR); CREATE TABLE Ref_Transaction_Types (transaction_type_description VARCHAR, transaction_type_code VARCHAR) |
SELECT customer_name FROM customers WHERE customer_name LIKE "%Alex%" | Which customer's name contains 'Alex'? Find the full name. | CREATE TABLE order_items (
order_id number,
product_id number,
order_quantity text
)
CREATE TABLE customer_contact_channels (
customer_id number,
channel_code text,
active_from_date time,
active_to_date time,
contact_number text
)
CREATE TABLE customers (
customer_id number,
pa... |
SELECT record FROM table_17765888_1 WHERE date = "November 26, 1961" | What is the record for November 26, 1961? | CREATE TABLE table_17765888_1 (record VARCHAR, date VARCHAR) |
SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 1 | Show the id and details of the investor that has the largest number of transactions. | CREATE TABLE TRANSACTIONS (investor_id VARCHAR); CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND lab.label = "Sodium, Urine" | how many patients whose admission type is elective have got the lab test named sodium, urine done? | 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 game_site FROM table_17765888_1 WHERE opponent = "Dallas Texans" | What was the game site against the Dallas Texans? | CREATE TABLE table_17765888_1 (game_site VARCHAR, opponent VARCHAR) |
SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 3 | Show the id and details for the investors who have the top 3 number of transactions. | CREATE TABLE TRANSACTIONS (investor_id VARCHAR); CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR) |
SELECT team_2 FROM table_name_88 WHERE team_1 = "américa" | Who was Team 2 when Team 1 was Am rica? | CREATE TABLE table_name_88 (
team_2 VARCHAR,
team_1 VARCHAR
) |
SELECT COUNT(year_s_) FROM table_17766232_7 WHERE final_television_commentator = "Tom Fleming" | In how many years was Tom Fleming the final television commentator? | CREATE TABLE table_17766232_7 (year_s_ VARCHAR, final_television_commentator VARCHAR) |
SELECT T2.investor_id FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id HAVING COUNT(*) >= 2 | Show the ids of the investors who have at least two transactions. | CREATE TABLE TRANSACTIONS (investor_id VARCHAR); CREATE TABLE INVESTORS (investor_id VARCHAR) |
SELECT Sex, COUNT(*) FROM Faculty GROUP BY Sex ORDER BY COUNT(*) | A bar chart showing the number of male and female faculty, rank y-axis in asc order. | CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Rank VARCHAR(15),
Sex VARCHAR(1),
Phone INTEGER,
Room VARCHAR(5),
Building VARCHAR(13)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1... |
SELECT MAX(year_s_) FROM table_17766232_7 WHERE spokesperson = "Colin Berry" | What was the latest year that Colin Berry was the spokesperson? | CREATE TABLE table_17766232_7 (year_s_ INTEGER, spokesperson VARCHAR) |
SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = "SALE" GROUP BY T2.investor_id HAVING COUNT(*) >= 2 | Show the ids and details of the investors who have at least two transactions with type code "SALE". | CREATE TABLE TRANSACTIONS (investor_id VARCHAR, transaction_type_code VARCHAR); CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR) |
SELECT "numer of jamaicans\ngranted british\ncitizenship" FROM table_203_467 WHERE "year" = 1998 | how many jamaicans were granted british citizenship in 1998 ? | CREATE TABLE table_203_467 (
id number,
"year" number,
"numer of jamaicans\ngranted british\ncitizenship" number,
"naturalisation\nby residence" number,
"naturalisation\nby marriage" number,
"registration\nof a minor child" number,
"registration\nby other means" number
) |
SELECT semi_final_television_commentator FROM table_17766232_7 WHERE spokesperson = "Colin Berry" AND final_television_commentator = "Pete Murray" | Who was the semi-final television commentator when the spokesperson was Colin Berry and the final television commentator was Pete Murray? | CREATE TABLE table_17766232_7 (semi_final_television_commentator VARCHAR, spokesperson VARCHAR, final_television_commentator VARCHAR) |
SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count >= 100 OR amount_of_transaction >= 100 | What are the dates of transactions with at least 100 share count or amount bigger than 100? | CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, share_count VARCHAR, amount_of_transaction VARCHAR) |
SELECT "Nation" FROM table_22551 WHERE "Rider" = 'Phillip Dutton' | Which nation is where rider phillip dutton from? | CREATE TABLE table_22551 (
"Nation" text,
"Rider" text,
"Horse" text,
"Cross Country Penalties" text,
"Total Penalties" text,
"Total Team Penalties" text,
"Team Rank" real
) |
SELECT radio_commentator FROM table_17766232_7 WHERE final_television_commentator = "John Dunn" | Who was the radio commentator when the final television commentator was John Dunn? | CREATE TABLE table_17766232_7 (radio_commentator VARCHAR, final_television_commentator VARCHAR) |
SELECT sales_details FROM sales UNION SELECT purchase_details FROM purchases | What are the details of all sales and purchases? | CREATE TABLE purchases (sales_details VARCHAR, purchase_details VARCHAR); CREATE TABLE sales (sales_details VARCHAR, purchase_details VARCHAR) |
SELECT t.Name, h.CreationDate, PostId AS "post_link" FROM PostHistory AS h JOIN PostHistoryTypes AS t ON t.Id = PostHistoryTypeId WHERE PostId IN (SELECT Id FROM Posts WHERE OwnerUserId = '##UserId##') AND h.UserId = '##UserId##' AND PostHistoryTypeId IN (4, 5, 6, 7, 8, 9) ORDER BY h.CreationDate DESC | My own Edits on my posts. | CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
... |
SELECT MAX(year_s_) FROM table_17766232_7 WHERE final_television_commentator = "David Jacobs" | What is the latest year that the final television commentator was David Jacobs? | CREATE TABLE table_17766232_7 (year_s_ INTEGER, final_television_commentator VARCHAR) |
SELECT lot_details FROM Lots EXCEPT SELECT T1.lot_details FROM Lots AS T1 JOIN transactions_lots AS T2 ON T1.lot_id = T2.lot_id | What are the details of the lots which are not used in any transactions? | CREATE TABLE Lots (lot_details VARCHAR, lot_id VARCHAR); CREATE TABLE Lots (lot_details VARCHAR); CREATE TABLE transactions_lots (lot_id VARCHAR) |
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 = 'PHILADELPHIA' AND date_day.day_number = 24 AND date_day.month_number = 5 ... | please tell me the flights between BOSTON and PHILADELPHIA next thursday | CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE flight_stop (
flight_id int,
stop... |
SELECT record FROM table_17765264_1 WHERE attendance = 14489 | What was their record when the attendance at the game was 14489? | CREATE TABLE table_17765264_1 (record VARCHAR, attendance VARCHAR) |
SELECT COUNT(*) FROM HOTELS | How many available hotels are there in total? | CREATE TABLE HOTELS (Id VARCHAR) |
SELECT street_address FROM table_name_70 WHERE floors = 44 | Which address has 44 floors? | CREATE TABLE table_name_70 (
street_address VARCHAR,
floors VARCHAR
) |
SELECT date FROM table_17765264_1 WHERE game_site = "Cotton Bowl" | When did they play at the Cotton Bowl? | CREATE TABLE table_17765264_1 (date VARCHAR, game_site VARCHAR) |
SELECT price_range FROM HOTELS | What are the price ranges of hotels? | CREATE TABLE HOTELS (price_range VARCHAR) |
SELECT a.Id AS "post_link", a.Score AS "answer_score", LENGTH(a.Body) AS "answer_length", a.Body AS "answer_body" FROM Posts AS a INNER JOIN Posts AS q ON q.Id = a.ParentId WHERE a.PostTypeId = 2 AND q.Tags LIKE '%<regex>%' AND (a.Body LIKE '<pre><code>%' OR a.Body LIKE '<p><code>%') AND LENGTH(a.Body) <= 100 GROUP BY ... | Answers who's question is tagged 'regex' and is likely just a new regex. | CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
Mark... |
SELECT percentage FROM table_177766_1 WHERE abbreviation = "Nor" | What is the percentage of this constellation abbreviated as 'nor'? | CREATE TABLE table_177766_1 (percentage VARCHAR, abbreviation VARCHAR) |
SELECT DISTINCT Location_Name FROM LOCATIONS | Show all distinct location names. | CREATE TABLE LOCATIONS (Location_Name VARCHAR) |
SELECT COUNT("iso/iec standard") FROM table_204_200 WHERE "status" < 2000 | how many iso/iec were published before the year 2000 ? | CREATE TABLE table_204_200 (
id number,
"iso/iec standard" text,
"title" text,
"status" text,
"description" text,
"wg" number
) |
SELECT COUNT(right_ascension__hm_) FROM table_177766_1 WHERE abbreviation = "Oph" | This constellation, abbreviated as 'oph' has how many right ascension (in hm)? | CREATE TABLE table_177766_1 (right_ascension__hm_ VARCHAR, abbreviation VARCHAR) |
SELECT Name, Other_Details FROM Staff | Show the names and details of all the staff members. | CREATE TABLE Staff (Name VARCHAR, Other_Details VARCHAR) |
SELECT MIN(enrollment) FROM table_15851155_1 WHERE school = "Montana Tech of the University of Montana" | Name the minimum enrollment for montana tech of the university of montana | CREATE TABLE table_15851155_1 (
enrollment INTEGER,
school VARCHAR
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.