answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT Carrier FROM device WHERE Software_Platform <> 'Android' | What are the carriers of devices whose software platforms are not "Android"? | CREATE TABLE device (Carrier VARCHAR, Software_Platform VARCHAR) |
SELECT "Score" FROM table_43908 WHERE "Away team" = 'gold coast blaze' AND "Home team" = 'adelaide 36ers' | What was the score of the game which featured the gold coast blaze as the away team and the adelaide 36ers as the home team? | CREATE TABLE table_43908 (
"Date" text,
"Home team" text,
"Score" text,
"Away team" text,
"Venue" text,
"Crowd" real,
"Box Score" text,
"Report" text
) |
SELECT COUNT(driver___passenger) FROM table_17176509_4 WHERE position = 30 | Name the driver/passenger for 30 | CREATE TABLE table_17176509_4 (driver___passenger VARCHAR, position VARCHAR) |
SELECT Shop_Name FROM shop ORDER BY Open_Year | What are the names of shops in ascending order of open year? | CREATE TABLE shop (Shop_Name VARCHAR, Open_Year VARCHAR) |
SELECT year FROM table_name_72 WHERE status = "won" | In what year is the status of won? | CREATE TABLE table_name_72 (
year VARCHAR,
status VARCHAR
) |
SELECT MAX(bike_no) FROM table_17176509_4 WHERE position = 30 | Name the max bike number of position for 30 | CREATE TABLE table_17176509_4 (bike_no INTEGER, position VARCHAR) |
SELECT AVG(Quantity) FROM stock | What is the average quantity of stocks? | CREATE TABLE stock (Quantity INTEGER) |
SELECT SUM("Wins") FROM table_70144 WHERE "Earnings (\u20ac)" > '2,864,342' AND "Money list rank" = '3' | What is the sum of number of wins that have earnings of more than ( )2,864,342 and money list rank of 3? | CREATE TABLE table_70144 (
"Year" text,
"Starts" real,
"Cuts made" real,
"Wins" real,
"Top 10" real,
"Top 25" real,
"Earnings (\u20ac)" real,
"Money list rank" real
) |
SELECT high_points FROM table_17190012_12 WHERE game = 4 | Who had the most points in game 4? | CREATE TABLE table_17190012_12 (high_points VARCHAR, game VARCHAR) |
SELECT Shop_Name, LOCATION FROM shop ORDER BY Shop_Name | What are the names and location of the shops in ascending alphabetical order of name. | CREATE TABLE shop (Shop_Name VARCHAR, LOCATION VARCHAR) |
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE STRFTIME('%y', patient.hospitaladmittime) >= '2103' | what is the number of patients admitted to hospital since 2103? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE patient (
uniquepid text,
pati... |
SELECT COUNT(going_to) FROM table_17200372_2 WHERE calling_at = "Thurlby, Braceborough Spa" AND departure = "16.50" | Name the number of going to for thurlby, braceborough spa at departure being 16.50 | CREATE TABLE table_17200372_2 (going_to VARCHAR, calling_at VARCHAR, departure VARCHAR) |
SELECT COUNT(DISTINCT Software_Platform) FROM device | How many different software platforms are there for devices? | CREATE TABLE device (Software_Platform VARCHAR) |
SELECT MAX("Round") FROM table_44649 WHERE "Overall" < '17' | what is the highest round when the overall is less than 17? | CREATE TABLE table_44649 (
"Round" real,
"Pick" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) |
SELECT departure FROM table_17200372_2 WHERE going_to = "Spalding" | Name the departure for spalding | CREATE TABLE table_17200372_2 (departure VARCHAR, going_to VARCHAR) |
SELECT Open_Date, Open_Year FROM shop WHERE Shop_Name = "Apple" | List the open date of open year of the shop named "Apple". | CREATE TABLE shop (Open_Date VARCHAR, Open_Year VARCHAR, Shop_Name VARCHAR) |
SELECT hometown FROM table_name_40 WHERE name = "hasan shah" | What is Hasan Shah's hometown? | CREATE TABLE table_name_40 (
hometown VARCHAR,
name VARCHAR
) |
SELECT high_points FROM table_17190012_7 WHERE record = "27–5" | who scored highest points on the game with record 27–5 | CREATE TABLE table_17190012_7 (high_points VARCHAR, record VARCHAR) |
SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1 | List the name of the shop with the latest open year. | CREATE TABLE shop (Shop_Name VARCHAR, Open_Year VARCHAR) |
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hypocalcemia - due to rhabdomyolysis' AND DATETIME... | list the top three most common drugs that patients are prescribed with during the same month after being diagnosed with hypocalcemia - due to rhabdomyolysis until 2 years ago. | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtim... |
SELECT high_rebounds FROM table_17190012_7 WHERE score = "W 105–88 (OT)" | who did highest rebounds in the game with score w 105–88 (ot) | CREATE TABLE table_17190012_7 (high_rebounds VARCHAR, score VARCHAR) |
SELECT T3.Shop_Name, T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID | Show names of shops and the carriers of devices they have in stock. | CREATE TABLE shop (Shop_Name VARCHAR, Shop_ID VARCHAR); CREATE TABLE stock (Device_ID VARCHAR, Shop_ID VARCHAR); CREATE TABLE device (Carrier VARCHAR, Device_ID VARCHAR) |
SELECT "Record" FROM table_73538 WHERE "Opponent" = 'Central Connecticut' | what is the record where the opponent is central connecticut? | CREATE TABLE table_73538 (
"Date" text,
"Opponent" text,
"Location" text,
"Irish Points" real,
"Opp. Points" real,
"Record" text
) |
SELECT COUNT(record) FROM table_17190012_7 WHERE score = "W 121–119 (OT)" | how many records were made on the game that ended with score w 121–119 (ot) | CREATE TABLE table_17190012_7 (record VARCHAR, score VARCHAR) |
SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*) > 1 | Show names of shops that have more than one kind of device in stock. | CREATE TABLE shop (Shop_Name VARCHAR, Shop_ID VARCHAR); CREATE TABLE stock (Shop_ID VARCHAR) |
SELECT "Record" FROM table_29595 WHERE "Date" = 'October 22' | What was the October 22 record? | CREATE TABLE table_29595 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"First Star" text,
"Decision" text,
"Location" text,
"Attendance" real,
"Record" text,
"Points" real
) |
SELECT position_in_table FROM table_17201869_3 WHERE replaced_by = "Lucas Alcaraz" | What was the team's position when the new manager was Lucas Alcaraz? | CREATE TABLE table_17201869_3 (position_in_table VARCHAR, replaced_by VARCHAR) |
SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1 | Show the name of the shop that has the most kind of devices in stock. | CREATE TABLE shop (Shop_Name VARCHAR, Shop_ID VARCHAR); CREATE TABLE stock (Shop_ID VARCHAR) |
SELECT school FROM table_name_35 WHERE mascot = "squires" | Which School has a Mascot of squires? | CREATE TABLE table_name_35 (
school VARCHAR,
mascot VARCHAR
) |
SELECT replaced_by FROM table_17201869_3 WHERE outgoing_manager = "José Ángel Ziganda" | Who replaced outgoing manager José Ángel Ziganda? | CREATE TABLE table_17201869_3 (replaced_by VARCHAR, outgoing_manager VARCHAR) |
SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1 | Show the name of the shop that have the largest quantity of devices in stock. | CREATE TABLE stock (Shop_ID VARCHAR, quantity INTEGER); CREATE TABLE shop (Shop_Name VARCHAR, Shop_ID VARCHAR) |
SELECT attendance FROM table_name_95 WHERE week > 16 | What's the attendance when the week was more than 16? | CREATE TABLE table_name_95 (
attendance VARCHAR,
week INTEGER
) |
SELECT grid FROM table_17244483_1 WHERE points = "19" | What grid did the driver who earned 19 points start at? | CREATE TABLE table_17244483_1 (grid VARCHAR, points VARCHAR) |
SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform | Please show different software platforms and the corresponding number of devices using each. | CREATE TABLE device (Software_Platform VARCHAR) |
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '018-20179' AND patient.hospitaldischargetime IS NULL)) AND medication.drug... | did levaquin, dextrose 50 % in water (d50w) iv syringe, or d50 during this hospital encounter be prescribed to patient 018-20179? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE allergy (
allergyid number... |
SELECT COUNT(grid) FROM table_17244483_1 WHERE driver = "Scott Dixon" | Scott Dixon had how many Grid positions? | CREATE TABLE table_17244483_1 (grid VARCHAR, driver VARCHAR) |
SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC | Please show the software platforms of devices in descending order of the count. | CREATE TABLE device (Software_Platform VARCHAR) |
SELECT DISTINCT course_offering.end_time, course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.start_time, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM course, course_offering, semester WHERE course.course_id = course_offe... | At what times is 473 taught during the Summer terms ? | CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TAB... |
SELECT time_retired FROM table_17244483_1 WHERE car_no = 15 | Car number 15 earned what time? | CREATE TABLE table_17244483_1 (time_retired VARCHAR, car_no VARCHAR) |
SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1 | List the software platform shared by the greatest number of devices. | CREATE TABLE device (Software_Platform VARCHAR) |
SELECT time FROM table_name_55 WHERE writer_s_ = "aaron schroeder and wally gold" | What is the time of songs that have the writer Aaron Schroeder and Wally Gold? | CREATE TABLE table_name_55 (
time VARCHAR,
writer_s_ VARCHAR
) |
SELECT COUNT(fin_pos) FROM table_17244483_1 WHERE time_retired = "+10.8098" | How many positions did the car with a final time of +10.8098 finish in? | CREATE TABLE table_17244483_1 (fin_pos VARCHAR, time_retired VARCHAR) |
SELECT Shop_Name FROM shop WHERE NOT Shop_ID IN (SELECT Shop_ID FROM stock) | List the names of shops that have no devices in stock. | CREATE TABLE shop (Shop_Name VARCHAR, Shop_ID VARCHAR); CREATE TABLE stock (Shop_Name VARCHAR, Shop_ID VARCHAR) |
SELECT "Tonnage" FROM table_32996 WHERE "Nationality" = 'great britain' AND "Ship" = 'batna' | What was the tonnage of the Great Britain ship Batna? | CREATE TABLE table_32996 (
"Date" text,
"Ship" text,
"Nationality" text,
"Tonnage" real,
"Fate" text
) |
SELECT MIN(fin_pos) FROM table_17244483_1 WHERE driver = "Darren Manning" | Darren Manning finished in what position? | CREATE TABLE table_17244483_1 (fin_pos INTEGER, driver VARCHAR) |
SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008 | Show the locations shared by shops with open year later than 2012 and shops with open year before 2008. | CREATE TABLE shop (LOCATION VARCHAR, Open_Year INTEGER) |
SELECT MAX("Points") FROM table_6919 WHERE "Goals against" = '354' AND "Games" < '82' | What is the most points when the goals against are 354 and games less than 82? | CREATE TABLE table_6919 (
"Season" text,
"Games" real,
"Lost" real,
"Tied" real,
"Points" real,
"Goals for" real,
"Goals against" real,
"Coach" text
) |
SELECT position FROM table_17246160_1 WHERE team = "Josef Kaufmann Racing" | What was the position for the Josef Kaufmann Racing team? | CREATE TABLE table_17246160_1 (position VARCHAR, team VARCHAR) |
SELECT Carrier FROM device WHERE NOT Device_ID IN (SELECT Device_ID FROM stock) | List the carriers of devices that have no devices in stock. | CREATE TABLE stock (Carrier VARCHAR, Device_ID VARCHAR); CREATE TABLE device (Carrier VARCHAR, Device_ID VARCHAR) |
SELECT constructor FROM table_name_91 WHERE race_name = "i news of the world trophy" | Which constructor has a race called I News of the World Trophy? | CREATE TABLE table_name_91 (
constructor VARCHAR,
race_name VARCHAR
) |
SELECT MAX(poles) FROM table_17246160_1 WHERE series = "Formula BMW Pacific" | How many poles did the player have during the Formula BMW Pacific race? | CREATE TABLE table_17246160_1 (poles INTEGER, series VARCHAR) |
SELECT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID GROUP BY T1.Device_ID HAVING COUNT(*) > 1 | Show the carriers of devices in stock at more than one shop. | CREATE TABLE stock (Device_ID VARCHAR); CREATE TABLE device (Carrier VARCHAR, Device_ID VARCHAR) |
SELECT MAX(rnd) FROM table_24865763_2 WHERE gt2_winning_team = "Marc Lieb Richard Lietz" | What was the maximum round where Marc Lieb Richard Lietz was on the GT2 Winning Team? | CREATE TABLE table_24865763_2 (
rnd INTEGER,
gt2_winning_team VARCHAR
) |
SELECT MAX(season) FROM table_17246160_1 WHERE points = 0 AND position = "31st" | Which season did he have 0 points and 31st position? | CREATE TABLE table_17246160_1 (season INTEGER, points VARCHAR, position VARCHAR) |
SELECT COUNT(*) FROM BOOKINGS | How many bookings do we have? | CREATE TABLE BOOKINGS (Id VARCHAR) |
SELECT MAX(mintage) FROM table_name_42 WHERE year > 2006 AND theme = "ruby-throated hummingbird" | What is the MIntage after 2006 of the Ruby-Throated Hummingbird Theme coin? | CREATE TABLE table_name_42 (
mintage INTEGER,
year VARCHAR,
theme VARCHAR
) |
SELECT wins FROM table_17246160_1 WHERE series = "Formula BMW World Final" | How many wins did the player have in the Formula BMW World Final? | CREATE TABLE table_17246160_1 (wins VARCHAR, series VARCHAR) |
SELECT Order_Date FROM BOOKINGS | List the order dates of all the bookings. | CREATE TABLE BOOKINGS (Order_Date VARCHAR) |
SELECT MIN("Yes") FROM table_1577 WHERE "Constituency" = 'Dublin South' | Name the least yes for dublin south | CREATE TABLE table_1577 (
"Constituency" text,
"Electorate" real,
"Votes" real,
"Turnout" text,
"Yes" real,
"No" real,
"Spoilt" real,
"Percent Yes" text
) |
SELECT air_date FROM table_17257687_1 WHERE event_2 = "Hang Tough" | On what date was the episode aired where event 2 was Hang Tough? | CREATE TABLE table_17257687_1 (air_date VARCHAR, event_2 VARCHAR) |
SELECT Planned_Delivery_Date, Actual_Delivery_Date FROM BOOKINGS | Show all the planned delivery dates and actual delivery dates of bookings. | CREATE TABLE BOOKINGS (Planned_Delivery_Date VARCHAR, Actual_Delivery_Date VARCHAR) |
SELECT COUNT("Candidates") FROM table_18209 WHERE "Party" = 'Democratic' AND "District" = 'New York5' | how many candidates with party being democratic and dbeingtrict being new york5 | CREATE TABLE table_18209 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) |
SELECT event_2 FROM table_17257687_1 WHERE event_4 = "Whiplash" | When event 4 was Whiplash, what was event 2? | CREATE TABLE table_17257687_1 (event_2 VARCHAR, event_4 VARCHAR) |
SELECT COUNT(*) FROM CUSTOMERS | How many customers do we have? | CREATE TABLE CUSTOMERS (Id VARCHAR) |
SELECT height_in_ft FROM table_11734041_16 WHERE years_for_rockets = "1973-78" | What is the height in ft for the rockets from 1973-78? | CREATE TABLE table_11734041_16 (
height_in_ft VARCHAR,
years_for_rockets VARCHAR
) |
SELECT COUNT(air_date) FROM table_17257687_1 WHERE event_1 = "Suspension Bridge" | On how many different dates was event 1 Suspension Bridge? | CREATE TABLE table_17257687_1 (air_date VARCHAR, event_1 VARCHAR) |
SELECT Customer_Phone, Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = "Harold" | What are the phone and email for customer Harold? | CREATE TABLE CUSTOMERS (Customer_Phone VARCHAR, Customer_Email_Address VARCHAR, Customer_Name VARCHAR) |
SELECT "High rebounds" FROM table_29729 WHERE "Team" = 'Charlotte' | Name the high rebounds for charlotte | CREATE TABLE table_29729 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) |
SELECT COUNT(episode_number) FROM table_17257687_1 WHERE event_4 = "The Wall" AND event_1 = "Pendulum" | On which episode number is event 4 The Wall and event 1 the Pendulum? | CREATE TABLE table_17257687_1 (episode_number VARCHAR, event_4 VARCHAR, event_1 VARCHAR) |
SELECT Store_Name FROM Drama_Workshop_Groups | Show all the Store_Name of drama workshop groups. | CREATE TABLE Drama_Workshop_Groups (Store_Name VARCHAR) |
SELECT "Opponent" FROM table_51557 WHERE "Arena" = 'staples center' | Who was the opponent at the Staples Center? | CREATE TABLE table_51557 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Record" text,
"Arena" text
) |
SELECT event_2 FROM table_17257687_1 WHERE event_1 = "Atlasphere" | What was event 2 when event 1 was Atlasphere? | CREATE TABLE table_17257687_1 (event_2 VARCHAR, event_1 VARCHAR) |
SELECT MIN(Order_Quantity), AVG(Order_Quantity), MAX(Order_Quantity) FROM INVOICES | Show the minimum, average, maximum order quantity of all invoices. | CREATE TABLE INVOICES (Order_Quantity INTEGER) |
SELECT "Club" FROM table_50722 WHERE "Runners-up" = '1' AND "Winners" = '0' AND "Third" = '2' | Which club has 1 runners-up with 0 winners and 2 third place earned? | CREATE TABLE table_50722 (
"Rank" real,
"Club" text,
"Winners" real,
"Runners-up" real,
"Third" real
) |
SELECT car_no FROM table_17256857_1 WHERE driver = "Darren Manning" | What is the car number driven by Darren Manning? | CREATE TABLE table_17256857_1 (car_no VARCHAR, driver VARCHAR) |
SELECT DISTINCT payment_method_code FROM INVOICES | What are the distinct payment method codes in all the invoices? | CREATE TABLE INVOICES (payment_method_code VARCHAR) |
SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | For those employees who did not have any job in the past, return a bar chart about the distribution of hire_date and the sum of salary bin hire_date by weekday. | CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
... |
SELECT MAX(fin_pos) FROM table_17256857_1 WHERE points = "50" | Which position earned 50 points? | CREATE TABLE table_17256857_1 (fin_pos INTEGER, points VARCHAR) |
SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name = "China" | What is the description of the marketing region China? | CREATE TABLE Marketing_Regions (Marketing_Region_Descriptrion VARCHAR, Marketing_Region_Name VARCHAR) |
SELECT district FROM table_2668336_17 WHERE first_elected = "1807 1817" | First elected in 1807 1817 in what district? | CREATE TABLE table_2668336_17 (
district VARCHAR,
first_elected VARCHAR
) |
SELECT COUNT(grid) FROM table_17256857_1 WHERE driver = "Vitor Meira" | How many drivers on the grid are called Vitor Meira? | CREATE TABLE table_17256857_1 (grid VARCHAR, driver VARCHAR) |
SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price > (SELECT AVG(Product_Price) FROM PRODUCTS) | Show all the distinct product names with price higher than the average. | CREATE TABLE PRODUCTS (Product_Name VARCHAR, Product_Price INTEGER) |
SELECT DISTINCT T2.problem_id, T2.problem_log_id FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T1.staff_first_name = "Rylan" AND T1.staff_last_name = "Homenick" | List the problem id and log id which are assigned to the staff named Rylan Homenick. | CREATE TABLE problem_category_codes (
problem_category_code text,
problem_category_description text
)
CREATE TABLE problems (
problem_id number,
product_id number,
closure_authorised_by_staff_id number,
reported_by_staff_id number,
date_problem_reported time,
date_problem_closed time,
... |
SELECT MIN(result) FROM table_17265535_7 WHERE equation = "0 × 9² + 3 × 9 + 3" | If the equation is 0 × 9² + 3 × 9 + 3, what is the result? | CREATE TABLE table_17265535_7 (result INTEGER, equation VARCHAR) |
SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1 | What is the name of the most expensive product? | CREATE TABLE PRODUCTS (Product_Name VARCHAR, Product_Price VARCHAR) |
SELECT Type, COUNT(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T2.Type ORDER BY Type | Show the type of school and the number of buses for each type in a bar chart, show by the Type in ascending. | CREATE TABLE driver (
Driver_ID int,
Name text,
Party text,
Home_city text,
Age int
)
CREATE TABLE school_bus (
School_ID int,
Driver_ID int,
Years_Working int,
If_full_time bool
)
CREATE TABLE school (
School_ID int,
Grade text,
School text,
Location text,
Type... |
SELECT MAX(3 AS rd_throw) FROM table_17265535_7 WHERE equation = "6 × 9² + 6 × 9 + 6" | If the equation is 6 × 9² + 6 × 9 + 6, what is the 3rd throw? | CREATE TABLE table_17265535_7 (equation VARCHAR) |
SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name = "Ashley" | What is the phone number of the performer Ashley? | CREATE TABLE PERFORMERS (Customer_Phone VARCHAR, Customer_Name VARCHAR) |
SELECT "Aggregate" FROM table_78933 WHERE "2nd leg" = '1-2' | What was the aggregate score that had a 1-2 second leg score? | CREATE TABLE table_78933 (
"Home (1st leg)" text,
"Home (2nd leg)" text,
"1st Leg" text,
"2nd leg" text,
"Aggregate" text
) |
SELECT MIN(2 AS nd_throw) FROM table_17265535_7 WHERE equation = "8 × 9² + 8 × 9 + 8" | If the equation is 8 × 9² + 8 × 9 + 8, what is the 2nd throw? | CREATE TABLE table_17265535_7 (equation VARCHAR) |
SELECT payment_method_code, COUNT(*) FROM INVOICES GROUP BY payment_method_code | Show all payment method codes and the number of orders for each code. | CREATE TABLE INVOICES (payment_method_code VARCHAR) |
SELECT DISTINCT card_type_code FROM customers_cards | What are the different card type codes? | CREATE TABLE customers (
customer_id number,
customer_first_name text,
customer_last_name text,
customer_address text,
customer_phone text,
customer_email text,
other_customer_details text
)
CREATE TABLE accounts (
account_id number,
customer_id number,
account_name text,
ot... |
SELECT 2 AS nd_throw FROM table_17265535_7 WHERE equation = "1 × 9² + 4 × 9 + 0" | If the equation is 1 × 9² + 4 × 9 + 0, what is the 2nd throw? | CREATE TABLE table_17265535_7 (equation VARCHAR) |
SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY COUNT(*) DESC LIMIT 1 | What is the payment method code used by the most orders? | CREATE TABLE INVOICES (payment_method_code VARCHAR) |
SELECT type FROM table_name_28 WHERE moving_to = "alianza atlético" | what is the type movinig to alianza atl tico? | CREATE TABLE table_name_28 (
type VARCHAR,
moving_to VARCHAR
) |
SELECT MAX(2 AS nd_throw) FROM table_17265535_7 WHERE equation = "6 × 9² + 6 × 9 + 6" | If the equation is 6 × 9² + 6 × 9 + 6, what is the 2nd throw? | CREATE TABLE table_17265535_7 (equation VARCHAR) |
SELECT T1.City_Town FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Store_Name = "FJA Filming" | Which city is the address of the store named "FJA Filming" located in? | CREATE TABLE Addresses (City_Town VARCHAR, Address_ID VARCHAR); CREATE TABLE Stores (Address_ID VARCHAR, Store_Name VARCHAR) |
SELECT MAX(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.insurance = "Self Pay" | what is maximum age of patients whose gender is m and insurance is self pay? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... |
SELECT 2 AS nd_leg FROM table_17282875_3 WHERE team__number1 = "San Lorenzo" | When they played San Lorenzo, what was the score of the second leg? | CREATE TABLE table_17282875_3 (team__number1 VARCHAR) |
SELECT T1.State_County FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Marketing_Region_Code = "CA" | What are the states or counties of the address of the stores with marketing region code "CA"? | CREATE TABLE Addresses (State_County VARCHAR, Address_ID VARCHAR); CREATE TABLE Stores (Address_ID VARCHAR, Marketing_Region_Code VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.