aherntech/spider-syn huggingface dataset:
Database: products_gen_characteristics
Question: What is the product category description and unit of measurement of category "Herbs"?
Paraphrased question: What is the goods category describing content and unit of measurement of category "Herbs"?
SQL: SELECT product_category_description ,  unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "Herbs"
Database: products_gen_characteristics
Question: Return the description and unit of measurement for products in the 'Herbs' category.
Paraphrased question: Return the describing content and unit of measurement for goods in the 'Herbs' category.
SQL: SELECT product_category_description ,  unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "Herbs"
Database: products_gen_characteristics
Question: What is the unit of measurement of product named "cumin"?
Paraphrased question: What is the unit of measurement of goods named "cumin"?
SQL: SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code WHERE t1.product_name  =  "cumin"
Database: products_gen_characteristics
Question: Give the unit of measure for the product with the name 'cumin'.
Paraphrased question: Give the unit of measurement for the goods with the name 'cumin'.
SQL: SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code WHERE t1.product_name  =  "cumin"
Database: products_gen_characteristics
Question: Find the unit of measurement and product category code of product named "chervil".
Paraphrased question: Find the unit of measurement and goods category code of goods named "chervil".
SQL: SELECT t2.unit_of_measure ,  t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code WHERE t1.product_name  =  "chervil"
Database: products_gen_characteristics
Question: What are the unit of measure and category code for the 'chervil' product?
Paraphrased question: What are the unit of measurement and category code for the 'chervil' goods?
SQL: SELECT t2.unit_of_measure ,  t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code WHERE t1.product_name  =  "chervil"
Database: products_gen_characteristics
Question: Find the product names that are colored 'white' but do not have unit of measurement "Handful".
Paraphrased question: Find the goods names that are colored 'white' but do not have unit of measurement "Handful".
SQL: SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code  =  t3.color_code WHERE t3.color_description  =  "white" AND t2.unit_of_measure != "Handful"
Database: products_gen_characteristics
Question: What are the names of products that are not 'white' in color and are not measured by the unit 'Handful'?
Paraphrased question: What are the names of goods that are not 'white' in color and are not measured by the unit 'Handful'?
SQL: SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code  =  t3.color_code WHERE t3.color_description  =  "white" AND t2.unit_of_measure != "Handful"
Database: products_gen_characteristics
Question: What is the description of the color for most products?
Paraphrased question: What is the describing content of the color for most goods?
SQL: SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code GROUP BY t2.color_description ORDER BY count(*) DESC LIMIT 1
Database: products_gen_characteristics
Question: Return the color description that is most common across all products.
Paraphrased question: Return the colour describing content that is most common across all goods.
SQL: SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code GROUP BY t2.color_description ORDER BY count(*) DESC LIMIT 1
Database: products_gen_characteristics
Question: What is the description of the color used by least products?
Paraphrased question: What is the describing content of the colour used by least goods?
SQL: SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code GROUP BY t2.color_description ORDER BY count(*) ASC LIMIT 1
Database: products_gen_characteristics
Question: Give the color description that is least common across products.
Paraphrased question: Give the colour describing content that is least common across goods.
SQL: SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code GROUP BY t2.color_description ORDER BY count(*) ASC LIMIT 1
Database: products_gen_characteristics
Question: What is the characteristic name used by most number of the products?
Paraphrased question: What is the feature name used by most number of the goods?
SQL: SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id GROUP BY t3.characteristic_name ORDER BY count(*) DESC LIMIT 1
Database: products_gen_characteristics
Question: Return the name of the characteristic that is most common across all products.
Paraphrased question: Return the name of the feature that is most common across all goods.
SQL: SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id GROUP BY t3.characteristic_name ORDER BY count(*) DESC LIMIT 1
Database: products_gen_characteristics
Question: What are the names, details and data types of the characteristics which are never used by any product?
Paraphrased question: What are the names, information and data types of the characteristics which are never used by any goods?
SQL: SELECT characteristic_name ,  other_characteristic_details ,  characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name ,  t1.other_characteristic_details ,  t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id  =  t2.characteristic_id
Database: products_gen_characteristics
Question: Give the names, details, and data types of characteristics that are not found in any product.
Paraphrased question: Give the names, information, and data types of characteristics that are not found in any goods.
SQL: SELECT characteristic_name ,  other_characteristic_details ,  characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name ,  t1.other_characteristic_details ,  t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id  =  t2.characteristic_id
Database: products_gen_characteristics
Question: What are characteristic names used at least twice across all products?
Paraphrased question: What are feature names used at least twice across all goods?
SQL: SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id GROUP BY t3.characteristic_name HAVING count(*)  >= 2
Database: products_gen_characteristics
Question: Give the names of characteristics that are in two or more products?
Paraphrased question: Give the names of features that are in two or more goods?
SQL: SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id GROUP BY t3.characteristic_name HAVING count(*)  >= 2
Database: products_gen_characteristics
Question: How many colors are never used by any product?
Paraphrased question: How many colours are never used by any goods?
SQL: SELECT count(*) FROM Ref_colors WHERE color_code NOT IN ( SELECT color_code FROM products )
Database: products_gen_characteristics
Question: Count the number of colors that are not used in any products.
Paraphrased question: Count the number of colours that are not used in any goods.
SQL: SELECT count(*) FROM Ref_colors WHERE color_code NOT IN ( SELECT color_code FROM products )
Database: swimming
Question: How many events are there?
Paraphrased question: How many events are there?
SQL: SELECT count(*) FROM event
Database: swimming
Question: List all the event names by year from the most recent to the oldest.
Paraphrased question: List all the event names by year from the most recent to the oldest.
SQL: SELECT name FROM event ORDER BY YEAR DESC
Database: swimming
Question: What is the name of the event that happened in the most recent year?
Paraphrased question: What is the name of the event that happened in the most recent year?
SQL: SELECT name FROM event ORDER BY YEAR DESC LIMIT 1
Database: swimming
Question: How many stadiums are there?
Paraphrased question: How many stadiums are there?
SQL: SELECT count(*) FROM stadium
Database: swimming
Question: Find the name of the stadium that has the maximum capacity.
Paraphrased question: Find the name of the stadium that has the maximum number of seats.
SQL: SELECT name FROM stadium ORDER BY capacity DESC LIMIT 1
Database: swimming
Question: Find the names of stadiums whose capacity is smaller than the average capacity.
Paraphrased question: Find the names of stadiums whose capacity is smaller than the average capacity.
SQL: SELECT name FROM stadium WHERE capacity  <  (SELECT avg(capacity) FROM stadium)
Database: swimming
Question: Find the country that has the most stadiums.
Paraphrased question: Find the nation that has the most stadiums.
SQL: SELECT country FROM stadium GROUP BY country ORDER BY count(*) DESC LIMIT 1
Database: swimming
Question: Which country has at most 3 stadiums listed?
Paraphrased question: Which nation has at most 3 stadiums listed?
SQL: SELECT country FROM stadium GROUP BY country HAVING count(*)  <=  3
Database: swimming
Question: Which country has both stadiums with capacity greater than 60000 and stadiums with capacity less than 50000?
Paraphrased question: Which nation has both stadiums with capacity greater than 60000 and stadiums with capacity less than 50000?
SQL: SELECT country FROM stadium WHERE capacity  >  60000 INTERSECT SELECT country FROM stadium WHERE capacity  <  50000
Database: swimming
Question: How many cities have a stadium that was opened before the year of 2006?
Paraphrased question: How many towns have a stadium that was opened before the year of 2006?
SQL: SELECT count(DISTINCT city) FROM stadium WHERE opening_year  <  2006
Database: swimming
Question: How many stadiums does each country have?
Paraphrased question: How many stadiums does each nation have?
SQL: SELECT country ,  count(*) FROM stadium GROUP BY country
Database: swimming
Question: Which countries do not have a stadium that was opened after 2006?
Paraphrased question: Which nations do not have a stadium that was opened after 2006?
SQL: SELECT country FROM stadium EXCEPT SELECT country FROM stadium WHERE opening_year  >  2006
Database: swimming
Question: How many stadiums are not in country "Russia"?
Paraphrased question: How many stadiums are not in country "Russia"?
SQL: SELECT count(*) FROM stadium WHERE country != 'Russia'
Database: swimming
Question: Find the names of all swimmers, sorted by their 100 meter scores in ascending order.
Paraphrased question: Find the names of all swimmers, sorted by their 100 meter scores in ascending order.
SQL: SELECT name FROM swimmer ORDER BY meter_100
Database: swimming
Question: How many different countries are all the swimmers from?
Paraphrased question: How many different countries are all the swimmers from?
SQL: SELECT count(DISTINCT nationality) FROM swimmer
Database: swimming
Question: List countries that have more than one swimmer.
Paraphrased question: List countries that have more than one swimmer.
SQL: SELECT nationality ,  count(*) FROM swimmer GROUP BY nationality HAVING count(*)  >  1
Database: swimming
Question: Find all 200 meter and 300 meter results of swimmers with nationality "Australia".
Paraphrased question: Find all 200m and 300m results of swimmers with nationality "Australia".
SQL: SELECT meter_200 ,  meter_300 FROM swimmer WHERE nationality  =  'Australia'
Database: swimming
Question: Find the names of swimmers who has a result of "win".
Paraphrased question: Find the names of swimmers who has a result of "win".
SQL: SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id WHERE RESULT  =  'Win'
Database: swimming
Question: What is the name of the stadium which held the most events?
Paraphrased question: What is the name of the stadium which held the most events?
SQL: SELECT t1.name FROM stadium AS t1 JOIN event AS t2 ON t1.id  =  t2.stadium_id GROUP BY t2.stadium_id ORDER BY count(*) DESC LIMIT 1
Database: swimming
Question: Find the name and capacity of the stadium where the event named "World Junior" happened.
Paraphrased question: Find the name and capacity of the stadium where the event named "World Junior" happened.
SQL: SELECT t1.name ,  t1.capacity FROM stadium AS t1 JOIN event AS t2 ON t1.id  =  t2.stadium_id WHERE t2.name  =  'World Junior'
Database: swimming
Question: Find the names of stadiums which have never had any event.
Paraphrased question: Find the names of stadiums which have never had any event.
SQL: SELECT name FROM stadium WHERE id NOT IN (SELECT stadium_id FROM event)
Database: swimming
Question: Find the name of the swimmer who has the most records.
Paraphrased question: Find the name of the swimmer who has the most records.
SQL: SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id GROUP BY t2.swimmer_id ORDER BY count(*) DESC LIMIT 1
Database: swimming
Question: Find the name of the swimmer who has at least 2 records.
Paraphrased question: Find the name of the swimmer who has at least 2 records.
SQL: SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id GROUP BY t2.swimmer_id HAVING count(*)  >=  2
Database: swimming
Question: Find the name and nationality of the swimmer who has won (i.e., has a result of "win") more than 1 time.
Paraphrased question: Find the name and nation of the swimmer who has won (i.e., has a result of "win") more than 1 time.
SQL: SELECT t1.name ,  t1.nationality FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id WHERE RESULT  =  'Win' GROUP BY t2.swimmer_id HAVING count(*)  >  1
Database: swimming
Question: Find the names of the swimmers who have no record.
Paraphrased question: Find the names of the swimmers who have no record.
SQL: SELECT name FROM swimmer WHERE id NOT IN (SELECT swimmer_id FROM record)
Database: swimming
Question: Find the names of the swimmers who have both "win" and "loss" results in the record.
Paraphrased question: Find the names of the swimmers who have both "win" and "loss" results in the record.
SQL: SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id WHERE RESULT  =  'Win' INTERSECT SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id WHERE RESULT  =  'Loss'
Database: swimming
Question: Find the names of stadiums that some Australian swimmers have been to.
Paraphrased question: Find the names of stadiums that some Australian swimmers have been to.
SQL: SELECT t4.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id JOIN event AS t3 ON t2.event_id  =  t3.id JOIN stadium AS t4 ON t4.id  =  t3.stadium_id WHERE t1.nationality  =  'Australia'
Database: swimming
Question: Find the names of stadiums that the most swimmers have been to.
Paraphrased question: Find the names of stadiums that the most swimmers have been to.
SQL: SELECT t3.name FROM record AS t1 JOIN event AS t2 ON t1.event_id  =  t2.id JOIN stadium AS t3 ON t3.id  =  t2.stadium_id GROUP BY t2.stadium_id ORDER BY count(*) DESC LIMIT 1
Database: swimming
Question: Find all details for each swimmer.
Paraphrased question: Find all information for each swimmer.
SQL: SELECT * FROM swimmer
Database: swimming
Question: What is the average capacity of the stadiums that were opened in year 2005?
Paraphrased question: What is the average capacity of the stadiums that were opened in year 2005?
SQL: SELECT avg(capacity) FROM stadium WHERE opening_year  =  2005
Database: railway
Question: How many railways are there?
Paraphrased question: How many railroads are there?
SQL: SELECT count(*) FROM railway
Database: railway
Question: List the builders of railways in ascending alphabetical order.
Paraphrased question: List the builders of railroads in ascending alphabetical order.
SQL: SELECT Builder FROM railway ORDER BY Builder ASC
Database: railway
Question: List the wheels and locations of the railways.
Paraphrased question: List the wheels and positions of the railroads.
SQL: SELECT Wheels ,  LOCATION FROM railway
Database: railway
Question: What is the maximum level of managers in countries that are not "Australia"?
Paraphrased question: What is the maximum level of heads in countries that are not "Australia"?
SQL: SELECT max(LEVEL) FROM manager WHERE Country != "Australia	"
Database: railway
Question: What is the average age for all managers?
Paraphrased question: What is the average age for all heads?
SQL: SELECT avg(Age) FROM manager
Database: railway
Question: What are the names of managers in ascending order of level?
Paraphrased question: What are the names of heads in ascending order of level?
SQL: SELECT Name FROM manager ORDER BY LEVEL ASC
Database: railway
Question: What are the names and arrival times of trains?
Paraphrased question: What are the names and arrival times of trains?
SQL: SELECT Name ,  Arrival FROM train
Database: railway
Question: What is the name of the oldest manager?
Paraphrased question: What is the name of the oldest head?
SQL: SELECT Name FROM manager ORDER BY Age DESC LIMIT 1
Database: railway
Question: Show the names of trains and locations of railways they are in.
Paraphrased question: Show the names of trains and positions of railroads they are in.
SQL: SELECT T2.Name ,  T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID  =  T2.Railway_ID
Database: railway
Question: Show the builder of railways associated with the trains named "Andaman Exp".
Paraphrased question: Show the builder of railroads associated with the trains named "Andaman Exp".
SQL: SELECT T1.Builder FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID  =  T2.Railway_ID WHERE T2.Name  =  "Andaman Exp"
Database: railway
Question: Show id and location of railways that are associated with more than one train.
Paraphrased question: Show id and position of railroads that are associated with more than one train.
SQL: SELECT T2.Railway_ID ,  T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID  =  T2.Railway_ID GROUP BY T2.Railway_ID HAVING COUNT(*)  >  1
Database: railway
Question: Show the id and builder of the railway that are associated with the most trains.
Paraphrased question: Show the id and builder of the railroad that are associated with the most trains.
SQL: SELECT T2.Railway_ID ,  T1.Builder FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID  =  T2.Railway_ID GROUP BY T2.Railway_ID ORDER BY COUNT(*) DESC LIMIT 1
Database: railway
Question: Show different builders of railways, along with the corresponding number of railways using each builder.
Paraphrased question: Show different builders of railroads, along with the corresponding number of railroads using each builder.
SQL: SELECT Builder ,  COUNT(*) FROM railway GROUP BY Builder
Database: railway
Question: Show the most common builder of railways.
Paraphrased question: Show the most common builder of railroads.
SQL: SELECT Builder FROM railway GROUP BY Builder ORDER BY COUNT(*) DESC LIMIT 1
Database: railway
Question: Show different locations of railways along with the corresponding number of railways at each location.
Paraphrased question: Show different positions of railroads along with the corresponding number of railroads at each position.
SQL: SELECT LOCATION ,  COUNT(*) FROM railway GROUP BY LOCATION
Database: railway
Question: Show the locations that have more than one railways.
Paraphrased question: Show the positions that have more than one railroads.
SQL: SELECT LOCATION FROM railway GROUP BY LOCATION HAVING COUNT(*)  >  1
Database: railway
Question: List the object number of railways that do not have any trains.
Paraphrased question: List the object number of railroads that do not have any trains.
SQL: SELECT ObjectNumber FROM railway WHERE Railway_ID NOT IN (SELECT Railway_ID FROM train)
Database: railway
Question: Show the countries that have both managers of age above 50 and managers of age below 46.
Paraphrased question: Show the nationalities that have both managers of age above 50 and managers of age below 46.
SQL: SELECT Country FROM manager WHERE Age  >  50 INTERSECT SELECT Country FROM manager WHERE Age  <  46
Database: railway
Question: Show the distinct countries of managers.
Paraphrased question: Show the different nationalities of managers.
SQL: SELECT DISTINCT Country FROM manager
Database: railway
Question: Show the working years of managers in descending order of their level.
Paraphrased question: Show the working years of heads in descending order of their level.
SQL: SELECT Working_year_starts FROM manager ORDER BY LEVEL DESC
Database: railway
Question: Show the countries that have managers of age above 50 or below 46.
Paraphrased question: Show the nationalities that have managers of age above 50 or below 46.
SQL: SELECT Country FROM manager WHERE Age  >  50 OR Age  <  46
Database: customers_and_products_contacts
Question: How many addresses are there in country USA?
Paraphrased question: How many locations are there in country USA?
SQL: SELECT count(*) FROM addresses WHERE country  =  'USA'
Database: customers_and_products_contacts
Question: Show all distinct cities in the address record.
Paraphrased question: Show all different towns in the location record.
SQL: SELECT DISTINCT city FROM addresses
Database: customers_and_products_contacts
Question: Show each state and the number of addresses in each state.
Paraphrased question: Show each state and the number of locations in each state.
SQL: SELECT state_province_county ,  count(*) FROM addresses GROUP BY state_province_county
Database: customers_and_products_contacts
Question: Show names and phones of customers who do not have address information.
Paraphrased question: Show names and telephones of clients who do not have address information.
SQL: SELECT customer_name ,  customer_phone FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM customer_address_history)
Database: customers_and_products_contacts
Question: Show the name of the customer who has the most orders.
Paraphrased question: Show the name of the client who has the most orders.
SQL: SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1
Database: customers_and_products_contacts
Question: Show the product type codes which have at least two products.
Paraphrased question: Show the goods type codes which have at least two goods.
SQL: SELECT product_type_code FROM products GROUP BY product_type_code HAVING count(*)  >=  2
Database: customers_and_products_contacts
Question: Show the names of customers who have both an order in completed status and an order in part status.
Paraphrased question: Show the names of clients who have both an order in completed status and an order in part status.
SQL: SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.order_status_code  =  'Completed' INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.order_status_code  =  'Part'
Database: customers_and_products_contacts
Question: Show the name, phone, and payment method code for all customers in descending order of customer number.
Paraphrased question: Show the name, telephone, and payment method code for all clients in descending order of client number.
SQL: SELECT customer_name ,  customer_phone ,  payment_method_code FROM customers ORDER BY customer_number DESC
Database: customers_and_products_contacts
Question: Show the product name and total order quantity for each product.
Paraphrased question: Show the goods name and total number of order  for each goods.
SQL: SELECT T1.product_name ,  sum(T2.order_quantity) FROM products AS T1 JOIN order_items AS T2 ON T1.product_id  =  T2.product_id GROUP BY T1.product_id
Database: customers_and_products_contacts
Question: Show the minimum, maximum, average price for all products.
Paraphrased question: Show the minimum, maximum, average price for all goods.
SQL: SELECT min(product_price) ,  max(product_price) ,  avg(product_price) FROM products
Database: customers_and_products_contacts
Question: How many products have a price higher than the average?
Paraphrased question: How many goods have a price higher than the average?
SQL: SELECT count(*) FROM products WHERE product_price  >  (SELECT avg(product_price) FROM products)
Database: customers_and_products_contacts
Question: Show the customer name, customer address city, date from, and date to for each customer address history.
Paraphrased question: Show the client name, client location city, date from, and date to for each client location history.
SQL: SELECT T2.customer_name ,  T3.city ,  T1.date_from ,  T1.date_to 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
Database: customers_and_products_contacts
Question: Show the names of customers who use Credit Card payment method and have more than 2 orders.
Paraphrased question: Show the names of clients who use Credit Card payment method and have more than 2 orders.
SQL: SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id WHERE T1.payment_method_code  =  'Credit Card' GROUP BY T1.customer_id HAVING count(*)  >  2
Database: customers_and_products_contacts
Question: What are the name and phone of the customer with the most ordered product quantity?
Paraphrased question: What are the name and telephone of the client with the most ordered goods quantity?
SQL: SELECT  T1.customer_name ,  T1.customer_phone FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id JOIN order_items AS T3 ON T3.order_id  =  T2.order_id GROUP BY T1.customer_id ORDER BY sum(T3.order_quantity) DESC LIMIT 1
Database: customers_and_products_contacts
Question: Show the product type and name for the products with price higher than 1000 or lower than 500.
Paraphrased question: Show the goods type and name for the goods with price higher than 1000 or lower than 500.
SQL: SELECT product_type_code ,  product_name FROM products WHERE product_price  >  1000 OR product_price  <  500
Database: dorm_1
Question: Find the name of dorms only for female (F gender).
Paraphrased question: Find the name of dormitories only for female (F gender).
SQL: SELECT dorm_name FROM dorm WHERE gender  =  'F'
Database: dorm_1
Question: What are the names of the all-female dorms?
Paraphrased question: What are the names of the all-female dormitories?
SQL: SELECT dorm_name FROM dorm WHERE gender  =  'F'
Database: dorm_1
Question: Find the name of dorms that can accommodate more than 300 students.
Paraphrased question: Find the name of dormitories that can accommodate more than 300 students.
SQL: SELECT dorm_name FROM dorm WHERE student_capacity  >  300
Database: dorm_1
Question: What are the names of all the dorms that can accomdate more than 300 students?
Paraphrased question: What are the names of all the dormitories that can accomdate more than 300 students?
SQL: SELECT dorm_name FROM dorm WHERE student_capacity  >  300
Database: dorm_1
Question: How many female students (sex is F) whose age is below 25?
Paraphrased question: How many female students (sex is F) whose age is below 25?
SQL: SELECT count(*) FROM student WHERE sex  =  'F' AND age  <  25
Database: dorm_1
Question: How many girl students who are younger than 25?
Paraphrased question: How many girl students who are younger than 25?
SQL: SELECT count(*) FROM student WHERE sex  =  'F' AND age  <  25
Database: dorm_1
Question: Find the first name of students who is older than 20.
Paraphrased question: Find the forename of students who is older than 20.
SQL: SELECT fname FROM student WHERE age  >  20
Database: dorm_1
Question: What are the first names of all students who are older than 20?
Paraphrased question: What are the forenames of all students who are older than 20?
SQL: SELECT fname FROM student WHERE age  >  20
Database: dorm_1
Question: Find the first name of students living in city PHL whose age is between 20 and 25.
Paraphrased question: Find the forename of students living in city PHL whose age is between 20 and 25.
SQL: SELECT fname FROM student WHERE city_code  =  'PHL' AND age BETWEEN 20 AND 25
Database: dorm_1
Question: What is the first name of the students who are in age 20 to 25 and living in PHL city?
Paraphrased question: What is the forename of the students who are in age 20 to 25 and living in PHL city?
SQL: SELECT fname FROM student WHERE city_code  =  'PHL' AND age BETWEEN 20 AND 25
Database: dorm_1
Question: How many dorms are there?
Paraphrased question: How many dormitories are there?
SQL: SELECT count(*) FROM dorm
Database: dorm_1
Question: How many dorms are in the database?
Paraphrased question: How many dormitories are in the database?
SQL: SELECT count(*) FROM dorm
Database: dorm_1
Question: Find the number of distinct amenities.
Paraphrased question: Find the number of distinct amenities.
SQL: SELECT count(*) FROM dorm_amenity
Database: dorm_1
Question: How many diffrent dorm amenities are there?
Paraphrased question: How many diffrent dormitory amenities are there?
SQL: SELECT count(*) FROM dorm_amenity
Database: dorm_1
Question: Find the total capacity of all dorms.
Paraphrased question: Find the total capacity of all dormitories.
SQL: SELECT sum(student_capacity) FROM dorm
Database: dorm_1
Question: What is the total student capacity of all dorms?
Paraphrased question: What is the total student capacity of all dormitories?
SQL: SELECT sum(student_capacity) FROM dorm
Database: dorm_1
Question: How many students are there?
Paraphrased question: How many students are there?
SQL: SELECT count(*) FROM student
Database: dorm_1
Question: How many students exist?
Paraphrased question: How many students exist?
SQL: SELECT count(*) FROM student
Database: dorm_1
Question: Find the average age of all students living in the each city.
Paraphrased question: Find the average age of all students living in the each city.
SQL: SELECT avg(age) ,  city_code FROM student GROUP BY city_code
Database: dorm_1
Question: What is the average age for each city and what are those cities?
Paraphrased question: What is the average age for each city and what are those cities?
SQL: SELECT avg(age) ,  city_code FROM student GROUP BY city_code
Database: dorm_1
Question: Find the average and total capacity of dorms for the students with gender X.
Paraphrased question: Find the average and total capacity of dormitories for the students with gender X.
SQL: SELECT avg(student_capacity) ,  sum(student_capacity) FROM dorm WHERE gender  =  'X'
Database: dorm_1
Question: What is the average and total capacity for all dorms who are of gender X?
Paraphrased question: What is the average and total capacity for all dormitories who are of gender X?
SQL: SELECT avg(student_capacity) ,  sum(student_capacity) FROM dorm WHERE gender  =  'X'
Database: dorm_1
Question: Find the number of dorms that have some amenity.
Paraphrased question: Find the number of dormitories that have some amenity.
SQL: SELECT count(DISTINCT dormid) FROM has_amenity
Database: dorm_1
Question: How many dorms have amenities?
Paraphrased question: How many dormitories have amenities?
SQL: SELECT count(DISTINCT dormid) FROM has_amenity
Database: dorm_1
Question: Find the name of dorms that do not have any amenity
Paraphrased question: Find the name of dormitories that do not have any amenity
SQL: SELECT dorm_name FROM dorm WHERE dormid NOT IN (SELECT dormid FROM has_amenity)
Database: dorm_1
Question: What are the names of all the dorms that don't have any amenities?
Paraphrased question: What are the names of all the dormitories that don't have any amenities?
SQL: SELECT dorm_name FROM dorm WHERE dormid NOT IN (SELECT dormid FROM has_amenity)
Database: dorm_1
Question: Find the number of distinct gender for dorms.
Paraphrased question: Find the number of different sex for dormitories.
SQL: SELECT count(DISTINCT gender) FROM dorm
Database: dorm_1
Question: How many different genders are there in the dorms?
Paraphrased question: How many different sexs are there in the dormitories?
SQL: SELECT count(DISTINCT gender) FROM dorm
Database: dorm_1
Question: Find the capacity and gender type of the dorm whose name has substring ‘Donor’.
Paraphrased question: Find the capacity and sex type of the dormitory whose name has substring ‘Donor’.
SQL: SELECT student_capacity ,  gender FROM dorm WHERE dorm_name LIKE '%Donor%'
Database: dorm_1
Question: What is the student capacity and type of gender for the dorm whose name as the phrase Donor in it?
Paraphrased question: What is the student capacity and type of sex for the dormitory whose name as the phrase Donor in it?
SQL: SELECT student_capacity ,  gender FROM dorm WHERE dorm_name LIKE '%Donor%'
Database: dorm_1
Question: Find the name and gender type of the dorms whose capacity is greater than 300 or less than 100.
Paraphrased question: Find the name and sex type of the dormitories whose capacity is greater than 300 or less than 100.
SQL: SELECT dorm_name ,  gender FROM dorm WHERE student_capacity  >  300 OR student_capacity  <  100
Database: dorm_1
Question: What are the names and types of the dorms that have a capacity greater than 300 or less than 100?
Paraphrased question: What are the names and types of the dormitories that have a capacity greater than 300 or less than 100?
SQL: SELECT dorm_name ,  gender FROM dorm WHERE student_capacity  >  300 OR student_capacity  <  100
Database: dorm_1
Question: Find the numbers of different majors and cities.
Paraphrased question: Find the numbers of different discipline and cities.
SQL: SELECT count(DISTINCT major) ,  count(DISTINCT city_code) FROM student
Database: dorm_1
Question: How many different majors are there and how many different city codes are there for each student?
Paraphrased question: How many different discipline are there and how many different city codes are there for each student?
SQL: SELECT count(DISTINCT major) ,  count(DISTINCT city_code) FROM student
Database: dorm_1
Question: Find the name of dorms which have both TV Lounge and Study Room as amenities.
Paraphrased question: Find the name of dormitories which have both TV Lounge and Study Room as amenities.
SQL: SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid  =  T3.amenid WHERE T3.amenity_name  =  'TV Lounge' INTERSECT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid  =  T3.amenid WHERE T3.amenity_name  =  'Study Room'
Database: dorm_1
Question: What is the name of the dorm with both a TV Lounge and Study Room listed as amenities?
Paraphrased question: What is the name of the dormitory with both a TV Lounge and Study Room listed as amenities?
SQL: SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid  =  T3.amenid WHERE T3.amenity_name  =  'TV Lounge' INTERSECT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid  =  T3.amenid WHERE T3.amenity_name  =  'Study Room'
Database: dorm_1
Question: Find the name of dorms which have TV Lounge but no Study Room as amenity.
Paraphrased question: Find the name of dormitories which have TV Lounge but no Study Room as amenity.
SQL: SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid  =  T3.amenid WHERE T3.amenity_name  =  'TV Lounge' EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid  =  T3.amenid WHERE T3.amenity_name  =  'Study Room'
Database: dorm_1
Question: What is the name of each dorm that has a TV Lounge but no study rooms?
Paraphrased question: What is the name of each dormitory that has a TV Lounge but no study rooms?
SQL: SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid  =  T3.amenid WHERE T3.amenity_name  =  'TV Lounge' EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid  =  T3.amenid WHERE T3.amenity_name  =  'Study Room'
Database: dorm_1
Question: Find the last name of students who is either female (sex is F) and living in the city of code BAL or male (sex is M) and in age of below 20.
Paraphrased question: Find the family name of students who is either female (sex is F) and living in the city of code BAL or male (sex is M) and in age of below 20.
SQL: SELECT lname FROM student WHERE sex  =  'F' AND city_code  =  'BAL' UNION SELECT lname FROM student WHERE sex  =  'M' AND age  <  20
Database: dorm_1
Question: What is the last name of every student who is either female or living in a city with the code BAL or male and under 20?
Paraphrased question: What is the family name of every student who is either female or living in a city with the code BAL or male and under 20?
SQL: SELECT lname FROM student WHERE sex  =  'F' AND city_code  =  'BAL' UNION SELECT lname FROM student WHERE sex  =  'M' AND age  <  20
Database: dorm_1
Question: Find the name of the dorm with the largest capacity.
Paraphrased question: Find the name of the dormitory with the largest capacity.
SQL: SELECT dorm_name FROM dorm ORDER BY student_capacity DESC LIMIT 1
Database: dorm_1
Question: What are the names of the dorm with the largest capacity?
Paraphrased question: What are the names of the dormitory with the largest capacity?
SQL: SELECT dorm_name FROM dorm ORDER BY student_capacity DESC LIMIT 1
Database: dorm_1
Question: List in alphabetic order all different amenities.
Paraphrased question: List in alphabetic order all different amenities.
SQL: SELECT amenity_name FROM dorm_amenity ORDER BY amenity_name
Database: dorm_1
Question: What are the different dorm amenity names in alphabetical order?
Paraphrased question: What are the different dormitory amenity names in alphabetical order?
SQL: SELECT amenity_name FROM dorm_amenity ORDER BY amenity_name
Database: dorm_1
Question: Find the code of city where most of students are living in.
Paraphrased question: Find the code of city where most of students are living in.
SQL: SELECT city_code FROM student GROUP BY city_code ORDER BY count(*) DESC LIMIT 1
Database: dorm_1
Question: What is the code of the city with the most students?
Paraphrased question: What is the code of the city with the most students?
SQL: SELECT city_code FROM student GROUP BY city_code ORDER BY count(*) DESC LIMIT 1
Database: dorm_1
Question: Find the first and last name of students whose age is younger than the average age.
Paraphrased question: Find the full name of students whose age is younger than the average age.
SQL: SELECT fname ,  lname FROM student WHERE age  <  (SELECT avg(age) FROM student)
Database: dorm_1
Question: What is the first and last name of all students who are younger than average?
Paraphrased question: What is the full name of all students who are younger than average?
SQL: SELECT fname ,  lname FROM student WHERE age  <  (SELECT avg(age) FROM student)
Database: dorm_1
Question: List the first and last name of students who are not living in the city with code HKG, and sorted the results by their ages.
Paraphrased question: List the forename and surname of students who are not living in the city with code HKG, and sorted the results by their ages.
SQL: SELECT fname ,  lname FROM student WHERE city_code != 'HKG' ORDER BY age
Database: dorm_1
Question: What are the first and last names of all students who are not living in the city HKG and order the results by age?
Paraphrased question: What are the full names of all students who are not living in the city HKG and order the results by age?
SQL: SELECT fname ,  lname FROM student WHERE city_code != 'HKG' ORDER BY age
Database: dorm_1
Question: List name of all amenities which Anonymous Donor Hall has, and sort the results in alphabetic order.
Paraphrased question: List name of all amenities which Anonymous Donor Hall has, and sort the results in alphabetic order.
SQL: SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T2.amenid  =  T1.amenid JOIN dorm AS T3 ON T2.dormid  =  T3.dormid WHERE T3.dorm_name  =  'Anonymous Donor Hall' ORDER BY T1.amenity_name
Database: dorm_1
Question: What are the amenities in alphabetical order that Anonymous Donor Hall has?
Paraphrased question: What are the amenities in alphabetical order that Anonymous Donor Hall has?
SQL: SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T2.amenid  =  T1.amenid JOIN dorm AS T3 ON T2.dormid  =  T3.dormid WHERE T3.dorm_name  =  'Anonymous Donor Hall' ORDER BY T1.amenity_name
Database: dorm_1
Question: Find the number of dorms and total capacity for each gender.
Paraphrased question: Find the number of dormitories and total capacity for each gender.
SQL: SELECT count(*) ,  sum(student_capacity) ,  gender FROM dorm GROUP BY gender
Database: dorm_1
Question: How many dorms are there and what is the total capacity for each gender?
Paraphrased question: How many dormitories are there and what is the total capacity for each gender?
SQL: SELECT count(*) ,  sum(student_capacity) ,  gender FROM dorm GROUP BY gender
Database: dorm_1
Question: Find the average and oldest age for students with different sex.
Paraphrased question: Find the average and oldest age for students with different sex.
SQL: SELECT avg(age) ,  max(age) ,  sex FROM student GROUP BY sex
Database: dorm_1
Question: What is the average and oldest age for each gender of student?
Paraphrased question: What is the average and oldest age for each gender of student?
SQL: SELECT avg(age) ,  max(age) ,  sex FROM student GROUP BY sex
Database: dorm_1
Question: Find the number of students in each major.
Paraphrased question: Find the number of students in each discipline.
SQL: SELECT count(*) ,  major FROM student GROUP BY major
Database: dorm_1
Question: How many students are there in each major?
Paraphrased question: How many students are there in each discipline?
SQL: SELECT count(*) ,  major FROM student GROUP BY major
Database: dorm_1
Question: Find the number and average age of students living in each city.
Paraphrased question: Find the number and average age of students living in each city.
SQL: SELECT count(*) ,  avg(age) ,  city_code FROM student GROUP BY city_code
Database: dorm_1
Question: How many students live in each city and what are their average ages?
Paraphrased question: How many students live in each city and what are their average ages?
SQL: SELECT count(*) ,  avg(age) ,  city_code FROM student GROUP BY city_code
Database: dorm_1
Question: Find the average age and number of male students (with sex M) from each city.
Paraphrased question: Find the average age and number of male students (with sex M) from each city.
SQL: SELECT count(*) ,  avg(age) ,  city_code FROM student WHERE sex  =  'M' GROUP BY city_code
Database: dorm_1
Question: What is the average age and how many male students are there in each city?
Paraphrased question: What is the average age and how many male students are there in each city?
SQL: SELECT count(*) ,  avg(age) ,  city_code FROM student WHERE sex  =  'M' GROUP BY city_code
Database: dorm_1
Question: Find the number of students for the cities where have more than one student.
Paraphrased question: Find the number of students for the cities where have more than one student.
SQL: SELECT count(*) ,  city_code FROM student GROUP BY city_code HAVING count(*)  >  1
Database: dorm_1
Question: How many students are from each city, and which cities have more than one cities?
Paraphrased question: How many students are from each city, and which cities have more than one cities?
SQL: SELECT count(*) ,  city_code FROM student GROUP BY city_code HAVING count(*)  >  1
Database: dorm_1
Question: Find the first and last name of students who are not in the largest major.
Paraphrased question: Find the forename and family name of students who are not in the largest major.
SQL: SELECT fname ,  lname FROM student WHERE major != (SELECT major FROM student GROUP BY major ORDER BY count(*) DESC LIMIT 1)
Database: dorm_1
Question: What is the first and last name of the students who are not in the largest major?
Paraphrased question: What is the forename and surname of the students who are not in the largest major?
SQL: SELECT fname ,  lname FROM student WHERE major != (SELECT major FROM student GROUP BY major ORDER BY count(*) DESC LIMIT 1)
Database: dorm_1
Question: Find the number of students whose age is older than the average age for each gender.
Paraphrased question: Find the number of students whose age is older than the average age for each gender.
SQL: SELECT count(*) ,  sex FROM student WHERE age  >  (SELECT avg(age) FROM student) GROUP BY sex
Database: dorm_1
Question: How many students are older than average for each gender?
Paraphrased question: How many students are older than average for each gender?
SQL: SELECT count(*) ,  sex FROM student WHERE age  >  (SELECT avg(age) FROM student) GROUP BY sex
Database: dorm_1
Question: Find the average age of students living in each dorm and the name of dorm.
Paraphrased question: Find the average age of students living in each dormitory and the name of dormitory.
SQL: SELECT avg(T1.age) ,  T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid  =  T2.stuid JOIN dorm AS T3 ON T3.dormid  =  T2.dormid GROUP BY T3.dorm_name
Database: dorm_1
Question: What is the average age for each dorm and what are the names of each dorm?
Paraphrased question: What is the average age for each dormitory and what are the names of each dormitory?
SQL: SELECT avg(T1.age) ,  T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid  =  T2.stuid JOIN dorm AS T3 ON T3.dormid  =  T2.dormid GROUP BY T3.dorm_name
Database: dorm_1
Question: Find the number of amenities for each of the dorms that can accommodate more than 100 students.
Paraphrased question: Find the number of amenities for each of the dormitories that can accommodate more than 100 students.
SQL: SELECT count(*) ,  T1.dormid FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid WHERE T1.student_capacity  >  100 GROUP BY T1.dormid
Database: dorm_1
Question: For each dorm, how many amenities does it have?
Paraphrased question: For each dormitory, how many amenities does it have?
SQL: SELECT count(*) ,  T1.dormid FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid WHERE T1.student_capacity  >  100 GROUP BY T1.dormid
Database: dorm_1
Question: Find the number of students who is older than 20 in each dorm.
Paraphrased question: Find the number of students who is older than 20 in each dormitory.
SQL: SELECT count(*) ,  T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid  =  T2.stuid JOIN dorm AS T3 ON T3.dormid  =  T2.dormid WHERE T1.age  >  20 GROUP BY T3.dorm_name
Database: dorm_1
Question: How many students are older than 20 in each dorm?
Paraphrased question: How many students are older than 20 in each dormitory?
SQL: SELECT count(*) ,  T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid  =  T2.stuid JOIN dorm AS T3 ON T3.dormid  =  T2.dormid WHERE T1.age  >  20 GROUP BY T3.dorm_name
Database: dorm_1
Question: Find the first name of students who are living in the Smith Hall.
Paraphrased question: Find the forename of students who are living in the Smith Hall.
SQL: SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid  =  T2.stuid JOIN dorm AS T3 ON T3.dormid  =  T2.dormid WHERE T3.dorm_name  =  'Smith Hall'