answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT township FROM table_18600760_18 WHERE longitude = "-100.680772" | What is the township at longitude -100.680772? | CREATE TABLE table_18600760_18 (township VARCHAR, longitude VARCHAR) |
SELECT name, city, country FROM airports ORDER BY elevation DESC LIMIT 1 | Find the name, city, and country of the airport that has the highest latitude. | CREATE TABLE airports (name VARCHAR, city VARCHAR, country VARCHAR, elevation VARCHAR) |
SELECT "Date" FROM table_19759 WHERE "Weight (kg)" = '55' | When did the 55 kg participant race? | CREATE TABLE table_19759 (
"Result" text,
"Date" text,
"Race" text,
"Venue" text,
"Group" text,
"Distance" text,
"Weight (kg)" text,
"Jockey" text,
"Winner/2nd" text
) |
SELECT MIN(ansi_code) FROM table_18600760_18 WHERE land___sqmi__ = "35.737" | What is the ANSI code of the township where the area is 35.737 square miles? | CREATE TABLE table_18600760_18 (ansi_code INTEGER, land___sqmi__ VARCHAR) |
SELECT T1.name, T1.city, T2.dst_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid GROUP BY T2.dst_apid ORDER BY COUNT(*) DESC LIMIT 1 | Find the name and city of the airport which is the destination of the most number of routes. | CREATE TABLE airports (name VARCHAR, city VARCHAR, apid VARCHAR); CREATE TABLE routes (dst_apid VARCHAR) |
SELECT date_from, COUNT(date_from) FROM Customer_Address_History AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id JOIN Addresses AS T3 ON T1.address_id = T3.address_id | Show the number of customer address history in each year and bin date from by year interval with a line chart. | CREATE TABLE Customers (
customer_id INTEGER,
payment_method_code VARCHAR(15),
customer_number VARCHAR(20),
customer_name VARCHAR(80),
customer_address VARCHAR(255),
customer_phone VARCHAR(80),
customer_email VARCHAR(80)
)
CREATE TABLE Products (
product_id INTEGER,
product_type_cod... |
SELECT MAX(geo_id) FROM table_18600760_18 WHERE land___sqmi__ = "32.532" | What is the GEO ID of the township with area of 32.532 square miles? | CREATE TABLE table_18600760_18 (geo_id INTEGER, land___sqmi__ VARCHAR) |
SELECT T1.name, T2.alid FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T2.alid ORDER BY COUNT(*) DESC LIMIT 10 | Find the names of the top 10 airlines that operate the most number of routes. | CREATE TABLE airlines (name VARCHAR, alid VARCHAR); CREATE TABLE routes (alid VARCHAR) |
SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id ORDER BY COUNT(booking_start_date) DESC | How many apartment bookings for each weekday? Draw a bar chart binning booking start date by weekday interval, and rank by the y-axis from high to low please. | CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address VARCHAR(255),
building_manager VARCHAR(50),
building_phone VARCHAR(80)
)
CREATE TABLE View_Unit_Status (
apt_id INTEG... |
SELECT township FROM table_18600760_18 WHERE land___sqmi__ = "34.781" | What township is 34.781 square miles? | CREATE TABLE table_18600760_18 (township VARCHAR, land___sqmi__ VARCHAR) |
SELECT T1.name, T1.city, T2.src_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T2.src_apid ORDER BY COUNT(*) DESC LIMIT 1 | Find the name and city of the airport which is the source for the most number of flight routes. | CREATE TABLE airports (name VARCHAR, city VARCHAR, apid VARCHAR); CREATE TABLE routes (src_apid VARCHAR) |
SELECT MIN("Assists") FROM table_68525 WHERE "League" = 'wchl' AND "Goals" < '65' | In the WCHL League, what is the last Assists with less than 65 Goals? | CREATE TABLE table_68525 (
"Season" text,
"League" text,
"Winner" text,
"Goals" real,
"Assists" real,
"Points" real
) |
SELECT longitude FROM table_18600760_20 WHERE township = "Tatman" | What longitude is tatman township? | CREATE TABLE table_18600760_20 (longitude VARCHAR, township VARCHAR) |
SELECT COUNT(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines' | Find the number of different airports which are the destinations of the American Airlines. | CREATE TABLE routes (alid VARCHAR); CREATE TABLE airlines (alid VARCHAR, name VARCHAR) |
SELECT score FROM table_name_58 WHERE record = "35–23–15" | What was the score when their record was 35 23 15? | CREATE TABLE table_name_58 (
score VARCHAR,
record VARCHAR
) |
SELECT land___sqmi__ FROM table_18600760_20 WHERE latitude = "47.548602" | What is the land area (sqmi) for the township at longtidue 47.548602? | CREATE TABLE table_18600760_20 (land___sqmi__ VARCHAR, latitude VARCHAR) |
SELECT country FROM airlines GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1 | Which countries has the most number of airlines? | CREATE TABLE airlines (country VARCHAR) |
SELECT school_club_team FROM table_name_19 WHERE player = "derek fisher" | What college team did Derek Fisher play for? | CREATE TABLE table_name_19 (
school_club_team VARCHAR,
player VARCHAR
) |
SELECT COUNT(ansi_code) FROM table_18600760_20 WHERE latitude = "46.415037" | How many ansi codes are there for longitude 46.415037? | CREATE TABLE table_18600760_20 (ansi_code VARCHAR, latitude VARCHAR) |
SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1 | Which countries has the most number of airlines whose active status is 'Y'? | CREATE TABLE airlines (country VARCHAR, active VARCHAR) |
SELECT "3-dart Average" FROM table_23654 WHERE "Player" = 'Raymond van Barneveld' | what is the 3-dart average of raymond van barneveld | CREATE TABLE table_23654 (
"Player" text,
"Played" real,
"Legs Won" real,
"Legs Lost" real,
"100+" real,
"140+" real,
"180s" real,
"High Checkout" real,
"3-dart Average" text
) |
SELECT water__sqmi_ FROM table_18600760_20 WHERE latitude = "48.423224" | What is the water area (sqmi) for the township at latitude 48.423224? | CREATE TABLE table_18600760_20 (water__sqmi_ VARCHAR, latitude VARCHAR) |
SELECT country, COUNT(*) FROM airlines GROUP BY country ORDER BY COUNT(*) DESC | List all countries and their number of airlines in the descending order of number of airlines. | CREATE TABLE airlines (country VARCHAR) |
SELECT "Date" FROM table_77970 WHERE "Winning driver" = 'graham hill' AND "Circuit" = 'nürburgring' | What is the date of the circuit of n rburgring, which had Graham Hill as the winning driver? | CREATE TABLE table_77970 (
"Race" text,
"Circuit" text,
"Date" text,
"Pole position" text,
"Fastest lap" text,
"Winning driver" text,
"Constructor" text,
"Tyre" text,
"Report" text
) |
SELECT COUNT(ansi_code) FROM table_18600760_20 WHERE latitude = "48.142938" | How many ansi codes are there for latitude 48.142938? | CREATE TABLE table_18600760_20 (ansi_code VARCHAR, latitude VARCHAR) |
SELECT COUNT(*), country FROM airports GROUP BY country ORDER BY COUNT(*) DESC | How many airports are there per country? Order the countries by decreasing number of airports. | CREATE TABLE airports (country VARCHAR) |
SELECT MIN(react) FROM table_name_62 WHERE country = "sri lanka" AND lane > 8 | What is the lowest of the athlete from sri lanka who has a lane greater than 8? | CREATE TABLE table_name_62 (
react INTEGER,
country VARCHAR,
lane VARCHAR
) |
SELECT township FROM table_18600760_8 WHERE county = "Kidder" | Name the township for kidder | CREATE TABLE table_18600760_8 (township VARCHAR, county VARCHAR) |
SELECT COUNT(*), city FROM airports WHERE country = 'United States' GROUP BY city ORDER BY COUNT(*) DESC | How many airports are there per city in the United States? Order the cities by decreasing number of airports. | CREATE TABLE airports (city VARCHAR, country VARCHAR) |
SELECT "position" FROM table_204_783 WHERE "player" = 'geno hayes' | geno hayes and nick roach both played which position ? | CREATE TABLE table_204_783 (
id number,
"position" text,
"player" text,
"free agency\ntag" text,
"date signed" text,
"2013 team" text
) |
SELECT latitude FROM table_18600760_8 WHERE geo_id = 3810536900 | Name the latitude for 3810536900 | CREATE TABLE table_18600760_8 (latitude VARCHAR, geo_id VARCHAR) |
SELECT city FROM airports WHERE country = 'United States' GROUP BY city HAVING COUNT(*) > 3 | Return the cities with more than 3 airports in the United States. | CREATE TABLE airports (city VARCHAR, country 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, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'HOUSTON... | what flights are there from DALLAS to HOUSTON | CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minu... |
SELECT latitude FROM table_18600760_8 WHERE geo_id = 3809935740 | Name the latitude for 3809935740 | CREATE TABLE table_18600760_8 (latitude VARCHAR, geo_id VARCHAR) |
SELECT COUNT(*) FROM (SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 3) | How many cities are there that have more than 3 airports? | CREATE TABLE airports (city 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, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'WASHINGTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'TOR... | what flights from WASHINGTON to TORONTO | CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airp... |
SELECT COUNT(county) FROM table_18600760_8 WHERE pop__2010_ = 90 | Name the number of county for 90 population | CREATE TABLE table_18600760_8 (county VARCHAR, pop__2010_ VARCHAR) |
SELECT city, COUNT(*) FROM airports GROUP BY city HAVING COUNT(*) > 1 | List the cities which have more than one airport and number of airports. | CREATE TABLE airports (city VARCHAR) |
SELECT ACC_Percent, All_Games_Percent FROM basketball_match GROUP BY All_Neutral | A scatter chart shows the correlation between ACC_Percent and All_Games_Percent , and group by attribute All_Neutral. | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... |
SELECT final__bronze_medal_match FROM table_18602462_21 WHERE quarterfinals = "Houdet ( FRA ) W 6-2, 6-1" | When houdet ( fra ) w 6-2, 6-1 is the quarterfinals what is the final/bronze medal match? | CREATE TABLE table_18602462_21 (final__bronze_medal_match VARCHAR, quarterfinals VARCHAR) |
SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 2 ORDER BY COUNT(*) | List the cities which have more than 2 airports sorted by the number of airports. | CREATE TABLE airports (city VARCHAR) |
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE LOWER(Location) LIKE '%singapore%' OR UPPER(Location) LIKE '%SINGAPORE%' OR Location LIKE '%singapore%' AND Reputation >= 10000 ORDER BY Reputation DESC LIMIT 25 | Top 5 StackOverflowers in Coimbatore. | CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
... |
SELECT round_of_32 FROM table_18602462_21 WHERE round_of_16 = "Did not advance" | When in round of 16 it was did not advance what was it in round of 32? | CREATE TABLE table_18602462_21 (round_of_32 VARCHAR, round_of_16 VARCHAR) |
SELECT COUNT(*), T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name | Find the number of routes for each source airport and the airport name. | CREATE TABLE airports (name VARCHAR, apid VARCHAR); CREATE TABLE routes (src_apid VARCHAR) |
SELECT margin_of_victory FROM table_name_71 WHERE winning_score = –10(69 - 68 - 74 - 67 = 278) | Who were the runner(s)-up when the winning score was 10 (69-68-74-67=278)? | CREATE TABLE table_name_71 (
margin_of_victory VARCHAR,
winning_score VARCHAR
) |
SELECT event FROM table_18602462_21 WHERE final__bronze_medal_match = "Scheffers ( NED ) L 3-6, 1-6" | When scheffers ( ned ) l 3-6, 1-6 is the final/ bronze medal match what was the event? | CREATE TABLE table_18602462_21 (event VARCHAR, final__bronze_medal_match VARCHAR) |
SELECT COUNT(*), T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name ORDER BY COUNT(*) DESC | Find the number of routes and airport name for each source airport, order the results by decreasing number of routes. | CREATE TABLE airports (name VARCHAR, apid VARCHAR); CREATE TABLE routes (src_apid VARCHAR) |
SELECT MIN("Crowd") FROM table_58281 WHERE "Home team" = 'richmond' | What is the lowest crowd with home team richmond? | CREATE TABLE table_58281 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) |
SELECT final__bronze_medal_match FROM table_18602462_21 WHERE event = "Mixed Quad Singles" | When mixed quad singles is the event what is the final/bronze medal match? | CREATE TABLE table_18602462_21 (final__bronze_medal_match VARCHAR, event VARCHAR) |
SELECT AVG(elevation), country FROM airports GROUP BY country | Find the average elevation of all airports for each country. | CREATE TABLE airports (country VARCHAR, elevation INTEGER) |
SELECT "Closed" FROM table_59371 WHERE "Opened" < '1877' AND "Distance from Wellington" = '2.44km' | Opened prior to 1877 only 2.44km from Wellington, when did this station close? | CREATE TABLE table_59371 (
"Station" text,
"Distance from Wellington" text,
"Height above sea level (m)" text,
"Opened" real,
"Closed" text
) |
SELECT quarterfinals FROM table_18602462_21 WHERE athlete = "Bas van Erp" | When bas van erp was the athlete what was the quarterfinals? | CREATE TABLE table_18602462_21 (quarterfinals VARCHAR, athlete VARCHAR) |
SELECT city FROM airports GROUP BY city HAVING COUNT(*) = 2 | Find the cities which have exactly two airports. | CREATE TABLE airports (city VARCHAR) |
SELECT DISTINCT name FROM races WHERE year BETWEEN 2014 AND 2017 | Find the distinct names of all races held between 2014 and 2017? | CREATE TABLE results (
resultid number,
raceid number,
driverid number,
constructorid number,
number number,
grid number,
position number,
positiontext text,
positionorder number,
points number,
laps number,
time text,
milliseconds number,
fastestlap number,
r... |
SELECT semifinals FROM table_18602462_22 WHERE athlete = "Dorrie Timmermans-Van Hall" | What is the semifinal result for Dorrie Timmermans-Van Hall? | CREATE TABLE table_18602462_22 (semifinals VARCHAR, athlete VARCHAR) |
SELECT T1.country, T1.name, COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.country, T1.name | For each country and airline name, how many routes are there? | CREATE TABLE airlines (country VARCHAR, name VARCHAR, alid VARCHAR); CREATE TABLE routes (alid VARCHAR) |
SELECT AVG(percentage) FROM table_name_80 WHERE wins > 0 AND points_against > 481 AND losses = 8 AND points_for > 826 | What is the average Percentage when there are more than 0 wins, Points Against is more than 481, Losses of 8, and a Points For larger than 826? | CREATE TABLE table_name_80 (
percentage INTEGER,
points_for VARCHAR,
losses VARCHAR,
wins VARCHAR,
points_against VARCHAR
) |
SELECT round_of_16 FROM table_18602462_22 WHERE athlete = "Jiske Griffioen Esther Vergeer" | What is the round of 16 result for Jiske Griffioen Esther Vergeer? | CREATE TABLE table_18602462_22 (round_of_16 VARCHAR, athlete VARCHAR) |
SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy' | Find the number of routes with destination airports in Italy. | CREATE TABLE routes (dst_apid VARCHAR); CREATE TABLE airports (apid VARCHAR, country VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.label = "Alveolar-arterial Gradient" | count the number of patients whose lab test name is alveolar-arterial gradient. | 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 round_of_16 FROM table_18602462_22 WHERE semifinals = "Vergeer ( NED ) L 0-6, 1-6" | The semifinal score of vergeer ( ned ) l 0-6, 1-6 follows a round of 16 result of what? | CREATE TABLE table_18602462_22 (round_of_16 VARCHAR, semifinals VARCHAR) |
SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid JOIN airlines AS T3 ON T1.alid = T3.alid WHERE T2.country = 'Italy' AND T3.name = 'American Airlines' | Return the number of routes with destination airport in Italy operated by the airline with name 'American Airlines'. | CREATE TABLE routes (dst_apid VARCHAR, alid VARCHAR); CREATE TABLE airports (apid VARCHAR, country VARCHAR); CREATE TABLE airlines (alid VARCHAR, name VARCHAR) |
SELECT score_in_final FROM table_23197088_4 WHERE championship = "Moscow" | such as are entire the rating of closing where championship is moscow | CREATE TABLE table_23197088_4 (
score_in_final VARCHAR,
championship VARCHAR
) |
SELECT COUNT(round_of_32) FROM table_18602462_22 WHERE round_of_16 = "Polidori ( ITA ) W 6-1, 3-6, 6-3" | How many round of 32 results are followed by Polidori ( Ita ) w 6-1, 3-6, 6-3 in the round of 16? | CREATE TABLE table_18602462_22 (round_of_32 VARCHAR, round_of_16 VARCHAR) |
SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name = 'John F Kennedy International Airport' | Find the number of routes that have destination John F Kennedy International Airport. | CREATE TABLE airports (apid VARCHAR, name VARCHAR); CREATE TABLE routes (dst_apid VARCHAR) |
SELECT player FROM table_name_53 WHERE score = "79" | What player has a score of 79? | CREATE TABLE table_name_53 (
player VARCHAR,
score VARCHAR
) |
SELECT MAX(points) FROM table_18607260_6 WHERE team = "Libertad" | Name the maximum points for libertad | CREATE TABLE table_18607260_6 (points INTEGER, team VARCHAR) |
SELECT COUNT(*) FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'Canada') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States') | Find the number of routes from the United States to Canada. | CREATE TABLE airports (dst_apid VARCHAR, src_apid VARCHAR, apid VARCHAR, country VARCHAR); CREATE TABLE routes (dst_apid VARCHAR, src_apid VARCHAR, apid VARCHAR, country VARCHAR) |
SELECT us_viewers__millions_ FROM table_11230937_2 WHERE no_in_season = 15 | How many millions of viewers watched episode 15? | CREATE TABLE table_11230937_2 (
us_viewers__millions_ VARCHAR,
no_in_season VARCHAR
) |
SELECT MIN(wins) FROM table_18607260_6 WHERE losses = 5 | Name the least wins for 5 losses | CREATE TABLE table_18607260_6 (wins INTEGER, losses VARCHAR) |
SELECT rid FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'United States') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States') | Find the id of routes whose source and destination airports are in the United States. | CREATE TABLE routes (rid VARCHAR, dst_apid VARCHAR, src_apid VARCHAR, apid VARCHAR, country VARCHAR); CREATE TABLE airports (rid VARCHAR, dst_apid VARCHAR, src_apid VARCHAR, apid VARCHAR, country VARCHAR) |
SELECT COUNT("Round") FROM table_9648 WHERE "Time" = 'n/a' AND "Location" = 'canton, ohio, usa' | What is the total number of Round(s), when Time is 'n/a', and when Location is 'Canton, Ohio, USA'? | CREATE TABLE table_9648 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Round" real,
"Time" text,
"Location" text
) |
SELECT MAX(draws) FROM table_18607260_6 | Name the most draws | CREATE TABLE table_18607260_6 (draws INTEGER) |
SELECT T1.name FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1 | Find the name of airline which runs the most number of routes. | CREATE TABLE airlines (name VARCHAR, alid VARCHAR); CREATE TABLE routes (alid VARCHAR) |
SELECT "Call sign" FROM table_8648 WHERE "Branding" = '106.9 the x' | What is the Call sign of the Frequency 106.9 the X? | CREATE TABLE table_8648 (
"Frequency" text,
"Call sign" text,
"Branding" text,
"Format" text,
"Owner" text
) |
SELECT MIN(played) FROM table_18607260_6 | Name the least played | CREATE TABLE table_18607260_6 (played INTEGER) |
SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1 | Find the busiest source airport that runs most number of routes in China. | CREATE TABLE routes (src_apid VARCHAR); CREATE TABLE airports (name VARCHAR, apid VARCHAR, country VARCHAR) |
SELECT name FROM table_24302700_6 WHERE nationality = "United States" | Who are all the players from the united states? | CREATE TABLE table_24302700_6 (
name VARCHAR,
nationality VARCHAR
) |
SELECT geographical_regions FROM table_18618707_1 WHERE contestant = "Cristina Peña Garzon" | When cristina peña garzon is the contestant what is the geographical region? | CREATE TABLE table_18618707_1 (geographical_regions VARCHAR, contestant VARCHAR) |
SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1 | Find the busiest destination airport that runs most number of routes in China. | CREATE TABLE routes (dst_apid VARCHAR); CREATE TABLE airports (name VARCHAR, apid VARCHAR, country VARCHAR) |
SELECT MAX("Gold") FROM table_7056 WHERE "Total" < '3' AND "Rank" = '5' AND "Silver" > '1' | What is the largest gold number when the total is less than 3, the rank is 5, and the silver is more than 1? | CREATE TABLE table_7056 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) |
SELECT geographical_regions FROM table_18618707_1 WHERE height = "1.79" | When 1.79 is the height what is the geographical region? | CREATE TABLE table_18618707_1 (geographical_regions VARCHAR, height VARCHAR) |
SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1 | What is the id of the most recent order? | CREATE TABLE orders (order_id VARCHAR, date_order_placed VARCHAR) |
SELECT year, SUM(COUNT(*)) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' ORDER BY year DESC | For each year, bin the year into day of the week interval, and return the total number of times the team Boston Red Stockings won in the postseasons using a line chart, order X-axis from high to low order. | CREATE TABLE player (
player_id TEXT,
birth_year NUMERIC,
birth_month NUMERIC,
birth_day NUMERIC,
birth_country TEXT,
birth_state TEXT,
birth_city TEXT,
death_year NUMERIC,
death_month NUMERIC,
death_day NUMERIC,
death_country TEXT,
death_state TEXT,
death_city TEXT,
... |
SELECT COUNT(contestant) FROM table_18618707_1 WHERE height = "1.67" | When 1.67 is the height how many contestants are there? | CREATE TABLE table_18618707_1 (contestant VARCHAR, height VARCHAR) |
SELECT order_id, customer_id FROM orders ORDER BY date_order_placed LIMIT 1 | what are the order id and customer id of the oldest order? | CREATE TABLE orders (order_id VARCHAR, customer_id VARCHAR, date_order_placed VARCHAR) |
SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(SALARY) DESC | For those employees who did not have any job in the past, draw a bar chart about the distribution of hire_date and the sum of salary bin hire_date by weekday, and could you display from high to low by the y-axis? | 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 jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decima... |
SELECT contestant FROM table_18618707_1 WHERE height = "1.80" AND geographical_regions = "El Cibao" | When el cibao is the geographical region and the height is 1.80 who is the contestant? | CREATE TABLE table_18618707_1 (contestant VARCHAR, height VARCHAR, geographical_regions VARCHAR) |
SELECT order_id FROM shipments WHERE shipment_tracking_number = "3452" | Find the id of the order whose shipment tracking number is "3452". | CREATE TABLE shipments (order_id VARCHAR, shipment_tracking_number VARCHAR) |
SELECT name, COUNT(name) FROM constructors AS T1 JOIN constructorStandings AS T2 ON T1.constructorId = T2.constructorId WHERE T1.nationality = "Japanese" AND T2.points > 5 GROUP BY name ORDER BY name | Find the names of Japanese constructors that have once earned more than 5 points, and count them by a bar chart, I want to rank by the x-axis in ascending. | CREATE TABLE drivers (
driverId INTEGER,
driverRef TEXT,
number TEXT,
code TEXT,
forename TEXT,
surname TEXT,
dob TEXT,
nationality TEXT,
url TEXT
)
CREATE TABLE results (
resultId INTEGER,
raceId INTEGER,
driverId INTEGER,
constructorId INTEGER,
number INTEGER,
... |
SELECT COUNT(height) FROM table_18618707_1 WHERE hometown = "Toronto" | When toronto is the hometown how many height measurements are there? | CREATE TABLE table_18618707_1 (height VARCHAR, hometown VARCHAR) |
SELECT order_item_id FROM order_items WHERE product_id = 11 | Find the ids of all the order items whose product id is 11. | CREATE TABLE order_items (order_item_id VARCHAR, product_id VARCHAR) |
SELECT "Home (1st leg)" FROM table_19178 WHERE "Home (2nd leg)" = 'Temperley' | When temperley is the home (2nd leg) what is the home (1st leg)? | CREATE TABLE table_19178 (
"Home (1st leg)" text,
"Home (2nd leg)" text,
"1st Leg" text,
"2nd leg" text,
"Aggregate" text
) |
SELECT 3 AS rd_place_team FROM table_18618672_2 WHERE year = 1955 | What is the 3rd place team for the year of 1955? | CREATE TABLE table_18618672_2 (year VARCHAR) |
SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Packing" | List the name of all the distinct customers who have orders with status "Packing". | CREATE TABLE orders (customer_id VARCHAR, order_status VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR) |
SELECT "Score" FROM table_40721 WHERE "Set 1" = '23–25' | What was the overall score when set 1 was 23 25? | CREATE TABLE table_40721 (
"Date" text,
"Time" text,
"Score" text,
"Set 1" text,
"Set 2" text,
"Set 3" text,
"Total" text,
"Report" text
) |
SELECT sanskrit AS gloss FROM table_186462_1 WHERE western_name = "Sagittarius" | When Sagittarius is the wester name what is the sanskrit gloss? | CREATE TABLE table_186462_1 (sanskrit VARCHAR, western_name VARCHAR) |
SELECT DISTINCT T1.customer_details FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "On Road" | Find the details of all the distinct customers who have orders with status "On Road". | CREATE TABLE orders (customer_id VARCHAR, order_status VARCHAR); CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR) |
SELECT COUNT(*) > 0 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'ac posthemorrhag anemia') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 5364) AND DATETIME(diagnoses_... | had patient 5364 been diagnosed this year with ac posthemorrhag anemia? | CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
... |
SELECT COUNT(western_name) FROM table_186462_1 WHERE sanskrit = "धनुष" | When धनुष is the sankrit how many western names are there? | CREATE TABLE table_186462_1 (western_name VARCHAR, sanskrit VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.