aherntech/spider-syn huggingface dataset:
Database: flight_4
Question: Which countries has the most number of airlines whose active status is 'Y'?
Paraphrased question: Which nations has the most number of airlines whose active status is 'Y'?
SQL: SELECT country FROM airlines WHERE active  =  'Y' GROUP BY country ORDER BY count(*) DESC LIMIT 1
Database: flight_4
Question: What are the countries with the most airlines whose active status is Y?
Paraphrased question: What are the nations with the most airlines whose active status is Y?
SQL: SELECT country FROM airlines WHERE active  =  'Y' GROUP BY country ORDER BY count(*) DESC LIMIT 1
Database: flight_4
Question: List all countries and their number of airlines in the descending order of number of airlines.
Paraphrased question: List all nations and their number of airlines in the descending order of number of airlines.
SQL: SELECT country ,  count(*) FROM airlines GROUP BY country ORDER BY count(*) DESC
Database: flight_4
Question: How many airlines operate out of each country in descending order?
Paraphrased question: How many airlines operate out of each nation in descending order?
SQL: SELECT country ,  count(*) FROM airlines GROUP BY country ORDER BY count(*) DESC
Database: flight_4
Question: How many airports are there per country? Order the countries by decreasing number of airports.
Paraphrased question: How many aerodromes are there per nation? Order the nations by decreasing number of aerodromes.
SQL: SELECT count(*) ,  country FROM airports GROUP BY country ORDER BY count(*) DESC
Database: flight_4
Question: What is the number of airports per country, ordered from most to least?
Paraphrased question: What is the number of aerodromes per nation, ordered from most to least?
SQL: SELECT count(*) ,  country FROM airports GROUP BY country ORDER BY count(*) DESC
Database: flight_4
Question: How many airports are there per city in the United States? Order the cities by decreasing number of airports.
Paraphrased question: How many aerodromes are there per city in the United States? Order the cities by decreasing number of aerodromes.
SQL: SELECT count(*) ,  city FROM airports WHERE country  =  'United States' GROUP BY city ORDER BY count(*) DESC
Database: flight_4
Question: How many airports are there per city in the US ordered from most to least?
Paraphrased question: How many aerodromes are there per city in the US ordered from most to least?
SQL: SELECT count(*) ,  city FROM airports WHERE country  =  'United States' GROUP BY city ORDER BY count(*) DESC
Database: flight_4
Question: Return the cities with more than 3 airports in the United States.
Paraphrased question: Return the cities with more than 3 aerodromes in the United States.
SQL: SELECT city FROM airports WHERE country  =  'United States' GROUP BY city HAVING count(*)  >  3
Database: flight_4
Question: What is the number of cities in the United States with more than 3 airports?
Paraphrased question: What is the number of cities in the United States with more than 3 aerodromes?
SQL: SELECT city FROM airports WHERE country  =  'United States' GROUP BY city HAVING count(*)  >  3
Database: flight_4
Question: How many cities are there that have more than 3 airports?
Paraphrased question: How many cities are there that have more than 3 aerodromes?
SQL: SELECT count(*) FROM (SELECT city FROM airports GROUP BY city HAVING count(*)  >  3)
Database: flight_4
Question: What is the count of cities with more than 3 airports?
Paraphrased question: What is the count of cities with more than 3 aerodromes?
SQL: SELECT count(*) FROM (SELECT city FROM airports GROUP BY city HAVING count(*)  >  3)
Database: flight_4
Question: List the cities which have more than one airport and number of airports.
Paraphrased question: List the cities which have more than one aerodrome and number of aerodromes.
SQL: SELECT city ,  count(*) FROM airports GROUP BY city HAVING count(*)  >  1
Database: flight_4
Question: What are the names of all cities with more than one airport and how many airports do they have?
Paraphrased question: What are the names of all cities with more than one aerodrome and how many aerodromes do they have?
SQL: SELECT city ,  count(*) FROM airports GROUP BY city HAVING count(*)  >  1
Database: flight_4
Question: List the cities which have more than 2 airports sorted by the number of airports.
Paraphrased question: List the cities which have more than 2 aerodromes sorted by the number of aerodromes.
SQL: SELECT city FROM airports GROUP BY city HAVING count(*)  >  2 ORDER BY count(*)
Database: flight_4
Question: What are the cities that have more than 2 airports sorted by number of airports?
Paraphrased question: What are the cities that have more than 2 aerodromes sorted by number of aerodromes?
SQL: SELECT city FROM airports GROUP BY city HAVING count(*)  >  2 ORDER BY count(*)
Database: flight_4
Question: Find the number of routes for each source airport and the airport name.
Paraphrased question: Find the number of routes for each source aerodrome and the aerodrome name.
SQL: SELECT count(*) ,  T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.src_apid GROUP BY T1.name
Database: flight_4
Question: For each airport name, how many routes start at that airport?
Paraphrased question: For each aerodrome name, how many routes start at that aerodrome?
SQL: SELECT count(*) ,  T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.src_apid GROUP BY T1.name
Database: flight_4
Question: Find the number of routes and airport name for each source airport, order the results by decreasing number of routes.
Paraphrased question: Find the number of paths and aerodrome name for each source aerodrome, order the results by decreasing number of paths.
SQL: 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
Database: flight_4
Question: For each  airport name, how many routes start at that airport, ordered from most to least?
Paraphrased question: For each aerodrome name, how many paths start at that aerodrome, ordered from most to least?
SQL: 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
Database: flight_4
Question: Find the average elevation of all airports for each country.
Paraphrased question: Find the average altitude of all aerodromes for each nation
SQL: SELECT avg(elevation) ,  country FROM airports GROUP BY country
Database: flight_4
Question: For each country, what is the average elevation of that country's airports?
Paraphrased question: For each nation, what is the average altitude of that nation's aerodromes?
SQL: SELECT avg(elevation) ,  country FROM airports GROUP BY country
Database: flight_4
Question: Find the cities which have exactly two airports.
Paraphrased question: Find the cities which have exactly two aerodromes.
SQL: SELECT city FROM airports GROUP BY city HAVING count(*)  =  2
Database: flight_4
Question: What are the cities with exactly two airports?
Paraphrased question: What are the cities with exactly two aerodromes?
SQL: SELECT city FROM airports GROUP BY city HAVING count(*)  =  2
Database: flight_4
Question: For each country and airline name, how many routes are there?
Paraphrased question: For each nation and airline name, how many routes are there?
SQL: 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
Database: flight_4
Question: What is the total number of routes for each country and airline in that country?
Paraphrased question: What is the total number of routes for each nation and airline in that nation?
SQL: 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
Database: flight_4
Question: Find the number of routes with destination airports in Italy.
Paraphrased question: Find the number of routes with terminal aerodromes in Italy.
SQL: SELECT count(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid  =  T2.apid WHERE T2.country  =  'Italy'
Database: flight_4
Question: What is the number of routes whose destinations are Italian airports?
Paraphrased question: What is the number of routes whose destinations are Italian aerodromes?
SQL: SELECT count(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid  =  T2.apid WHERE T2.country  =  'Italy'
Database: flight_4
Question: Return the number of routes with destination airport in Italy operated by the airline with name 'American Airlines'.
Paraphrased question: Return the number of routes with terminal aerodrome in Italy operated by the airline with name 'American Airlines'.
SQL: 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'
Database: flight_4
Question: What is the number of routes operated by the airline American Airlines whose destinations are in Italy?
Paraphrased question: What is the number of routes operated by the airline American Airlines whose destinations are in Italy?
SQL: 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'
Database: flight_4
Question: Find the number of routes that have destination John F Kennedy International Airport.
Paraphrased question: Find the number of routes that have terminal John F Kennedy International Airport.
SQL: SELECT count(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.dst_apid WHERE T1.name  =  'John F Kennedy International Airport'
Database: flight_4
Question: What is the number of routes that end at John F Kennedy International Airport?
Paraphrased question: What is the number of routes that end at John F Kennedy International Airport?
SQL: SELECT count(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.dst_apid WHERE T1.name  =  'John F Kennedy International Airport'
Database: flight_4
Question: Find the number of routes from the United States to Canada.
Paraphrased question: Find the number of paths from the United States to Canada.
SQL: 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')
Database: flight_4
Question: How many routes go from the United States to Canada?
Paraphrased question: How many paths go from the United States to Canada?
SQL: 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')
Database: flight_4
Question: Find the id of routes whose source and destination airports are in the United States.
Paraphrased question: Find the id of paths whose source and terminal aerodromes are in the United States.
SQL: 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')
Database: flight_4
Question: What is the id of the routes whose source and destination airports are in the United States?
Paraphrased question: What is the id of the paths whose source and terminal aerodromes are in the United States?
SQL: 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')
Database: flight_4
Question: Find the name of airline which runs the most number of routes.
Paraphrased question: Find the name of airline which runs the most number of routes.
SQL: 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
Database: flight_4
Question: What is the name of the airline with the most routes?
Paraphrased question: What is the name of the airline with the most routes?
SQL: 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
Database: flight_4
Question: Find the busiest source airport that runs most number of routes in China.
Paraphrased question: Find the busiest source aerodrome that runs most number of routes in China.
SQL: 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
Database: flight_4
Question: What is the name of the airport with the most number of routes that start in China?
Paraphrased question: What is the name of the aerodrome with the most number of routes that start in China?
SQL: 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
Database: flight_4
Question: Find the busiest destination airport that runs most number of routes in China.
Paraphrased question: Find the busiest terminal aerodrome that runs most number of routes in China.
SQL: 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
Database: flight_4
Question: What is the name of the airport that is the destination of the most number of routes that start in China?
Paraphrased question: What is the name of the aerodrome that is the terminal of the most number of routes that start in China?
SQL: 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
Database: tracking_orders
Question: What is the id of the most recent order?
Paraphrased question: What is the id of the most recent order?
SQL: SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1
Database: tracking_orders
Question: Find the id of the order made most recently.
Paraphrased question: Find the id of the order made most recently.
SQL: SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1
Database: tracking_orders
Question: what are the order id and customer id of the oldest order?
Paraphrased question: what are the order id and client id of the oldest order?
SQL: SELECT order_id ,  customer_id FROM orders ORDER BY date_order_placed LIMIT 1
Database: tracking_orders
Question: Find the order id and customer id associated with the oldest order.
Paraphrased question: Find the order id and client id associated with the oldest order.
SQL: SELECT order_id ,  customer_id FROM orders ORDER BY date_order_placed LIMIT 1
Database: tracking_orders
Question: Find the id of the order whose shipment tracking number is "3452".
Paraphrased question: Find the id of the order whose shipment tracking number is "3452".
SQL: SELECT order_id FROM shipments WHERE shipment_tracking_number = "3452"
Database: tracking_orders
Question: Which order's shipment tracking number is "3452"? Give me the id of the order.
Paraphrased question: Which order's shipment tracking number is "3452"? Give me the id of the order.
SQL: SELECT order_id FROM shipments WHERE shipment_tracking_number = "3452"
Database: tracking_orders
Question: Find the ids of all the order items whose product id is 11.
Paraphrased question: Find the ids of all the order items whose goods id is 11.
SQL: SELECT order_item_id FROM order_items WHERE product_id = 11
Database: tracking_orders
Question: Find all the order items whose product id is 11. What are the order item ids?
Paraphrased question: Find all the order items whose goods id is 11. What are the order item ids?
SQL: SELECT order_item_id FROM order_items WHERE product_id = 11
Database: tracking_orders
Question: List the name of all the distinct customers who have orders with status "Packing".
Paraphrased question: List the name of all the different clients who have orders with status "Packing".
SQL: 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"
Database: tracking_orders
Question: Which customers have orders with status "Packing"? Give me the customer names.
Paraphrased question: Which clients have orders with status "Packing"? Give me the client names.
SQL: 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"
Database: tracking_orders
Question: Find the details of all the distinct customers who have orders with status "On Road".
Paraphrased question: Find the information of all the different clients who have orders with status "On Road".
SQL: 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"
Database: tracking_orders
Question: What are the distinct customers who have orders with status "On Road"? Give me the customer details?
Paraphrased question: What are the different clients who have orders with status "On Road"? Give me the client information?
SQL: 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"
Database: tracking_orders
Question: What is the name of the customer who has the most orders?
Paraphrased question: What is the name of the client who has the most orders?
SQL: SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1
Database: tracking_orders
Question: Which customer made the most orders? Find the customer name.
Paraphrased question: Which client made the most orders? Find the client name.
SQL: SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1
Database: tracking_orders
Question: What is the customer id of the customer who has the most orders?
Paraphrased question: What is the client id of the client who has the most orders?
SQL: SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1
Database: tracking_orders
Question: Find the id of the customer who made the most orders.
Paraphrased question: Find the id of the client who made the most orders.
SQL: SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1
Database: tracking_orders
Question: Give me a list of id and status of orders which belong to the customer named "Jeramie".
Paraphrased question: Give me a list of id and status of orders which belong to the client named "Jeramie".
SQL: SELECT T2.order_id ,  T2.order_status FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = "Jeramie"
Database: tracking_orders
Question: Which orders are made by the customer named "Jeramie"? Give me the order ids and status.
Paraphrased question: Which orders are made by the client named "Jeramie"? Give me the order ids and status.
SQL: SELECT T2.order_id ,  T2.order_status FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = "Jeramie"
Database: tracking_orders
Question: Find the dates of orders which belong to the customer named "Jeramie".
Paraphrased question: Find the day of orders which belong to the client named "Jeramie".
SQL: SELECT T2.date_order_placed FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = "Jeramie"
Database: tracking_orders
Question: What are the dates of the orders made by the customer named "Jeramie"?
Paraphrased question: What are the day of the orders made by the client named "Jeramie"?
SQL: SELECT T2.date_order_placed FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = "Jeramie"
Database: tracking_orders
Question: Give me the names of customers who have placed orders between 2009-01-01 and 2010-01-01.
Paraphrased question: Give me the names of clients who have placed orders between 2009-01-01 and 2010-01-01.
SQL: SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.date_order_placed >= "2009-01-01" AND T2.date_order_placed <= "2010-01-01"
Database: tracking_orders
Question: Which customers made orders between 2009-01-01 and 2010-01-01? Find their names.
Paraphrased question: Which clients made orders between 2009-01-01 and 2010-01-01? Find their names.
SQL: SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.date_order_placed >= "2009-01-01" AND T2.date_order_placed <= "2010-01-01"
Database: tracking_orders
Question: Give me a list of distinct product ids from orders placed between 1975-01-01 and 1976-01-01?
Paraphrased question: Give me a list of different goods ids from orders placed between 1975-01-01 and 1976-01-01?
SQL: SELECT DISTINCT T2.product_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id WHERE T1.date_order_placed >= "1975-01-01" AND T1.date_order_placed <= "1976-01-01"
Database: tracking_orders
Question: What are the distinct ids of products ordered between 1975-01-01 and 1976-01-01??
Paraphrased question: What are the different ids of goods ordered between 1975-01-01 and 1976-01-01??
SQL: SELECT DISTINCT T2.product_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id WHERE T1.date_order_placed >= "1975-01-01" AND T1.date_order_placed <= "1976-01-01"
Database: tracking_orders
Question: Find the names of the customers who have order status both "On Road" and "Shipped".
Paraphrased question: Find the names of the clients who have order status both "On Road" and "Shipped".
SQL: SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "On Road" INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Shipped"
Database: tracking_orders
Question: Which customers have both "On Road" and "Shipped" as order status? List the customer names.
Paraphrased question: Which clients have both "On Road" and "Shipped" as order status? List the client names.
SQL: SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "On Road" INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Shipped"
Database: tracking_orders
Question: Find the id of the customers who have order status both "On Road" and "Shipped".
Paraphrased question: Find the id of the clients who have order status both "On Road" and "Shipped".
SQL: SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "On Road" INTERSECT SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Shipped"
Database: tracking_orders
Question: Which customers have both "On Road" and "Shipped" as order status? List the customer ids.
Paraphrased question: Which clients have both "On Road" and "Shipped" as order status? List the client ids.
SQL: SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "On Road" INTERSECT SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Shipped"
Database: tracking_orders
Question: When was the order placed whose shipment tracking number is 3452? Give me the date.
Paraphrased question: When was the order placed whose shipment tracking number is 3452? Give me the day.
SQL: SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.shipment_tracking_number = 3452
Database: tracking_orders
Question: On which day was the order placed whose shipment tracking number is 3452?
Paraphrased question: On which day was the order placed whose shipment tracking number is 3452?
SQL: SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.shipment_tracking_number = 3452
Database: tracking_orders
Question: What is the placement date of the order whose invoice number is 10?
Paraphrased question: What is the placement day of the order whose invoice number is 10?
SQL: SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.invoice_number = 10
Database: tracking_orders
Question: On what day was the order with invoice number 10 placed?
Paraphrased question: On what day was the order with invoice number 10 placed?
SQL: SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.invoice_number = 10
Database: tracking_orders
Question: List the count and id of each product in all the orders.
Paraphrased question: List the count and id of each goods in all the orders.
SQL: SELECT count(*) ,  T3.product_id FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id
Database: tracking_orders
Question: For each product, return its id and the number of times it was ordered.
Paraphrased question: For each goods, return its id and the number of times it was ordered.
SQL: SELECT count(*) ,  T3.product_id FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id
Database: tracking_orders
Question: List the name and count of each product in all orders.
Paraphrased question: List the name and count of each goods in all orders.
SQL: SELECT T3.product_name ,  count(*) FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id
Database: tracking_orders
Question: For each product, show its name and the number of times it was ordered.
Paraphrased question: For each goods, show its name and the number of times it was ordered.
SQL: SELECT T3.product_name ,  count(*) FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id
Database: tracking_orders
Question: Find the ids of orders which are shipped after 2000-01-01.
Paraphrased question: Find the ids of orders which are shipped after 2000-01-01.
SQL: SELECT order_id FROM shipments WHERE shipment_date > "2000-01-01"
Database: tracking_orders
Question: Which orders have shipment after 2000-01-01? Give me the order ids.
Paraphrased question: Which orders have shipment after 2000-01-01? Give me the order ids.
SQL: SELECT order_id FROM shipments WHERE shipment_date > "2000-01-01"
Database: tracking_orders
Question: Find the id of the order which is shipped most recently.
Paraphrased question: Find the id of the order which is shipped most recently.
SQL: SELECT order_id FROM shipments WHERE shipment_date  =  (SELECT max(shipment_date) FROM shipments)
Database: tracking_orders
Question: Which order has the most recent shipment? Give me the order id.
Paraphrased question: Which order has the most recent shipment? Give me the order id.
SQL: SELECT order_id FROM shipments WHERE shipment_date  =  (SELECT max(shipment_date) FROM shipments)
Database: tracking_orders
Question: List the names of all distinct products in alphabetical order.
Paraphrased question: List the names of all different goods in alphabetical order.
SQL: SELECT DISTINCT product_name FROM products ORDER BY product_name
Database: tracking_orders
Question: Sort all the distinct products in alphabetical order.
Paraphrased question: Sort all the different goods in alphabetical order.
SQL: SELECT DISTINCT product_name FROM products ORDER BY product_name
Database: tracking_orders
Question: List the ids of all distinct orders ordered by placed date.
Paraphrased question: List the ids of all different orders ordered by placed day.
SQL: SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed
Database: tracking_orders
Question: What are ids of the all distinct orders, sorted by placement date?
Paraphrased question: What are ids of the all different orders, sorted by placement day?
SQL: SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed
Database: tracking_orders
Question: What is the id of the order which has the most items?
Paraphrased question: What is the id of the order which has the most items?
SQL: SELECT T1.order_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id ORDER BY count(*) DESC LIMIT 1
Database: tracking_orders
Question: Which order deals with the most items? Return the order id.
Paraphrased question: Which order deals with the most items? Return the order id.
SQL: SELECT T1.order_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id ORDER BY count(*) DESC LIMIT 1
Database: tracking_orders
Question: What is the name of the customer who has the largest number of orders?
Paraphrased question: What is the name of the client who has the largest number of orders?
SQL: SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1
Database: tracking_orders
Question: Find the name of the customer who made the most orders.
Paraphrased question: Find the name of the client who made the most orders.
SQL: SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1
Database: tracking_orders
Question: Find the invoice numbers which are created before 1989-09-03 or after 2007-12-25.
Paraphrased question: Find the invoice numbers which are created before 1989-09-03 or after 2007-12-25.
SQL: SELECT invoice_number FROM invoices WHERE invoice_date < "1989-09-03" OR invoice_date > "2007-12-25"
Database: tracking_orders
Question: What are the invoice numbers created before 1989-09-03 or after 2007-12-25?
Paraphrased question: What are the invoice numbers created before 1989-09-03 or after 2007-12-25?
SQL: SELECT invoice_number FROM invoices WHERE invoice_date < "1989-09-03" OR invoice_date > "2007-12-25"
Database: tracking_orders
Question: Find the distinct details of invoices which are created before 1989-09-03 or after 2007-12-25.
Paraphrased question: Find the different information of invoices which are created before 1989-09-03 or after 2007-12-25.
SQL: SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < "1989-09-03" OR invoice_date > "2007-12-25"
Database: tracking_orders
Question: What are the distinct details of invoices created before 1989-09-03 or after 2007-12-25?
Paraphrased question: What are the different information of invoices created before 1989-09-03 or after 2007-12-25?
SQL: SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < "1989-09-03" OR invoice_date > "2007-12-25"
Database: tracking_orders
Question: For each customer who has at least two orders, find the customer name and number of orders made.
Paraphrased question: For each client who has at least two orders, find the client name and number of orders made.
SQL: SELECT T2.customer_name ,  count(*) FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING count(*)  >=  2
Database: tracking_orders
Question: Which customers have made at least two orders? Give me each customer name and number of orders made.
Paraphrased question: Which clients have made at least two orders? Give me each client name and number of orders made.
SQL: SELECT T2.customer_name ,  count(*) FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING count(*)  >=  2
Database: tracking_orders
Question: Find the name of the customers who have at most two orders.
Paraphrased question: Find the name of the clients who have at most two orders.
SQL: SELECT T2.customer_name FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING count(*)  <=  2
Database: tracking_orders
Question: What are the names of the customers who have made two or less orders?
Paraphrased question: What are the names of the clients who have made two or less orders?
SQL: SELECT T2.customer_name FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING count(*)  <=  2
Database: tracking_orders
Question: List the names of the customers who have once bought product "food".
Paraphrased question: List the names of the clients who have once bought product "food".
SQL: SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T4.product_name = "food" GROUP BY T1.customer_id HAVING count(*)  >=  1
Database: tracking_orders
Question: What are the names of the customers who bought product "food" at least once?
Paraphrased question: What are the names of the clients who bought product "food" at least once?
SQL: SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T4.product_name = "food" GROUP BY T1.customer_id HAVING count(*)  >=  1
Database: tracking_orders
Question: List the names of customers who have once canceled the purchase of the product "food" (the item status is "Cancel").
Paraphrased question: List the names of clients who have once canceled the purchase of the product "food" (the item status is "Cancel").
SQL: SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T3.order_item_status = "Cancel" AND T4.product_name = "food" GROUP BY T1.customer_id HAVING count(*)  >=  1
Database: tracking_orders
Question: Which customers have ever canceled the purchase of the product "food" (the item status is "Cancel")?
Paraphrased question: Which clients have ever canceled the purchase of the product "food" (the item status is "Cancel")?
SQL: SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T3.order_item_status = "Cancel" AND T4.product_name = "food" GROUP BY T1.customer_id HAVING count(*)  >=  1
Database: architecture
Question: How many architects are female?
Paraphrased question: count the number of female architectural designers?
SQL: SELECT count(*) FROM architect WHERE gender  =  'female'
Database: architecture
Question: List the name, nationality and id of all male architects ordered by their names lexicographically.
Paraphrased question: List the name, nation and id of all male architects ordered by their names lexicographically.
SQL: SELECT name ,  nationality ,  id FROM architect WHERE gender  =  'male' ORDER BY name
Database: architecture
Question: What is the maximum length in meters for the bridges and what are the architects' names?
Paraphrased question: What is the maximum length in meters for the bridges and what are the architects' names?
SQL: SELECT max(T1.length_meters) ,  T2.name FROM bridge AS T1 JOIN architect AS T2 ON T1.architect_id  =  T2.id
Database: architecture
Question: What is the average length in feet of the bridges?
Paraphrased question: What is the average length in feet of the bridges?
SQL: SELECT avg(length_feet) FROM bridge
Database: architecture
Question: What are the names and year of construction for the mills of 'Grondzeiler' type?
Paraphrased question: What are the names and year of construction for the mills of 'Grondzeiler' type?
SQL: SELECT name ,  built_year FROM mill WHERE TYPE  =  'Grondzeiler'
Database: architecture
Question: What are the distinct names and nationalities of the architects who have ever built a mill?
Paraphrased question: What are the different names and nations of the architects who have ever built a mill?
SQL: SELECT DISTINCT T1.name ,  T1.nationality FROM architect AS T1 JOIN mill AS t2 ON T1.id  =  T2.architect_id
Database: architecture
Question: What are the names of the mills which are not located in 'Donceel'?
Paraphrased question: What are the names of the mills which are not located in 'Donceel'?
SQL: SELECT name FROM mill WHERE LOCATION != 'Donceel'
Database: architecture
Question: What are the distinct types of mills that are built by American or Canadian architects?
Paraphrased question: What are the different categories of mills that are built by American or Canadian architects?
SQL: SELECT DISTINCT T1.type FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id  =  T2.id WHERE T2.nationality  =  'American' OR T2.nationality  =  'Canadian'
Database: architecture
Question: What are the ids and names of the architects who built at least 3 bridges ?
Paraphrased question: What are the ids and names of the architects who built at least 3 bridges ?
SQL: SELECT T1.id ,  T1.name FROM architect AS T1 JOIN bridge AS T2 ON T1.id  =  T2.architect_id GROUP BY T1.id HAVING count(*)  >=  3
Database: architecture
Question: What is the id, name and nationality of the architect who built most mills?
Paraphrased question: What is the id, name and nation of the architect who built most mills?
SQL: SELECT T1.id ,  T1.name ,  T1.nationality FROM architect AS T1 JOIN mill AS T2 ON T1.id  =  T2.architect_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1
Database: architecture
Question: What are the ids, names and genders of the architects who built two bridges or one mill?
Paraphrased question: What are the ids, names and sex of the architects who built two bridges or one mill?
SQL: SELECT T1.id ,  T1.name ,  T1.gender FROM architect AS T1 JOIN bridge AS T2 ON T1.id  =  T2.architect_id GROUP BY T1.id HAVING count(*)  =  2 UNION SELECT T1.id ,  T1.name ,  T1.gender FROM architect AS T1 JOIN mill AS T2 ON T1.id  =  T2.architect_id GROUP BY T1.id HAVING count(*)  =  1
Database: architecture
Question: What is the location of the bridge named 'Kolob Arch' or 'Rainbow Bridge'?
Paraphrased question: What is the position of the bridge named 'Kolob Arch' or 'Rainbow Bridge'?
SQL: SELECT LOCATION FROM bridge WHERE name  =  'Kolob Arch' OR name  =  'Rainbow Bridge'
Database: architecture
Question: Which of the mill names contains the french word 'Moulin'?
Paraphrased question: Which of the mill names contains the french word 'Moulin'?
SQL: SELECT name FROM mill WHERE name LIKE '%Moulin%'
Database: architecture
Question: What are the distinct name of the mills built by the architects who have also built a bridge longer than 80 meters?
Paraphrased question: What are the different name of the mills built by the architects who have also built a bridge longer than 80 meters?
SQL: SELECT DISTINCT T1.name FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id  =  T2.id JOIN bridge AS T3 ON T3.architect_id  =  T2.id WHERE T3.length_meters  >  80
Database: architecture
Question: What is the most common mill type, and how many are there?
Paraphrased question: What is the most common mill category, and how many are there?
SQL: SELECT TYPE ,  count(*) FROM mill GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1
Database: architecture
Question: How many architects haven't built a mill before year 1850?
Paraphrased question: How many architects haven't built a mill before year 1850?
SQL: SELECT count(*) FROM architect WHERE id NOT IN ( SELECT architect_id FROM mill WHERE built_year  <  1850 );
Database: architecture
Question: show the name of all bridges that was designed by american archtect, and sort the result by the bridge feet length.
Paraphrased question: show the name of all bridges that was designed by american archtect, and sort the result by the bridge feet length.
SQL: SELECT t1.name FROM bridge AS t1 JOIN architect AS t2 ON t1.architect_id  =  t2.id WHERE t2.nationality  =  'American' ORDER BY t1.length_feet
Database: culture_company
Question: How many book clubs are there?
Paraphrased question: How many book clubs are there?
SQL: SELECT count(*) FROM book_club
Database: culture_company
Question: Count the number of book clubs.
Paraphrased question: Count the number of book clubs.
SQL: SELECT count(*) FROM book_club
Database: culture_company
Question: show the titles, and authors or editors for all books made after the year 1989.
Paraphrased question: show the names, and writers or editors for all books made after the year 1989.
SQL: SELECT book_title ,  author_or_editor FROM book_club WHERE YEAR  >  1989
Database: culture_company
Question: What are the titles and authors or editors that correspond to books made after 1989?
Paraphrased question: What are the names and writers or editors that correspond to books made after 1989?
SQL: SELECT book_title ,  author_or_editor FROM book_club WHERE YEAR  >  1989
Database: culture_company
Question: Show all distinct publishers for books.
Paraphrased question: Show all different publishers for books.
SQL: SELECT DISTINCT publisher FROM book_club
Database: culture_company
Question: What are all the different book publishers?
Paraphrased question: What are all the different book publishers?
SQL: SELECT DISTINCT publisher FROM book_club
Database: culture_company
Question: Show the years, book titles, and publishers for all books, in descending order by year.
Paraphrased question: Show the years, book names, and publishers for all books, in descending order by year.
SQL: SELECT YEAR ,  book_title ,  publisher FROM book_club ORDER BY YEAR DESC
Database: culture_company
Question: What are the years, titles, and publishers for all books, ordered by year descending?
Paraphrased question: What are the years, names, and publishers for all books, ordered by year descending?
SQL: SELECT YEAR ,  book_title ,  publisher FROM book_club ORDER BY YEAR DESC
Database: culture_company
Question: Show all publishers and the number of books for each publisher.
Paraphrased question: Show all publishers and the number of books for each publisher.
SQL: SELECT publisher ,  count(*) FROM book_club GROUP BY publisher
Database: culture_company
Question: How many books are there for each publisher?
Paraphrased question: How many books are there for each publisher?
SQL: SELECT publisher ,  count(*) FROM book_club GROUP BY publisher
Database: culture_company
Question: What is the publisher with most number of books?
Paraphrased question: What is the publisher with most number of books?
SQL: SELECT publisher FROM book_club GROUP BY publisher ORDER BY count(*) DESC LIMIT 1
Database: culture_company
Question: Return the publisher that has published the most books.
Paraphrased question: Return the publisher that has published the most books.
SQL: SELECT publisher FROM book_club GROUP BY publisher ORDER BY count(*) DESC LIMIT 1
Database: culture_company
Question: Show all book categories and the number of books in each category.
Paraphrased question: Show all book types and the number of books in each type.
SQL: SELECT category ,  count(*) FROM book_club GROUP BY category
Database: culture_company
Question: How many books fall into each category?
Paraphrased question: How many books fall into each type?
SQL: SELECT category ,  count(*) FROM book_club GROUP BY category
Database: culture_company
Question: List categories that have at least two books after year 1989.
Paraphrased question: List types that have at least two books after year 1989.
SQL: SELECT category FROM book_club WHERE YEAR  >  1989 GROUP BY category HAVING count(*)  >=  2
Database: culture_company
Question: What categories have two or more corresponding books that were made after 1989?
Paraphrased question: What types have two or more corresponding books that were made after 1989?
SQL: SELECT category FROM book_club WHERE YEAR  >  1989 GROUP BY category HAVING count(*)  >=  2
Database: culture_company
Question: Show publishers with a book published in 1989 and a book in 1990.
Paraphrased question: Show publishers with a book published in 1989 and a book in 1990.
SQL: SELECT publisher FROM book_club WHERE YEAR  =  1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR  =  1990
Database: culture_company
Question: What are the publishers who have published a book in both 1989 and 1990?
Paraphrased question: What are the publishers who have published a book in both 1989 and 1990?
SQL: SELECT publisher FROM book_club WHERE YEAR  =  1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR  =  1990
Database: culture_company
Question: Show all publishers which do not have a book in 1989.
Paraphrased question: Show all publishers which do not have a book in 1989.
SQL: SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR  =  1989
Database: culture_company
Question: Which publishers did not publish a book in 1989?
Paraphrased question: Which publishers did not publish a book in 1989?
SQL: SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR  =  1989
Database: culture_company
Question: Show all movie titles, years, and directors, ordered by budget.
Paraphrased question: Show all film names, years, and directors, ordered by budget.
SQL: SELECT title ,  YEAR ,  director FROM movie ORDER BY budget_million
Database: culture_company
Question: What are the titles, years, and directors of all movies, ordered by budget in millions?
Paraphrased question: What are the names, years, and directors of all films, ordered by budget in millions?
SQL: SELECT title ,  YEAR ,  director FROM movie ORDER BY budget_million
Database: culture_company
Question: How many movie directors are there?
Paraphrased question: How many film directors are there?
SQL: SELECT COUNT (DISTINCT director) FROM movie
Database: culture_company
Question: Count the number of different directors.
Paraphrased question: Count the number of different directors.
SQL: SELECT COUNT (DISTINCT director) FROM movie
Database: culture_company
Question: What is the title and director for the movie with highest worldwide gross in the year 2000 or before?
Paraphrased question: What is the name and director for the film with highest worldwide gross in the year 2000 or before?
SQL: SELECT title ,  director FROM movie WHERE YEAR  <=  2000 ORDER BY gross_worldwide DESC LIMIT 1
Database: culture_company
Question: Return the title and director of the movie released in the year 2000 or earlier that had the highest worldwide gross.
Paraphrased question: Return the name and director of the film released in the year 2000 or earlier that had the highest worldwide gross.
SQL: SELECT title ,  director FROM movie WHERE YEAR  <=  2000 ORDER BY gross_worldwide DESC LIMIT 1
Database: culture_company
Question: Show all director names who have a movie in both year 1999 and 2000.
Paraphrased question: Show all director names who have a film in both year 1999 and 2000.
SQL: SELECT director FROM movie WHERE YEAR  =  2000 INTERSECT SELECT director FROM movie WHERE YEAR  =  1999
Database: culture_company
Question: Which directors had a movie both in the year 1999 and 2000?
Paraphrased question: Which directors had a film both in the year 1999 and 2000?
SQL: SELECT director FROM movie WHERE YEAR  =  2000 INTERSECT SELECT director FROM movie WHERE YEAR  =  1999
Database: culture_company
Question: Show all director names who have a movie in the year 1999 or 2000.
Paraphrased question: Show all director names who have a film in the year 1999 or 2000.
SQL: SELECT director FROM movie WHERE YEAR  =  1999 OR YEAR  =  2000
Database: culture_company
Question: Which directors had a movie in either 1999 or 2000?
Paraphrased question: Which directors had a film in either 1999 or 2000?
SQL: SELECT director FROM movie WHERE YEAR  =  1999 OR YEAR  =  2000
Database: culture_company
Question: What is the average, maximum, and minimum budget for all movies before 2000.
Paraphrased question: What is the average, maximum, and minimum expenditure estimate for all films before 2000.
SQL: SELECT avg(budget_million) ,  max(budget_million) ,  min(budget_million) FROM movie WHERE YEAR  <  2000