diff --git "a/spider_test_compact.csv" "b/spider_test_compact.csv" --- "a/spider_test_compact.csv" +++ "b/spider_test_compact.csv" @@ -39,80 +39,80 @@ What is the number of distinct countries of all players?,SELECT COUNT (DISTINCT How many different countries are players from?,SELECT COUNT (DISTINCT Country) FROM player,soccer_3,"[{'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'name'}, {'col_name': 'country'}, {'col_name': 'earnings'}, {'col_name': 'events number'}, {'col_name': 'wins count'}, {'col_name': 'club id'}], 'foreign_key_columns': ['club id'], 'primary_keys': ['player id']}]" "Show the earnings of players from country ""Australia"" or ""Zimbabwe"".","SELECT Earnings FROM player WHERE Country = ""Australia"" OR Country = ""Zimbabwe""",soccer_3,"[{'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'name'}, {'col_name': 'country'}, {'col_name': 'earnings'}, {'col_name': 'events number'}, {'col_name': 'wins count'}, {'col_name': 'club id'}], 'foreign_key_columns': ['club id'], 'primary_keys': ['player id']}]" What are the earnings of players from either of the countries of Australia or Zimbabwe?,"SELECT Earnings FROM player WHERE Country = ""Australia"" OR Country = ""Zimbabwe""",soccer_3,"[{'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'name'}, {'col_name': 'country'}, {'col_name': 'earnings'}, {'col_name': 'events number'}, {'col_name': 'wins count'}, {'col_name': 'club id'}], 'foreign_key_columns': ['club id'], 'primary_keys': ['player id']}]" -"List the id, first name and last name of the customers who both have placed more than 2 orders and have bought at least 3 items.","SELECT T1.customer_id , T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) > 2 INTERSECT SELECT T1.customer_id , T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id JOIN Order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING count(*) >= 3",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" -"What are the ids, first and last names of the customers who have ordered more than twice and have bought at least 3 items?","SELECT T1.customer_id , T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) > 2 INTERSECT SELECT T1.customer_id , T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id JOIN Order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING count(*) >= 3",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" -"For the orders with any produts, how many products does each orders contain ? List the order id, status and the number.","SELECT T1.order_id , T1.order_status_code , count(*) FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id",e_commerce,"[{'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" -"For every order, how many products does it contain, and what are the orders' statuses and ids?","SELECT T1.order_id , T1.order_status_code , count(*) FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id",e_commerce,"[{'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" -List the dates of the orders which were placed at the earliest time or have more than 1 items.,SELECT min(date_order_placed) FROM Orders UNION SELECT T1.date_order_placed FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id HAVING count(*) > 1,e_commerce,"[{'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" -What are the dates of the earliest order and the dates of all orders with more than 1 item?,SELECT min(date_order_placed) FROM Orders UNION SELECT T1.date_order_placed FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id HAVING count(*) > 1,e_commerce,"[{'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +"List the id, first name and last name of the customers who both have placed more than 2 orders and have bought at least 3 items.","SELECT T1.customer_id , T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) > 2 INTERSECT SELECT T1.customer_id , T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id JOIN Order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING count(*) >= 3",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +"What are the ids, first and last names of the customers who have ordered more than twice and have bought at least 3 items?","SELECT T1.customer_id , T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) > 2 INTERSECT SELECT T1.customer_id , T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id JOIN Order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING count(*) >= 3",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +"For the orders with any produts, how many products does each orders contain ? List the order id, status and the number.","SELECT T1.order_id , T1.order_status_code , count(*) FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id",e_commerce,"[{'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +"For every order, how many products does it contain, and what are the orders' statuses and ids?","SELECT T1.order_id , T1.order_status_code , count(*) FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id",e_commerce,"[{'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +List the dates of the orders which were placed at the earliest time or have more than 1 items.,SELECT min(date_order_placed) FROM Orders UNION SELECT T1.date_order_placed FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id HAVING count(*) > 1,e_commerce,"[{'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +What are the dates of the earliest order and the dates of all orders with more than 1 item?,SELECT min(date_order_placed) FROM Orders UNION SELECT T1.date_order_placed FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id HAVING count(*) > 1,e_commerce,"[{'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" "Which customers did not make any orders? List the first name, middle initial and last name.","SELECT customer_first_name , customer_middle_initial , customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name , T1.customer_middle_initial , T1.customer_last_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" "WHat are the first and last names, and middle initials of all customers who did not make any orders?","SELECT customer_first_name , customer_middle_initial , customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name , T1.customer_middle_initial , T1.customer_last_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" -"What are the id, name, price and color of the products which have not been ordered for at least twice?","SELECT product_id , product_name , product_price , product_color FROM Products EXCEPT SELECT T1.product_id , T1.product_name , T1.product_price , T1.product_color FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T2.order_id = T3.order_id GROUP BY T1.product_id HAVING count(*) >= 2",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" -"What are the ids , names , prices , and colors of all products that have been listed in less than two orders ?","select t1.product_id , t1.product_name , t1.product_price , t1.product_color from products as t1 join order_items as t2 on t1.product_id = t2.product_id join orders as t3 on t2.order_id = t3.order_id group by t1.product_id having count(*) < 2",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" -Which orders have at least 2 products on it? List the order id and date.,"SELECT T1.order_id , T1.date_order_placed FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id HAVING count(*) >= 2",e_commerce,"[{'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" -What are the ids and dates of the orders with at least two products?,"SELECT T1.order_id , T1.date_order_placed FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id HAVING count(*) >= 2",e_commerce,"[{'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" -"Which product are listed in orders most frequently? List the id, product name and price.","SELECT T1.product_id , T1.product_name , T1.product_price FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_id ORDER BY count(*) DESC LIMIT 1",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" -"What are the ids, names, and prices of all products that are ordered most frequently?","SELECT T1.product_id , T1.product_name , T1.product_price FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_id ORDER BY count(*) DESC LIMIT 1",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" -Which order have the least sum of the product prices. List the order id and sum.,"SELECT T1.order_id , sum(T2.product_price) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id GROUP BY T1.order_id ORDER BY sum(T2.product_price) ASC LIMIT 1",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" -"What is the order that total cost the least , and how much is the total cost ?","select t1.order_id , sum(t2.product_price) from order_items as t1 join products as t2 on t1.product_id = t2.product_id group by t1.order_id order by sum(t2.product_price) asc limit 1",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" -What is the most popular payment method?,SELECT Payment_method_code FROM Customer_Payment_Methods GROUP BY Payment_method_code ORDER BY count(*) DESC LIMIT 1,e_commerce,[] -What is the payment method that most customers use?,SELECT Payment_method_code FROM Customer_Payment_Methods GROUP BY Payment_method_code ORDER BY count(*) DESC LIMIT 1,e_commerce,[] -How many number of products does each gender of customers buy? List the gender and the number,"SELECT T1.gender_code , count(*) FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id JOIN Order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.gender_code",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" -How many products does each gender buy?,"SELECT T1.gender_code , count(*) FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id JOIN Order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.gender_code",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +"What are the id, name, price and color of the products which have not been ordered for at least twice?","SELECT product_id , product_name , product_price , product_color FROM Products EXCEPT SELECT T1.product_id , T1.product_name , T1.product_price , T1.product_color FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T2.order_id = T3.order_id GROUP BY T1.product_id HAVING count(*) >= 2",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +"What are the ids , names , prices , and colors of all products that have been listed in less than two orders ?","select t1.product_id , t1.product_name , t1.product_price , t1.product_color from products as t1 join order_items as t2 on t1.product_id = t2.product_id join orders as t3 on t2.order_id = t3.order_id group by t1.product_id having count(*) < 2",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +Which orders have at least 2 products on it? List the order id and date.,"SELECT T1.order_id , T1.date_order_placed FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id HAVING count(*) >= 2",e_commerce,"[{'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +What are the ids and dates of the orders with at least two products?,"SELECT T1.order_id , T1.date_order_placed FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id HAVING count(*) >= 2",e_commerce,"[{'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +"Which product are listed in orders most frequently? List the id, product name and price.","SELECT T1.product_id , T1.product_name , T1.product_price FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_id ORDER BY count(*) DESC LIMIT 1",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +"What are the ids, names, and prices of all products that are ordered most frequently?","SELECT T1.product_id , T1.product_name , T1.product_price FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_id ORDER BY count(*) DESC LIMIT 1",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +Which order have the least sum of the product prices. List the order id and sum.,"SELECT T1.order_id , sum(T2.product_price) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id GROUP BY T1.order_id ORDER BY sum(T2.product_price) ASC LIMIT 1",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +"What is the order that total cost the least , and how much is the total cost ?","select t1.order_id , sum(t2.product_price) from order_items as t1 join products as t2 on t1.product_id = t2.product_id group by t1.order_id order by sum(t2.product_price) asc limit 1",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +What is the most popular payment method?,SELECT Payment_method_code FROM Customer_Payment_Methods GROUP BY Payment_method_code ORDER BY count(*) DESC LIMIT 1,e_commerce,"[{'table_name': 'customer payment methods', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'payment method code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': []}]" +What is the payment method that most customers use?,SELECT Payment_method_code FROM Customer_Payment_Methods GROUP BY Payment_method_code ORDER BY count(*) DESC LIMIT 1,e_commerce,"[{'table_name': 'customer payment methods', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'payment method code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': []}]" +How many number of products does each gender of customers buy? List the gender and the number,"SELECT T1.gender_code , count(*) FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id JOIN Order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.gender_code",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +How many products does each gender buy?,"SELECT T1.gender_code , count(*) FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id JOIN Order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.gender_code",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" How many orders has each gender of customers placed?,"SELECT T1.gender_code , count(*) FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.gender_code",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" How many orders has each gender placed?,"SELECT T1.gender_code , count(*) FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.gender_code",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" -"List the customers' first name, middle initial, last name and payment methods.","SELECT T1.customer_first_name , T1.customer_middle_initial , T1.customer_last_name , T2.Payment_method_code FROM Customers AS T1 JOIN Customer_Payment_Methods AS T2 ON T1.customer_id = T2.customer_id",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -"What are the first names, middle initials, last names, and payment methods of all customers?","SELECT T1.customer_first_name , T1.customer_middle_initial , T1.customer_last_name , T2.Payment_method_code FROM Customers AS T1 JOIN Customer_Payment_Methods AS T2 ON T1.customer_id = T2.customer_id",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" +"List the customers' first name, middle initial, last name and payment methods.","SELECT T1.customer_first_name , T1.customer_middle_initial , T1.customer_last_name , T2.Payment_method_code FROM Customers AS T1 JOIN Customer_Payment_Methods AS T2 ON T1.customer_id = T2.customer_id",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer payment methods', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'payment method code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': []}]" +"What are the first names, middle initials, last names, and payment methods of all customers?","SELECT T1.customer_first_name , T1.customer_middle_initial , T1.customer_last_name , T2.Payment_method_code FROM Customers AS T1 JOIN Customer_Payment_Methods AS T2 ON T1.customer_id = T2.customer_id",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer payment methods', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'payment method code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': []}]" "List the invoices' status, date and the date of shipment.","SELECT T1.invoice_status_code , T1.invoice_date , T2.shipment_date FROM Invoices AS T1 JOIN Shipments AS T2 ON T1.invoice_number = T2.invoice_number",e_commerce,"[{'table_name': 'invoices', 'table_schema': [{'col_name': 'invoice number'}, {'col_name': 'invoice status code'}, {'col_name': 'invoice date'}], 'foreign_key_columns': [], 'primary_keys': ['invoice number']}, {'table_name': 'shipments', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order id'}, {'col_name': 'invoice number'}, {'col_name': 'shipment tracking number'}, {'col_name': 'shipment date'}], 'foreign_key_columns': ['order id', 'invoice number'], 'primary_keys': ['shipment id']}]" "What are the statuses, dates, and shipment dates for all invoices?","SELECT T1.invoice_status_code , T1.invoice_date , T2.shipment_date FROM Invoices AS T1 JOIN Shipments AS T2 ON T1.invoice_number = T2.invoice_number",e_commerce,"[{'table_name': 'invoices', 'table_schema': [{'col_name': 'invoice number'}, {'col_name': 'invoice status code'}, {'col_name': 'invoice date'}], 'foreign_key_columns': [], 'primary_keys': ['invoice number']}, {'table_name': 'shipments', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order id'}, {'col_name': 'invoice number'}, {'col_name': 'shipment tracking number'}, {'col_name': 'shipment date'}], 'foreign_key_columns': ['order id', 'invoice number'], 'primary_keys': ['shipment id']}]" -List the names of the products being shipped and the corresponding shipment date.,"SELECT T1.product_name , T4.shipment_date FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id JOIN Shipment_Items AS T3 ON T2.order_item_id = T3.order_item_id JOIN Shipments AS T4 ON T3.shipment_id = T4.shipment_id",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'shipments', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order id'}, {'col_name': 'invoice number'}, {'col_name': 'shipment tracking number'}, {'col_name': 'shipment date'}], 'foreign_key_columns': ['order id', 'invoice number'], 'primary_keys': ['shipment id']}]" -"What are the names of the products tht have been shipped, and on what days were they shipped?","SELECT T1.product_name , T4.shipment_date FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id JOIN Shipment_Items AS T3 ON T2.order_item_id = T3.order_item_id JOIN Shipments AS T4 ON T3.shipment_id = T4.shipment_id",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'shipments', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order id'}, {'col_name': 'invoice number'}, {'col_name': 'shipment tracking number'}, {'col_name': 'shipment date'}], 'foreign_key_columns': ['order id', 'invoice number'], 'primary_keys': ['shipment id']}]" -What is the status code of the items being ordered and shipped and its corresponding shipment tracking number?,"SELECT T1.order_item_status_code , T3.shipment_tracking_number FROM Order_items AS T1 JOIN Shipment_Items AS T2 ON T1.order_item_id = T2.order_item_id JOIN Shipments AS T3 ON T2.shipment_id = T3.shipment_id",e_commerce,"[{'table_name': 'shipments', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order id'}, {'col_name': 'invoice number'}, {'col_name': 'shipment tracking number'}, {'col_name': 'shipment date'}], 'foreign_key_columns': ['order id', 'invoice number'], 'primary_keys': ['shipment id']}]" -"What is the status code of the items have been ordered and shipped, and also what are their shipment tracking numbers?","SELECT T1.order_item_status_code , T3.shipment_tracking_number FROM Order_items AS T1 JOIN Shipment_Items AS T2 ON T1.order_item_id = T2.order_item_id JOIN Shipments AS T3 ON T2.shipment_id = T3.shipment_id",e_commerce,"[{'table_name': 'shipments', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order id'}, {'col_name': 'invoice number'}, {'col_name': 'shipment tracking number'}, {'col_name': 'shipment date'}], 'foreign_key_columns': ['order id', 'invoice number'], 'primary_keys': ['shipment id']}]" -What is the product name and the color of the ordered items which have been shipped?,"SELECT T1.product_name , T1.product_color FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id JOIN Shipment_Items AS T3 ON T2.order_item_id = T3.order_item_id JOIN Shipments AS T4 ON T3.shipment_id = T4.shipment_id",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'shipments', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order id'}, {'col_name': 'invoice number'}, {'col_name': 'shipment tracking number'}, {'col_name': 'shipment date'}], 'foreign_key_columns': ['order id', 'invoice number'], 'primary_keys': ['shipment id']}]" -What are the names and colors of all products that have been shipped?,"SELECT T1.product_name , T1.product_color FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id JOIN Shipment_Items AS T3 ON T2.order_item_id = T3.order_item_id JOIN Shipments AS T4 ON T3.shipment_id = T4.shipment_id",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'shipments', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order id'}, {'col_name': 'invoice number'}, {'col_name': 'shipment tracking number'}, {'col_name': 'shipment date'}], 'foreign_key_columns': ['order id', 'invoice number'], 'primary_keys': ['shipment id']}]" -"List all the distinct product names, price and descriptions which are bought by female customers.","SELECT DISTINCT T1.product_name , T1.product_price , T1.product_description FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T2.order_id = T3.order_id JOIN Customers AS T4 ON T3.customer_id = T4.customer_id WHERE T4.gender_code = 'Female'",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" -"What are the different names, prices, and descriptions for all products bought by female customers?","SELECT DISTINCT T1.product_name , T1.product_price , T1.product_description FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T2.order_id = T3.order_id JOIN Customers AS T4 ON T3.customer_id = T4.customer_id WHERE T4.gender_code = 'Female'",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +List the names of the products being shipped and the corresponding shipment date.,"SELECT T1.product_name , T4.shipment_date FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id JOIN Shipment_Items AS T3 ON T2.order_item_id = T3.order_item_id JOIN Shipments AS T4 ON T3.shipment_id = T4.shipment_id",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}, {'table_name': 'shipments', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order id'}, {'col_name': 'invoice number'}, {'col_name': 'shipment tracking number'}, {'col_name': 'shipment date'}], 'foreign_key_columns': ['order id', 'invoice number'], 'primary_keys': ['shipment id']}, {'table_name': 'shipment items', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order item id'}], 'foreign_key_columns': ['order item id', 'shipment id'], 'primary_keys': ['shipment id']}]" +"What are the names of the products tht have been shipped, and on what days were they shipped?","SELECT T1.product_name , T4.shipment_date FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id JOIN Shipment_Items AS T3 ON T2.order_item_id = T3.order_item_id JOIN Shipments AS T4 ON T3.shipment_id = T4.shipment_id",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}, {'table_name': 'shipments', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order id'}, {'col_name': 'invoice number'}, {'col_name': 'shipment tracking number'}, {'col_name': 'shipment date'}], 'foreign_key_columns': ['order id', 'invoice number'], 'primary_keys': ['shipment id']}, {'table_name': 'shipment items', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order item id'}], 'foreign_key_columns': ['order item id', 'shipment id'], 'primary_keys': ['shipment id']}]" +What is the status code of the items being ordered and shipped and its corresponding shipment tracking number?,"SELECT T1.order_item_status_code , T3.shipment_tracking_number FROM Order_items AS T1 JOIN Shipment_Items AS T2 ON T1.order_item_id = T2.order_item_id JOIN Shipments AS T3 ON T2.shipment_id = T3.shipment_id",e_commerce,"[{'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}, {'table_name': 'shipments', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order id'}, {'col_name': 'invoice number'}, {'col_name': 'shipment tracking number'}, {'col_name': 'shipment date'}], 'foreign_key_columns': ['order id', 'invoice number'], 'primary_keys': ['shipment id']}, {'table_name': 'shipment items', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order item id'}], 'foreign_key_columns': ['order item id', 'shipment id'], 'primary_keys': ['shipment id']}]" +"What is the status code of the items have been ordered and shipped, and also what are their shipment tracking numbers?","SELECT T1.order_item_status_code , T3.shipment_tracking_number FROM Order_items AS T1 JOIN Shipment_Items AS T2 ON T1.order_item_id = T2.order_item_id JOIN Shipments AS T3 ON T2.shipment_id = T3.shipment_id",e_commerce,"[{'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}, {'table_name': 'shipments', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order id'}, {'col_name': 'invoice number'}, {'col_name': 'shipment tracking number'}, {'col_name': 'shipment date'}], 'foreign_key_columns': ['order id', 'invoice number'], 'primary_keys': ['shipment id']}, {'table_name': 'shipment items', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order item id'}], 'foreign_key_columns': ['order item id', 'shipment id'], 'primary_keys': ['shipment id']}]" +What is the product name and the color of the ordered items which have been shipped?,"SELECT T1.product_name , T1.product_color FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id JOIN Shipment_Items AS T3 ON T2.order_item_id = T3.order_item_id JOIN Shipments AS T4 ON T3.shipment_id = T4.shipment_id",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}, {'table_name': 'shipments', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order id'}, {'col_name': 'invoice number'}, {'col_name': 'shipment tracking number'}, {'col_name': 'shipment date'}], 'foreign_key_columns': ['order id', 'invoice number'], 'primary_keys': ['shipment id']}, {'table_name': 'shipment items', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order item id'}], 'foreign_key_columns': ['order item id', 'shipment id'], 'primary_keys': ['shipment id']}]" +What are the names and colors of all products that have been shipped?,"SELECT T1.product_name , T1.product_color FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id JOIN Shipment_Items AS T3 ON T2.order_item_id = T3.order_item_id JOIN Shipments AS T4 ON T3.shipment_id = T4.shipment_id",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}, {'table_name': 'shipments', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order id'}, {'col_name': 'invoice number'}, {'col_name': 'shipment tracking number'}, {'col_name': 'shipment date'}], 'foreign_key_columns': ['order id', 'invoice number'], 'primary_keys': ['shipment id']}, {'table_name': 'shipment items', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order item id'}], 'foreign_key_columns': ['order item id', 'shipment id'], 'primary_keys': ['shipment id']}]" +"List all the distinct product names, price and descriptions which are bought by female customers.","SELECT DISTINCT T1.product_name , T1.product_price , T1.product_description FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T2.order_id = T3.order_id JOIN Customers AS T4 ON T3.customer_id = T4.customer_id WHERE T4.gender_code = 'Female'",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +"What are the different names, prices, and descriptions for all products bought by female customers?","SELECT DISTINCT T1.product_name , T1.product_price , T1.product_description FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T2.order_id = T3.order_id JOIN Customers AS T4 ON T3.customer_id = T4.customer_id WHERE T4.gender_code = 'Female'",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" What are invoices status of all the orders which have not been shipped?,SELECT invoice_status_code FROM Invoices WHERE invoice_number NOT IN ( SELECT invoice_number FROM Shipments ),e_commerce,"[{'table_name': 'invoices', 'table_schema': [{'col_name': 'invoice number'}, {'col_name': 'invoice status code'}, {'col_name': 'invoice date'}], 'foreign_key_columns': [], 'primary_keys': ['invoice number']}, {'table_name': 'shipments', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order id'}, {'col_name': 'invoice number'}, {'col_name': 'shipment tracking number'}, {'col_name': 'shipment date'}], 'foreign_key_columns': ['order id', 'invoice number'], 'primary_keys': ['shipment id']}]" What are the invoice statuses for all orderes that have not been shipped out yet?,SELECT invoice_status_code FROM Invoices WHERE invoice_number NOT IN ( SELECT invoice_number FROM Shipments ),e_commerce,"[{'table_name': 'invoices', 'table_schema': [{'col_name': 'invoice number'}, {'col_name': 'invoice status code'}, {'col_name': 'invoice date'}], 'foreign_key_columns': [], 'primary_keys': ['invoice number']}, {'table_name': 'shipments', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order id'}, {'col_name': 'invoice number'}, {'col_name': 'shipment tracking number'}, {'col_name': 'shipment date'}], 'foreign_key_columns': ['order id', 'invoice number'], 'primary_keys': ['shipment id']}]" -"What are the total cost of all the orders ? List the order id , date , and total cost .","select t1.order_id , t1.date_order_placed , sum(t3.product_price) from orders as t1 join order_items as t2 on t1.order_id = t2.order_id join products as t3 on t2.product_id = t3.product_id group by t1.order_id",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" -"For each order, what is its id, date, and total amount paid?","SELECT T1.order_id , T1.date_order_placed , sum(T3.product_price) FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id JOIN Products AS T3 ON T2.product_id = T3.product_id GROUP BY T1.order_id",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +"What are the total cost of all the orders ? List the order id , date , and total cost .","select t1.order_id , t1.date_order_placed , sum(t3.product_price) from orders as t1 join order_items as t2 on t1.order_id = t2.order_id join products as t3 on t2.product_id = t3.product_id group by t1.order_id",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +"For each order, what is its id, date, and total amount paid?","SELECT T1.order_id , T1.date_order_placed , sum(T3.product_price) FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id JOIN Products AS T3 ON T2.product_id = T3.product_id GROUP BY T1.order_id",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" How many customers have placed any order?,SELECT count(DISTINCT customer_id) FROM Orders,e_commerce,"[{'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" How many different customers have ordered things?,SELECT count(DISTINCT customer_id) FROM Orders,e_commerce,"[{'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" -How many item states are there in the orders?,SELECT count(DISTINCT order_item_status_code) FROM Order_items,e_commerce,[] -How many different item status codes are there listed in ordered items?,SELECT count(DISTINCT order_item_status_code) FROM Order_items,e_commerce,[] -How many different payment methods are there?,SELECT count(DISTINCT Payment_method_code) FROM Customer_Payment_Methods,e_commerce,[] -How many different payment methods can customers choose from?,SELECT count(DISTINCT Payment_method_code) FROM Customer_Payment_Methods,e_commerce,[] +How many item states are there in the orders?,SELECT count(DISTINCT order_item_status_code) FROM Order_items,e_commerce,"[{'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +How many different item status codes are there listed in ordered items?,SELECT count(DISTINCT order_item_status_code) FROM Order_items,e_commerce,"[{'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +How many different payment methods are there?,SELECT count(DISTINCT Payment_method_code) FROM Customer_Payment_Methods,e_commerce,"[{'table_name': 'customer payment methods', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'payment method code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': []}]" +How many different payment methods can customers choose from?,SELECT count(DISTINCT Payment_method_code) FROM Customer_Payment_Methods,e_commerce,"[{'table_name': 'customer payment methods', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'payment method code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': []}]" What are the login names and passwords of the customers whose phone number have the prefix '+12'?,"SELECT login_name , login_password FROM Customers WHERE phone_number LIKE '+12%'",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" What are the usernames and passwords of all customers whose phone number starts with '+12'?,"SELECT login_name , login_password FROM Customers WHERE phone_number LIKE '+12%'",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" What are the product sizes of the products whose name has the substring 'Dell'?,SELECT product_size FROM Products WHERE product_name LIKE '%Dell%',e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" What are the sizes of all products whose name includes the word 'Dell'?,SELECT product_size FROM Products WHERE product_name LIKE '%Dell%',e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" What are the product price and the product size of the products whose price is above average?,"SELECT product_price , product_size FROM Products WHERE product_price > ( SELECT avg(product_price) FROM Products )",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" What are the prices and sizes of all products whose price is above the mean?,"SELECT product_price , product_size FROM Products WHERE product_price > ( SELECT avg(product_price) FROM Products )",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" -How many kinds of products have not been sold?,SELECT count(*) FROM Products WHERE product_id NOT IN ( SELECT product_id FROM Order_items ),e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" -What is the number of products that have not been ordered yet?,SELECT count(*) FROM Products WHERE product_id NOT IN ( SELECT product_id FROM Order_items ),e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" -How many customers do not have any payment method?,SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payment_Methods ),e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -How many customers do not have a listed payment method?,SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payment_Methods ),e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" +How many kinds of products have not been sold?,SELECT count(*) FROM Products WHERE product_id NOT IN ( SELECT product_id FROM Order_items ),e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +What is the number of products that have not been ordered yet?,SELECT count(*) FROM Products WHERE product_id NOT IN ( SELECT product_id FROM Order_items ),e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +How many customers do not have any payment method?,SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payment_Methods ),e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer payment methods', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'payment method code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': []}]" +How many customers do not have a listed payment method?,SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payment_Methods ),e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer payment methods', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'payment method code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': []}]" What are all the order status and all the dates of orders?,"SELECT order_status_code , date_order_placed FROM Orders",e_commerce,"[{'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" What are the status codes and dates placed for all of the orders?,"SELECT order_status_code , date_order_placed FROM Orders",e_commerce,"[{'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" "List the address, town and county information of the customers who live in the USA.","SELECT address_line_1 , town_city , county FROM Customers WHERE Country = 'USA'",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" "What are the addresses, towns, and county information for all customers who live in the United States?","SELECT address_line_1 , town_city , county FROM Customers WHERE Country = 'USA'",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -List all the pairs of buyer first names and product names.,"SELECT T1.customer_first_name , T4.product_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id JOIN Order_items AS T3 ON T2.order_id = T3.order_id JOIN Products AS T4 ON T3.product_id = T4.product_id",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" -What are the first names of all buyers and what products did they buy? List them in pairs.,"SELECT T1.customer_first_name , T4.product_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id JOIN Order_items AS T3 ON T2.order_id = T3.order_id JOIN Products AS T4 ON T3.product_id = T4.product_id",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" -How many items are shipped?,SELECT count(*) FROM Shipment_Items,e_commerce,[] -How many products have been shipped?,SELECT count(*) FROM Shipment_Items,e_commerce,[] +List all the pairs of buyer first names and product names.,"SELECT T1.customer_first_name , T4.product_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id JOIN Order_items AS T3 ON T2.order_id = T3.order_id JOIN Products AS T4 ON T3.product_id = T4.product_id",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +What are the first names of all buyers and what products did they buy? List them in pairs.,"SELECT T1.customer_first_name , T4.product_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id JOIN Order_items AS T3 ON T2.order_id = T3.order_id JOIN Products AS T4 ON T3.product_id = T4.product_id",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +How many items are shipped?,SELECT count(*) FROM Shipment_Items,e_commerce,"[{'table_name': 'shipment items', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order item id'}], 'foreign_key_columns': ['order item id', 'shipment id'], 'primary_keys': ['shipment id']}]" +How many products have been shipped?,SELECT count(*) FROM Shipment_Items,e_commerce,"[{'table_name': 'shipment items', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order item id'}], 'foreign_key_columns': ['order item id', 'shipment id'], 'primary_keys': ['shipment id']}]" What is the product average price?,SELECT avg(product_price) FROM Products,e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" How much do the products cost on average?,SELECT avg(product_price) FROM Products,e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" -What is the average price of the products being ordered?,SELECT avg(T1.product_price) FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id,e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" -What is the price of all products being ordered on average?,SELECT avg(T1.product_price) FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id,e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" +What is the average price of the products being ordered?,SELECT avg(T1.product_price) FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id,e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +What is the price of all products being ordered on average?,SELECT avg(T1.product_price) FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id,e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" "What are the email address, town and county of the customers who are of the least common gender?","SELECT email_address , town_city , county FROM Customers WHERE gender_code = ( SELECT gender_code FROM Customers GROUP BY gender_code ORDER BY count(*) ASC LIMIT 1 )",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" "What are the email addresses, cities, and counties listed for all cusomters who are from the gender that orders less often?","SELECT email_address , town_city , county FROM Customers WHERE gender_code = ( SELECT gender_code FROM Customers GROUP BY gender_code ORDER BY count(*) ASC LIMIT 1 )",e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -List the order date of the orders who are placed by customers with at least 2 payment methods.,SELECT date_order_placed FROM Orders WHERE customer_id IN ( SELECT T1.customer_id FROM Customers AS T1 JOIN Customer_Payment_Methods AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2 ),e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" -What is the date of all orders that have been placed by customers with at least 2 payment methods?,SELECT date_order_placed FROM Orders WHERE customer_id IN ( SELECT T1.customer_id FROM Customers AS T1 JOIN Customer_Payment_Methods AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2 ),e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +List the order date of the orders who are placed by customers with at least 2 payment methods.,SELECT date_order_placed FROM Orders WHERE customer_id IN ( SELECT T1.customer_id FROM Customers AS T1 JOIN Customer_Payment_Methods AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2 ),e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer payment methods', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'payment method code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': []}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +What is the date of all orders that have been placed by customers with at least 2 payment methods?,SELECT date_order_placed FROM Orders WHERE customer_id IN ( SELECT T1.customer_id FROM Customers AS T1 JOIN Customer_Payment_Methods AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2 ),e_commerce,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'gender code'}, {'col_name': 'customer first name'}, {'col_name': 'customer middle initial'}, {'col_name': 'customer last name'}, {'col_name': 'email address'}, {'col_name': 'login name'}, {'col_name': 'login password'}, {'col_name': 'phone number'}, {'col_name': 'address line 1'}, {'col_name': 'town city'}, {'col_name': 'county'}, {'col_name': 'country'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer payment methods', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'payment method code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': []}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" What is the most uncommon order status?,SELECT order_status_code FROM Orders GROUP BY order_status_code ORDER BY count(*) LIMIT 1,e_commerce,"[{'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" What is the least common order status?,SELECT order_status_code FROM Orders GROUP BY order_status_code ORDER BY count(*) LIMIT 1,e_commerce,"[{'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order status code'}, {'col_name': 'date order placed'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" -"For all the products sold for more than 3 times, list their id and description.","SELECT T1.product_id , T1.product_description FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_id HAVING count(*) > 3",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" -"For all products sold more than 3 times, what are their ids and descriptions?","SELECT T1.product_id , T1.product_description FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_id HAVING count(*) > 3",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" +"For all the products sold for more than 3 times, list their id and description.","SELECT T1.product_id , T1.product_description FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_id HAVING count(*) > 3",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" +"For all products sold more than 3 times, what are their ids and descriptions?","SELECT T1.product_id , T1.product_description FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_id HAVING count(*) > 3",e_commerce,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'parent product id'}, {'col_name': 'product name'}, {'col_name': 'product price'}, {'col_name': 'product color'}, {'col_name': 'product size'}, {'col_name': 'product description'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'product id'}, {'col_name': 'order id'}, {'col_name': 'order item status code'}], 'foreign_key_columns': ['order id', 'product id'], 'primary_keys': ['order item id']}]" List the invoice dates and ids of the invoices causing at least 2 shipments.,"SELECT T1.invoice_date , T1.invoice_number FROM Invoices AS T1 JOIN Shipments AS T2 ON T1.invoice_number = T2.invoice_number GROUP BY T1.invoice_number HAVING count(*) >= 2",e_commerce,"[{'table_name': 'invoices', 'table_schema': [{'col_name': 'invoice number'}, {'col_name': 'invoice status code'}, {'col_name': 'invoice date'}], 'foreign_key_columns': [], 'primary_keys': ['invoice number']}, {'table_name': 'shipments', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order id'}, {'col_name': 'invoice number'}, {'col_name': 'shipment tracking number'}, {'col_name': 'shipment date'}], 'foreign_key_columns': ['order id', 'invoice number'], 'primary_keys': ['shipment id']}]" What are the dates and ids of the invoices that are related to at least 2 shipments?,"SELECT T1.invoice_date , T1.invoice_number FROM Invoices AS T1 JOIN Shipments AS T2 ON T1.invoice_number = T2.invoice_number GROUP BY T1.invoice_number HAVING count(*) >= 2",e_commerce,"[{'table_name': 'invoices', 'table_schema': [{'col_name': 'invoice number'}, {'col_name': 'invoice status code'}, {'col_name': 'invoice date'}], 'foreign_key_columns': [], 'primary_keys': ['invoice number']}, {'table_name': 'shipments', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order id'}, {'col_name': 'invoice number'}, {'col_name': 'shipment tracking number'}, {'col_name': 'shipment date'}], 'foreign_key_columns': ['order id', 'invoice number'], 'primary_keys': ['shipment id']}]" what are all shipment tracking numbers and shipment dates?,"SELECT shipment_tracking_number , shipment_date FROM Shipments",e_commerce,"[{'table_name': 'shipments', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'order id'}, {'col_name': 'invoice number'}, {'col_name': 'shipment tracking number'}, {'col_name': 'shipment date'}], 'foreign_key_columns': ['order id', 'invoice number'], 'primary_keys': ['shipment id']}]" @@ -131,67 +131,67 @@ Find the name and website link of the channels that have more than one program., Find the number of programs for each channel. Return the name of each channel as well.,"SELECT t1.name , count(*) FROM channel AS t1 JOIN program AS t2 ON t1.channel_id = t2.channel_id GROUP BY t1.channel_id",bbc_channels,"[{'table_name': 'channel', 'table_schema': [{'col_name': 'channel id'}, {'col_name': 'name'}, {'col_name': 'analogue terrestrial channel'}, {'col_name': 'digital terrestrial channel'}, {'col_name': 'internet'}], 'foreign_key_columns': [], 'primary_keys': ['channel id']}, {'table_name': 'program', 'table_schema': [{'col_name': 'program id'}, {'col_name': 'start year'}, {'col_name': 'title'}, {'col_name': 'director id'}, {'col_name': 'channel id'}], 'foreign_key_columns': ['channel id', 'director id'], 'primary_keys': ['program id']}]" Find the number of channels that do not run any program.,SELECT count(*) FROM channel WHERE channel_id NOT IN (SELECT channel_id FROM program),bbc_channels,"[{'table_name': 'channel', 'table_schema': [{'col_name': 'channel id'}, {'col_name': 'name'}, {'col_name': 'analogue terrestrial channel'}, {'col_name': 'digital terrestrial channel'}, {'col_name': 'internet'}], 'foreign_key_columns': [], 'primary_keys': ['channel id']}, {'table_name': 'program', 'table_schema': [{'col_name': 'program id'}, {'col_name': 'start year'}, {'col_name': 'title'}, {'col_name': 'director id'}, {'col_name': 'channel id'}], 'foreign_key_columns': ['channel id', 'director id'], 'primary_keys': ['program id']}]" "What is the name of the director who is in the ""Dracula"" program?",SELECT t2.name FROM program AS t1 JOIN director AS t2 ON t1.director_id = t2.director_id WHERE t1.title = 'Dracula',bbc_channels,"[{'table_name': 'director', 'table_schema': [{'col_name': 'director id'}, {'col_name': 'name'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['director id']}, {'table_name': 'program', 'table_schema': [{'col_name': 'program id'}, {'col_name': 'start year'}, {'col_name': 'title'}, {'col_name': 'director id'}, {'col_name': 'channel id'}], 'foreign_key_columns': ['channel id', 'director id'], 'primary_keys': ['program id']}]" -Find the name and internet web of the channel that is directed by the most directors.,"SELECT t1.name , t1.internet FROM channel AS t1 JOIN director_admin AS t2 ON t1.channel_id = t2.channel_id GROUP BY t1.channel_id ORDER BY count(*) DESC LIMIT 1",bbc_channels,"[{'table_name': 'channel', 'table_schema': [{'col_name': 'channel id'}, {'col_name': 'name'}, {'col_name': 'analogue terrestrial channel'}, {'col_name': 'digital terrestrial channel'}, {'col_name': 'internet'}], 'foreign_key_columns': [], 'primary_keys': ['channel id']}]" +Find the name and internet web of the channel that is directed by the most directors.,"SELECT t1.name , t1.internet FROM channel AS t1 JOIN director_admin AS t2 ON t1.channel_id = t2.channel_id GROUP BY t1.channel_id ORDER BY count(*) DESC LIMIT 1",bbc_channels,"[{'table_name': 'channel', 'table_schema': [{'col_name': 'channel id'}, {'col_name': 'name'}, {'col_name': 'analogue terrestrial channel'}, {'col_name': 'digital terrestrial channel'}, {'col_name': 'internet'}], 'foreign_key_columns': [], 'primary_keys': ['channel id']}, {'table_name': 'director admin', 'table_schema': [{'col_name': 'director id'}, {'col_name': 'channel id'}, {'col_name': 'is first director'}], 'foreign_key_columns': ['channel id', 'director id'], 'primary_keys': ['director id']}]" Find the name of the directors whose age is between 30 and 60.,SELECT name FROM director WHERE age BETWEEN 30 AND 60,bbc_channels,"[{'table_name': 'director', 'table_schema': [{'col_name': 'director id'}, {'col_name': 'name'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['director id']}]" -give me the name of channels that have both a director younger than 40 and a director older than 60.,SELECT t1.name FROM channel AS t1 JOIN director_admin AS t2 ON t1.channel_id = t2.channel_id JOIN director AS t3 ON t2.director_id = t3.director_id WHERE t3.age < 40 INTERSECT SELECT t1.name FROM channel AS t1 JOIN director_admin AS t2 ON t1.channel_id = t2.channel_id JOIN director AS t3 ON t2.director_id = t3.director_id WHERE t3.age > 60,bbc_channels,"[{'table_name': 'channel', 'table_schema': [{'col_name': 'channel id'}, {'col_name': 'name'}, {'col_name': 'analogue terrestrial channel'}, {'col_name': 'digital terrestrial channel'}, {'col_name': 'internet'}], 'foreign_key_columns': [], 'primary_keys': ['channel id']}, {'table_name': 'director', 'table_schema': [{'col_name': 'director id'}, {'col_name': 'name'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['director id']}]" -Find the id and name of the channel that is not directed by Hank Baskett.,"SELECT t1.name , t1.channel_id FROM channel AS t1 JOIN director_admin AS t2 ON t1.channel_id = t2.channel_id JOIN director AS t3 ON t2.director_id = t3.director_id WHERE t3.name != ""Hank Baskett""",bbc_channels,"[{'table_name': 'channel', 'table_schema': [{'col_name': 'channel id'}, {'col_name': 'name'}, {'col_name': 'analogue terrestrial channel'}, {'col_name': 'digital terrestrial channel'}, {'col_name': 'internet'}], 'foreign_key_columns': [], 'primary_keys': ['channel id']}, {'table_name': 'director', 'table_schema': [{'col_name': 'director id'}, {'col_name': 'name'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['director id']}]" +give me the name of channels that have both a director younger than 40 and a director older than 60.,SELECT t1.name FROM channel AS t1 JOIN director_admin AS t2 ON t1.channel_id = t2.channel_id JOIN director AS t3 ON t2.director_id = t3.director_id WHERE t3.age < 40 INTERSECT SELECT t1.name FROM channel AS t1 JOIN director_admin AS t2 ON t1.channel_id = t2.channel_id JOIN director AS t3 ON t2.director_id = t3.director_id WHERE t3.age > 60,bbc_channels,"[{'table_name': 'channel', 'table_schema': [{'col_name': 'channel id'}, {'col_name': 'name'}, {'col_name': 'analogue terrestrial channel'}, {'col_name': 'digital terrestrial channel'}, {'col_name': 'internet'}], 'foreign_key_columns': [], 'primary_keys': ['channel id']}, {'table_name': 'director', 'table_schema': [{'col_name': 'director id'}, {'col_name': 'name'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['director id']}, {'table_name': 'director admin', 'table_schema': [{'col_name': 'director id'}, {'col_name': 'channel id'}, {'col_name': 'is first director'}], 'foreign_key_columns': ['channel id', 'director id'], 'primary_keys': ['director id']}]" +Find the id and name of the channel that is not directed by Hank Baskett.,"SELECT t1.name , t1.channel_id FROM channel AS t1 JOIN director_admin AS t2 ON t1.channel_id = t2.channel_id JOIN director AS t3 ON t2.director_id = t3.director_id WHERE t3.name != ""Hank Baskett""",bbc_channels,"[{'table_name': 'channel', 'table_schema': [{'col_name': 'channel id'}, {'col_name': 'name'}, {'col_name': 'analogue terrestrial channel'}, {'col_name': 'digital terrestrial channel'}, {'col_name': 'internet'}], 'foreign_key_columns': [], 'primary_keys': ['channel id']}, {'table_name': 'director', 'table_schema': [{'col_name': 'director id'}, {'col_name': 'name'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['director id']}, {'table_name': 'director admin', 'table_schema': [{'col_name': 'director id'}, {'col_name': 'channel id'}, {'col_name': 'is first director'}], 'foreign_key_columns': ['channel id', 'director id'], 'primary_keys': ['director id']}]" How many radios are there?,SELECT count(*) FROM radio,tv_shows,"[{'table_name': 'radio', 'table_schema': [{'col_name': 'radio id'}, {'col_name': 'transmitter'}, {'col_name': 'radio mhz'}, {'col_name': '2fm mhz'}, {'col_name': 'rnag mhz'}, {'col_name': 'lyric fm mhz'}, {'col_name': 'erp kw'}], 'foreign_key_columns': [], 'primary_keys': ['radio id']}]" List the transmitters of radios in ascending order of erp kw .,select transmitter from radio order by erp_kw asc,tv_shows,"[{'table_name': 'radio', 'table_schema': [{'col_name': 'radio id'}, {'col_name': 'transmitter'}, {'col_name': 'radio mhz'}, {'col_name': '2fm mhz'}, {'col_name': 'rnag mhz'}, {'col_name': 'lyric fm mhz'}, {'col_name': 'erp kw'}], 'foreign_key_columns': [], 'primary_keys': ['radio id']}]" -What are the names and original air dates of tv shows?,"SELECT tv_show_name , Original_Airdate FROM tv_show",tv_shows,[] -"List the station names of city channels whose affiliation is not ""ABC"".","SELECT Station_name FROM city_channel WHERE Affiliation != ""ABC""",tv_shows,[] +What are the names and original air dates of tv shows?,"SELECT tv_show_name , Original_Airdate FROM tv_show",tv_shows,"[{'table_name': 'tv show', 'table_schema': [{'col_name': 'tv show id'}, {'col_name': 'tv show name'}, {'col_name': 'sub tittle'}, {'col_name': 'next show name'}, {'col_name': 'original airdate'}], 'foreign_key_columns': [], 'primary_keys': ['tv show id']}]" +"List the station names of city channels whose affiliation is not ""ABC"".","SELECT Station_name FROM city_channel WHERE Affiliation != ""ABC""",tv_shows,"[{'table_name': 'city channel', 'table_schema': [{'col_name': 'id'}, {'col_name': 'city'}, {'col_name': 'station name'}, {'col_name': 'owned since'}, {'col_name': 'affiliation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" Show the transmitters of radios whose ERP is bigger than 150 or smaller than 30.,SELECT Transmitter FROM radio WHERE ERP_kW > 150 OR ERP_kW < 30,tv_shows,"[{'table_name': 'radio', 'table_schema': [{'col_name': 'radio id'}, {'col_name': 'transmitter'}, {'col_name': 'radio mhz'}, {'col_name': '2fm mhz'}, {'col_name': 'rnag mhz'}, {'col_name': 'lyric fm mhz'}, {'col_name': 'erp kw'}], 'foreign_key_columns': [], 'primary_keys': ['radio id']}]" What is the transmitter of the radio with the largest ERP_kW?,SELECT Transmitter FROM radio ORDER BY ERP_kW DESC LIMIT 1,tv_shows,"[{'table_name': 'radio', 'table_schema': [{'col_name': 'radio id'}, {'col_name': 'transmitter'}, {'col_name': 'radio mhz'}, {'col_name': '2fm mhz'}, {'col_name': 'rnag mhz'}, {'col_name': 'lyric fm mhz'}, {'col_name': 'erp kw'}], 'foreign_key_columns': [], 'primary_keys': ['radio id']}]" What is the average ERP across all radios?,SELECT avg(ERP_kW) FROM radio,tv_shows,"[{'table_name': 'radio', 'table_schema': [{'col_name': 'radio id'}, {'col_name': 'transmitter'}, {'col_name': 'radio mhz'}, {'col_name': '2fm mhz'}, {'col_name': 'rnag mhz'}, {'col_name': 'lyric fm mhz'}, {'col_name': 'erp kw'}], 'foreign_key_columns': [], 'primary_keys': ['radio id']}]" -Show the different affiliations of city channels and the number of city channels with each affiliation.,"SELECT Affiliation , COUNT(*) FROM city_channel GROUP BY Affiliation",tv_shows,[] -Please show the most common affiliation for city channels.,SELECT Affiliation FROM city_channel GROUP BY Affiliation ORDER BY COUNT(*) DESC LIMIT 1,tv_shows,[] -List the affiliations shared by more than three city channels.,SELECT Affiliation FROM city_channel GROUP BY Affiliation HAVING COUNT(*) > 3,tv_shows,[] -Show the cities and station names of city channels in ascending alphabetical order of station name.,"SELECT City , Station_name FROM city_channel ORDER BY Station_name ASC",tv_shows,[] -Show the transmitters of radios and the cities of the channels they are associated with.,"SELECT T3.Transmitter , T2.City FROM city_channel_radio AS T1 JOIN city_channel AS T2 ON T1.City_channel_ID = T2.ID JOIN radio AS T3 ON T1.Radio_ID = T3.Radio_ID",tv_shows,"[{'table_name': 'radio', 'table_schema': [{'col_name': 'radio id'}, {'col_name': 'transmitter'}, {'col_name': 'radio mhz'}, {'col_name': '2fm mhz'}, {'col_name': 'rnag mhz'}, {'col_name': 'lyric fm mhz'}, {'col_name': 'erp kw'}], 'foreign_key_columns': [], 'primary_keys': ['radio id']}]" -Show the transmitters of radios and the station names of the channels they are associated with in descending order of the ERP of the radios.,"SELECT T3.Transmitter , T2.Station_name FROM city_channel_radio AS T1 JOIN city_channel AS T2 ON T1.City_channel_ID = T2.ID JOIN radio AS T3 ON T1.Radio_ID = T3.Radio_ID ORDER BY T3.ERP_kW DESC",tv_shows,"[{'table_name': 'radio', 'table_schema': [{'col_name': 'radio id'}, {'col_name': 'transmitter'}, {'col_name': 'radio mhz'}, {'col_name': '2fm mhz'}, {'col_name': 'rnag mhz'}, {'col_name': 'lyric fm mhz'}, {'col_name': 'erp kw'}], 'foreign_key_columns': [], 'primary_keys': ['radio id']}]" -Show the transmitters of the radios and the number of city channels they are associated with.,"SELECT T2.Transmitter , COUNT(*) FROM city_channel_radio AS T1 JOIN radio AS T2 ON T1.Radio_ID = T2.Radio_ID GROUP BY T2.Transmitter",tv_shows,"[{'table_name': 'radio', 'table_schema': [{'col_name': 'radio id'}, {'col_name': 'transmitter'}, {'col_name': 'radio mhz'}, {'col_name': '2fm mhz'}, {'col_name': 'rnag mhz'}, {'col_name': 'lyric fm mhz'}, {'col_name': 'erp kw'}], 'foreign_key_columns': [], 'primary_keys': ['radio id']}]" -Show the distinct transmitters of radios that are not associated with any city channel.,SELECT Transmitter FROM radio WHERE Radio_ID NOT IN (SELECT Radio_ID FROM city_channel_radio),tv_shows,"[{'table_name': 'radio', 'table_schema': [{'col_name': 'radio id'}, {'col_name': 'transmitter'}, {'col_name': 'radio mhz'}, {'col_name': '2fm mhz'}, {'col_name': 'rnag mhz'}, {'col_name': 'lyric fm mhz'}, {'col_name': 'erp kw'}], 'foreign_key_columns': [], 'primary_keys': ['radio id']}]" +Show the different affiliations of city channels and the number of city channels with each affiliation.,"SELECT Affiliation , COUNT(*) FROM city_channel GROUP BY Affiliation",tv_shows,"[{'table_name': 'city channel', 'table_schema': [{'col_name': 'id'}, {'col_name': 'city'}, {'col_name': 'station name'}, {'col_name': 'owned since'}, {'col_name': 'affiliation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" +Please show the most common affiliation for city channels.,SELECT Affiliation FROM city_channel GROUP BY Affiliation ORDER BY COUNT(*) DESC LIMIT 1,tv_shows,"[{'table_name': 'city channel', 'table_schema': [{'col_name': 'id'}, {'col_name': 'city'}, {'col_name': 'station name'}, {'col_name': 'owned since'}, {'col_name': 'affiliation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" +List the affiliations shared by more than three city channels.,SELECT Affiliation FROM city_channel GROUP BY Affiliation HAVING COUNT(*) > 3,tv_shows,"[{'table_name': 'city channel', 'table_schema': [{'col_name': 'id'}, {'col_name': 'city'}, {'col_name': 'station name'}, {'col_name': 'owned since'}, {'col_name': 'affiliation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" +Show the cities and station names of city channels in ascending alphabetical order of station name.,"SELECT City , Station_name FROM city_channel ORDER BY Station_name ASC",tv_shows,"[{'table_name': 'city channel', 'table_schema': [{'col_name': 'id'}, {'col_name': 'city'}, {'col_name': 'station name'}, {'col_name': 'owned since'}, {'col_name': 'affiliation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" +Show the transmitters of radios and the cities of the channels they are associated with.,"SELECT T3.Transmitter , T2.City FROM city_channel_radio AS T1 JOIN city_channel AS T2 ON T1.City_channel_ID = T2.ID JOIN radio AS T3 ON T1.Radio_ID = T3.Radio_ID",tv_shows,"[{'table_name': 'city channel', 'table_schema': [{'col_name': 'id'}, {'col_name': 'city'}, {'col_name': 'station name'}, {'col_name': 'owned since'}, {'col_name': 'affiliation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'radio', 'table_schema': [{'col_name': 'radio id'}, {'col_name': 'transmitter'}, {'col_name': 'radio mhz'}, {'col_name': '2fm mhz'}, {'col_name': 'rnag mhz'}, {'col_name': 'lyric fm mhz'}, {'col_name': 'erp kw'}], 'foreign_key_columns': [], 'primary_keys': ['radio id']}, {'table_name': 'city channel radio', 'table_schema': [{'col_name': 'city channel id'}, {'col_name': 'radio id'}, {'col_name': 'is online'}], 'foreign_key_columns': ['radio id', 'city channel id'], 'primary_keys': ['city channel id']}]" +Show the transmitters of radios and the station names of the channels they are associated with in descending order of the ERP of the radios.,"SELECT T3.Transmitter , T2.Station_name FROM city_channel_radio AS T1 JOIN city_channel AS T2 ON T1.City_channel_ID = T2.ID JOIN radio AS T3 ON T1.Radio_ID = T3.Radio_ID ORDER BY T3.ERP_kW DESC",tv_shows,"[{'table_name': 'city channel', 'table_schema': [{'col_name': 'id'}, {'col_name': 'city'}, {'col_name': 'station name'}, {'col_name': 'owned since'}, {'col_name': 'affiliation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'radio', 'table_schema': [{'col_name': 'radio id'}, {'col_name': 'transmitter'}, {'col_name': 'radio mhz'}, {'col_name': '2fm mhz'}, {'col_name': 'rnag mhz'}, {'col_name': 'lyric fm mhz'}, {'col_name': 'erp kw'}], 'foreign_key_columns': [], 'primary_keys': ['radio id']}, {'table_name': 'city channel radio', 'table_schema': [{'col_name': 'city channel id'}, {'col_name': 'radio id'}, {'col_name': 'is online'}], 'foreign_key_columns': ['radio id', 'city channel id'], 'primary_keys': ['city channel id']}]" +Show the transmitters of the radios and the number of city channels they are associated with.,"SELECT T2.Transmitter , COUNT(*) FROM city_channel_radio AS T1 JOIN radio AS T2 ON T1.Radio_ID = T2.Radio_ID GROUP BY T2.Transmitter",tv_shows,"[{'table_name': 'radio', 'table_schema': [{'col_name': 'radio id'}, {'col_name': 'transmitter'}, {'col_name': 'radio mhz'}, {'col_name': '2fm mhz'}, {'col_name': 'rnag mhz'}, {'col_name': 'lyric fm mhz'}, {'col_name': 'erp kw'}], 'foreign_key_columns': [], 'primary_keys': ['radio id']}, {'table_name': 'city channel radio', 'table_schema': [{'col_name': 'city channel id'}, {'col_name': 'radio id'}, {'col_name': 'is online'}], 'foreign_key_columns': ['radio id', 'city channel id'], 'primary_keys': ['city channel id']}]" +Show the distinct transmitters of radios that are not associated with any city channel.,SELECT Transmitter FROM radio WHERE Radio_ID NOT IN (SELECT Radio_ID FROM city_channel_radio),tv_shows,"[{'table_name': 'radio', 'table_schema': [{'col_name': 'radio id'}, {'col_name': 'transmitter'}, {'col_name': 'radio mhz'}, {'col_name': '2fm mhz'}, {'col_name': 'rnag mhz'}, {'col_name': 'lyric fm mhz'}, {'col_name': 'erp kw'}], 'foreign_key_columns': [], 'primary_keys': ['radio id']}, {'table_name': 'city channel radio', 'table_schema': [{'col_name': 'city channel id'}, {'col_name': 'radio id'}, {'col_name': 'is online'}], 'foreign_key_columns': ['radio id', 'city channel id'], 'primary_keys': ['city channel id']}]" What is the model of the vehicle with maximum top speed whose power is higher than 6000?,SELECT model FROM vehicle WHERE power > 6000 ORDER BY top_speed DESC LIMIT 1,vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" "Of vehicles with power over 6000, return the model of the vehicle with the greatest top speed.",SELECT model FROM vehicle WHERE power > 6000 ORDER BY top_speed DESC LIMIT 1,vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" What are the names of the drivers who are citizens of the 'United States'?,SELECT name FROM driver WHERE citizenship = 'United States',vehicle_driver,"[{'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" Return the names of drivers with citizenship from the United States.,SELECT name FROM driver WHERE citizenship = 'United States',vehicle_driver,"[{'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" -"How many vehicles has a driver driven at most, and what is the driver id of the driver who has driven this many vehicles?","SELECT count(*) , driver_id FROM vehicle_driver GROUP BY driver_id ORDER BY count(*) DESC LIMIT 1",vehicle_driver,[] -"What is the id of the driver who has driven the most vehicles, and how many vehicles is this?","SELECT count(*) , driver_id FROM vehicle_driver GROUP BY driver_id ORDER BY count(*) DESC LIMIT 1",vehicle_driver,[] +"How many vehicles has a driver driven at most, and what is the driver id of the driver who has driven this many vehicles?","SELECT count(*) , driver_id FROM vehicle_driver GROUP BY driver_id ORDER BY count(*) DESC LIMIT 1",vehicle_driver,"[{'table_name': 'vehicle driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'vehicle id'}], 'foreign_key_columns': ['vehicle id', 'driver id'], 'primary_keys': ['driver id']}]" +"What is the id of the driver who has driven the most vehicles, and how many vehicles is this?","SELECT count(*) , driver_id FROM vehicle_driver GROUP BY driver_id ORDER BY count(*) DESC LIMIT 1",vehicle_driver,"[{'table_name': 'vehicle driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'vehicle id'}], 'foreign_key_columns': ['vehicle id', 'driver id'], 'primary_keys': ['driver id']}]" What is the maximum and average power for the vehicles manufactured by 'Zhuzhou'?,"SELECT max(power) , avg(power) FROM vehicle WHERE builder = 'Zhuzhou'",vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" Return the maximum and average power for the vehicles built by Zhuzhou.,"SELECT max(power) , avg(power) FROM vehicle WHERE builder = 'Zhuzhou'",vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" -What is the id of the vehicle driven for the least times for the vehicles ever used?,SELECT vehicle_id FROM vehicle_driver GROUP BY vehicle_id ORDER BY count(*) ASC LIMIT 1,vehicle_driver,[] -Return the id of the vehicle that has been driven the fewest times.,SELECT vehicle_id FROM vehicle_driver GROUP BY vehicle_id ORDER BY count(*) ASC LIMIT 1,vehicle_driver,[] +What is the id of the vehicle driven for the least times for the vehicles ever used?,SELECT vehicle_id FROM vehicle_driver GROUP BY vehicle_id ORDER BY count(*) ASC LIMIT 1,vehicle_driver,"[{'table_name': 'vehicle driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'vehicle id'}], 'foreign_key_columns': ['vehicle id', 'driver id'], 'primary_keys': ['driver id']}]" +Return the id of the vehicle that has been driven the fewest times.,SELECT vehicle_id FROM vehicle_driver GROUP BY vehicle_id ORDER BY count(*) ASC LIMIT 1,vehicle_driver,"[{'table_name': 'vehicle driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'vehicle id'}], 'foreign_key_columns': ['vehicle id', 'driver id'], 'primary_keys': ['driver id']}]" What is the top speed and power of the vehicle manufactured in the year of 1996?,"SELECT top_speed , power FROM vehicle WHERE build_year = 1996",vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" Return the top speed and power of the vehicle that was built in the year 1996.,"SELECT top_speed , power FROM vehicle WHERE build_year = 1996",vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" "What are the build year, model name and builder of the vehicles?","SELECT build_year , model , builder FROM vehicle",vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" "Give the build year, model, and builder of each vehicle.","SELECT build_year , model , builder FROM vehicle",vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" -How many drivers have driven vehicles built in 2012?,SELECT count(DISTINCT T1.driver_id) FROM vehicle_driver AS T1 JOIN vehicle AS T2 ON T1.vehicle_id = T2.vehicle_id WHERE T2.build_year = 2012,vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" -Count the number of different drivers who have driven vehicles built in 2012.,SELECT count(DISTINCT T1.driver_id) FROM vehicle_driver AS T1 JOIN vehicle AS T2 ON T1.vehicle_id = T2.vehicle_id WHERE T2.build_year = 2012,vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" +How many drivers have driven vehicles built in 2012?,SELECT count(DISTINCT T1.driver_id) FROM vehicle_driver AS T1 JOIN vehicle AS T2 ON T1.vehicle_id = T2.vehicle_id WHERE T2.build_year = 2012,vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}, {'table_name': 'vehicle driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'vehicle id'}], 'foreign_key_columns': ['vehicle id', 'driver id'], 'primary_keys': ['driver id']}]" +Count the number of different drivers who have driven vehicles built in 2012.,SELECT count(DISTINCT T1.driver_id) FROM vehicle_driver AS T1 JOIN vehicle AS T2 ON T1.vehicle_id = T2.vehicle_id WHERE T2.build_year = 2012,vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}, {'table_name': 'vehicle driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'vehicle id'}], 'foreign_key_columns': ['vehicle id', 'driver id'], 'primary_keys': ['driver id']}]" How many drivers have raced in 'NASCAR'?,SELECT count(*) FROM driver WHERE Racing_Series = 'NASCAR',vehicle_driver,"[{'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" Count the number of drivers who have raced in NASCAR.,SELECT count(*) FROM driver WHERE Racing_Series = 'NASCAR',vehicle_driver,"[{'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" What is the average top speed of vehicles?,SELECT avg(top_speed) FROM vehicle,vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" Return the average top speed across all vehicles.,SELECT avg(top_speed) FROM vehicle,vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" -What are the distinct driver names who have driven vehicles with power more than 5000 ?,select distinct t1.name from driver as t1 join vehicle_driver as t2 on t1.driver_id = t2.driver_id join vehicle as t3 on t2.vehicle_id = t3.vehicle_id where t3.power > 5000,vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}, {'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" -Return the names of drivers who have driven vehicles with power over 5000.,SELECT DISTINCT T1.Name FROM driver AS T1 JOIN vehicle_driver AS T2 ON T1.driver_id = T2.driver_id JOIN vehicle AS T3 ON T2.vehicle_id = T3.vehicle_id WHERE T3.power > 5000,vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}, {'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" +What are the distinct driver names who have driven vehicles with power more than 5000 ?,select distinct t1.name from driver as t1 join vehicle_driver as t2 on t1.driver_id = t2.driver_id join vehicle as t3 on t2.vehicle_id = t3.vehicle_id where t3.power > 5000,vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}, {'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}, {'table_name': 'vehicle driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'vehicle id'}], 'foreign_key_columns': ['vehicle id', 'driver id'], 'primary_keys': ['driver id']}]" +Return the names of drivers who have driven vehicles with power over 5000.,SELECT DISTINCT T1.Name FROM driver AS T1 JOIN vehicle_driver AS T2 ON T1.driver_id = T2.driver_id JOIN vehicle AS T3 ON T2.vehicle_id = T3.vehicle_id WHERE T3.power > 5000,vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}, {'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}, {'table_name': 'vehicle driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'vehicle id'}], 'foreign_key_columns': ['vehicle id', 'driver id'], 'primary_keys': ['driver id']}]" Which car models have total production larger than 100 or top speed higher than 150?,SELECT model FROM vehicle WHERE total_production > 100 OR top_speed > 150,vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" Give the models of cars that have a total production of over 100 or a top speed over 150.,SELECT model FROM vehicle WHERE total_production > 100 OR top_speed > 150,vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" What are the model names and build year of the cars with 'DJ' in its model name?,"SELECT model , build_year FROM vehicle WHERE model LIKE '%DJ%'",vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" "Return the model and build year of cars that include ""DJ"" in their model names.","SELECT model , build_year FROM vehicle WHERE model LIKE '%DJ%'",vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" -What are the models which have not been driven by any drivers?,SELECT model FROM vehicle EXCEPT SELECT T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id = T2.vehicle_id,vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" -Return the models of vehicles that have never been driven.,SELECT model FROM vehicle EXCEPT SELECT T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id = T2.vehicle_id,vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" -What are the vehicle ids and models of the vehicle which have been driven by two drivers or been manufactured by 'Ziyang'.,"SELECT T1.vehicle_id , T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id = T2.vehicle_id GROUP BY T2.vehicle_id HAVING count(*) = 2 OR T1.builder = 'Ziyang'",vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" -Return the ids and models of vehicles that have been driven by exactly two drivers or built by Ziyang.,"SELECT T1.vehicle_id , T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id = T2.vehicle_id GROUP BY T2.vehicle_id HAVING count(*) = 2 OR T1.builder = 'Ziyang'",vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" -What are the vehicle ids and models which have been driven by more than 2 drivers or been driven by the driver named 'Jeff Gordon'?,"SELECT T1.vehicle_id , T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id = T2.vehicle_id JOIN driver AS T3 ON T2.driver_id = T3.driver_id WHERE T3.name = 'Jeff Gordon' UNION SELECT T1.vehicle_id , T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id = T2.vehicle_id GROUP BY T2.vehicle_id HAVING count(*) > 2",vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}, {'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" -Return the ids and models of vehicles that have been driven by more than 2 drivers or been driven by the Jeff Gordon.,"SELECT T1.vehicle_id , T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id = T2.vehicle_id JOIN driver AS T3 ON T2.driver_id = T3.driver_id WHERE T3.name = 'Jeff Gordon' UNION SELECT T1.vehicle_id , T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id = T2.vehicle_id GROUP BY T2.vehicle_id HAVING count(*) > 2",vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}, {'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" +What are the models which have not been driven by any drivers?,SELECT model FROM vehicle EXCEPT SELECT T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id = T2.vehicle_id,vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}, {'table_name': 'vehicle driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'vehicle id'}], 'foreign_key_columns': ['vehicle id', 'driver id'], 'primary_keys': ['driver id']}]" +Return the models of vehicles that have never been driven.,SELECT model FROM vehicle EXCEPT SELECT T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id = T2.vehicle_id,vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}, {'table_name': 'vehicle driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'vehicle id'}], 'foreign_key_columns': ['vehicle id', 'driver id'], 'primary_keys': ['driver id']}]" +What are the vehicle ids and models of the vehicle which have been driven by two drivers or been manufactured by 'Ziyang'.,"SELECT T1.vehicle_id , T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id = T2.vehicle_id GROUP BY T2.vehicle_id HAVING count(*) = 2 OR T1.builder = 'Ziyang'",vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}, {'table_name': 'vehicle driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'vehicle id'}], 'foreign_key_columns': ['vehicle id', 'driver id'], 'primary_keys': ['driver id']}]" +Return the ids and models of vehicles that have been driven by exactly two drivers or built by Ziyang.,"SELECT T1.vehicle_id , T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id = T2.vehicle_id GROUP BY T2.vehicle_id HAVING count(*) = 2 OR T1.builder = 'Ziyang'",vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}, {'table_name': 'vehicle driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'vehicle id'}], 'foreign_key_columns': ['vehicle id', 'driver id'], 'primary_keys': ['driver id']}]" +What are the vehicle ids and models which have been driven by more than 2 drivers or been driven by the driver named 'Jeff Gordon'?,"SELECT T1.vehicle_id , T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id = T2.vehicle_id JOIN driver AS T3 ON T2.driver_id = T3.driver_id WHERE T3.name = 'Jeff Gordon' UNION SELECT T1.vehicle_id , T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id = T2.vehicle_id GROUP BY T2.vehicle_id HAVING count(*) > 2",vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}, {'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}, {'table_name': 'vehicle driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'vehicle id'}], 'foreign_key_columns': ['vehicle id', 'driver id'], 'primary_keys': ['driver id']}]" +Return the ids and models of vehicles that have been driven by more than 2 drivers or been driven by the Jeff Gordon.,"SELECT T1.vehicle_id , T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id = T2.vehicle_id JOIN driver AS T3 ON T2.driver_id = T3.driver_id WHERE T3.name = 'Jeff Gordon' UNION SELECT T1.vehicle_id , T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id = T2.vehicle_id GROUP BY T2.vehicle_id HAVING count(*) > 2",vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}, {'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}, {'table_name': 'vehicle driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'vehicle id'}], 'foreign_key_columns': ['vehicle id', 'driver id'], 'primary_keys': ['driver id']}]" How many vehicles have maximum top speed?,SELECT count(*) FROM vehicle WHERE top_speed = (SELECT max(top_speed) FROM vehicle),vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" Count the number of vehicles that have a top speed equal to the maximum across all vehicles.,SELECT count(*) FROM vehicle WHERE top_speed = (SELECT max(top_speed) FROM vehicle),vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}]" Show all driver names in the alphabetical order.,SELECT name FROM driver ORDER BY name,vehicle_driver,"[{'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" "What are the names of drivers, returned in alphbetical order?",SELECT name FROM driver ORDER BY name,vehicle_driver,"[{'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" How many drivers have been racing in each racing series?,"SELECT count(*) , racing_series FROM driver GROUP BY racing_series",vehicle_driver,"[{'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" Count the number of drivers that have raced in each series.,"SELECT count(*) , racing_series FROM driver GROUP BY racing_series",vehicle_driver,"[{'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" -What are the name and citizenship of the drivers who have driven the vehicle model 'DJ1'?,"SELECT T1.name , T1.citizenship FROM driver AS T1 JOIN vehicle_driver AS T2 ON T1.driver_id = T2.driver_id JOIN vehicle AS T3 ON T2.vehicle_id = T3.vehicle_id WHERE T3.model = 'DJ1'",vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}, {'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" -Return the names and citizenships of drivers who have driven the vehicle with the model 'DJ1'.,"SELECT T1.name , T1.citizenship FROM driver AS T1 JOIN vehicle_driver AS T2 ON T1.driver_id = T2.driver_id JOIN vehicle AS T3 ON T2.vehicle_id = T3.vehicle_id WHERE T3.model = 'DJ1'",vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}, {'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" -How many drivers have not driven any cars?,SELECT count(*) FROM driver WHERE driver_id NOT IN ( SELECT driver_id FROM vehicle_driver ),vehicle_driver,"[{'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" -Count the number of drivers who have not driven any vehicles.,SELECT count(*) FROM driver WHERE driver_id NOT IN ( SELECT driver_id FROM vehicle_driver ),vehicle_driver,"[{'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" +What are the name and citizenship of the drivers who have driven the vehicle model 'DJ1'?,"SELECT T1.name , T1.citizenship FROM driver AS T1 JOIN vehicle_driver AS T2 ON T1.driver_id = T2.driver_id JOIN vehicle AS T3 ON T2.vehicle_id = T3.vehicle_id WHERE T3.model = 'DJ1'",vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}, {'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}, {'table_name': 'vehicle driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'vehicle id'}], 'foreign_key_columns': ['vehicle id', 'driver id'], 'primary_keys': ['driver id']}]" +Return the names and citizenships of drivers who have driven the vehicle with the model 'DJ1'.,"SELECT T1.name , T1.citizenship FROM driver AS T1 JOIN vehicle_driver AS T2 ON T1.driver_id = T2.driver_id JOIN vehicle AS T3 ON T2.vehicle_id = T3.vehicle_id WHERE T3.model = 'DJ1'",vehicle_driver,"[{'table_name': 'vehicle', 'table_schema': [{'col_name': 'vehicle id'}, {'col_name': 'model'}, {'col_name': 'build year'}, {'col_name': 'top speed'}, {'col_name': 'power'}, {'col_name': 'builder'}, {'col_name': 'total production'}], 'foreign_key_columns': [], 'primary_keys': ['vehicle id']}, {'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}, {'table_name': 'vehicle driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'vehicle id'}], 'foreign_key_columns': ['vehicle id', 'driver id'], 'primary_keys': ['driver id']}]" +How many drivers have not driven any cars?,SELECT count(*) FROM driver WHERE driver_id NOT IN ( SELECT driver_id FROM vehicle_driver ),vehicle_driver,"[{'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}, {'table_name': 'vehicle driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'vehicle id'}], 'foreign_key_columns': ['vehicle id', 'driver id'], 'primary_keys': ['driver id']}]" +Count the number of drivers who have not driven any vehicles.,SELECT count(*) FROM driver WHERE driver_id NOT IN ( SELECT driver_id FROM vehicle_driver ),vehicle_driver,"[{'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'name'}, {'col_name': 'citizenship'}, {'col_name': 'racing series'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}, {'table_name': 'vehicle driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'vehicle id'}], 'foreign_key_columns': ['vehicle id', 'driver id'], 'primary_keys': ['driver id']}]" How many exams are there?,SELECT count(*) FROM Exams,online_exams,"[{'table_name': 'exams', 'table_schema': [{'col_name': 'exam id'}, {'col_name': 'subject code'}, {'col_name': 'exam date'}, {'col_name': 'exam name'}], 'foreign_key_columns': [], 'primary_keys': ['exam id']}]" Count the number of exams.,SELECT count(*) FROM Exams,online_exams,"[{'table_name': 'exams', 'table_schema': [{'col_name': 'exam id'}, {'col_name': 'subject code'}, {'col_name': 'exam date'}, {'col_name': 'exam name'}], 'foreign_key_columns': [], 'primary_keys': ['exam id']}]" List the distinct subject code of exams in ascending alphabetical order .,select distinct subject_code from exams order by subject_code asc,online_exams,"[{'table_name': 'exams', 'table_schema': [{'col_name': 'exam id'}, {'col_name': 'subject code'}, {'col_name': 'exam date'}, {'col_name': 'exam name'}], 'foreign_key_columns': [], 'primary_keys': ['exam id']}]" @@ -202,32 +202,32 @@ Give me an alphabetically ordered list of the distinct subject code for exams.,S "What are the dates of the exams whose subject code contains the substring ""data""? Return them in descending order of dates.",SELECT Exam_Date FROM Exams WHERE Subject_Code LIKE '%data%' ORDER BY Exam_Date DESC,online_exams,"[{'table_name': 'exams', 'table_schema': [{'col_name': 'exam id'}, {'col_name': 'subject code'}, {'col_name': 'exam date'}, {'col_name': 'exam name'}], 'foreign_key_columns': [], 'primary_keys': ['exam id']}]" What are the type of questions and their counts?,"SELECT Type_of_Question_Code , COUNT(*) FROM Questions GROUP BY Type_of_Question_Code",online_exams,"[{'table_name': 'questions', 'table_schema': [{'col_name': 'question id'}, {'col_name': 'type of question code'}, {'col_name': 'question text'}], 'foreign_key_columns': [], 'primary_keys': ['question id']}]" "For each question type, return its type code and its count of occurrence.","SELECT Type_of_Question_Code , COUNT(*) FROM Questions GROUP BY Type_of_Question_Code",online_exams,"[{'table_name': 'questions', 'table_schema': [{'col_name': 'question id'}, {'col_name': 'type of question code'}, {'col_name': 'question text'}], 'foreign_key_columns': [], 'primary_keys': ['question id']}]" -"What are the distinct student answer texts that received comments ""Normal""?","SELECT DISTINCT Student_Answer_Text FROM Student_Answers WHERE Comments = ""Normal""",online_exams,[] -"List all the distinct student answer texts to which comments ""Normal"" were given?","SELECT DISTINCT Student_Answer_Text FROM Student_Answers WHERE Comments = ""Normal""",online_exams,[] -How many different comments are there for student answers?,SELECT count(DISTINCT Comments) FROM Student_Answers,online_exams,[] -Count the number of different comments for student answers.,SELECT count(DISTINCT Comments) FROM Student_Answers,online_exams,[] -List all the student answer texts in descending order of count.,SELECT Student_Answer_Text FROM Student_Answers GROUP BY Student_Answer_Text ORDER BY COUNT(*) DESC,online_exams,[] -Sort the student answer texts in descending order of their frequency of occurrence.,SELECT Student_Answer_Text FROM Student_Answers GROUP BY Student_Answer_Text ORDER BY COUNT(*) DESC,online_exams,[] -Please show the first names of students and the dates of their answers.,"SELECT T2.First_Name , T1.Date_of_Answer FROM Student_Answers AS T1 JOIN Students AS T2 ON T1.Student_ID = T2.Student_ID",online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -"For each student answer, find the first name of the student and the date of the answer.","SELECT T2.First_Name , T1.Date_of_Answer FROM Student_Answers AS T1 JOIN Students AS T2 ON T1.Student_ID = T2.Student_ID",online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -Please show the email addresses of students and the dates of their answers in descending order of dates.,"SELECT T2.Email_Adress , T1.Date_of_Answer FROM Student_Answers AS T1 JOIN Students AS T2 ON T1.Student_ID = T2.Student_ID ORDER BY T1.Date_of_Answer DESC",online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -"For each student answer, find the email address of the student and the date of the answer. Sort them in descending order of dates.","SELECT T2.Email_Adress , T1.Date_of_Answer FROM Student_Answers AS T1 JOIN Students AS T2 ON T1.Student_ID = T2.Student_ID ORDER BY T1.Date_of_Answer DESC",online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -Please show the least common assessment for students.,SELECT Assessment FROM Student_Assessments GROUP BY Assessment ORDER BY COUNT(*) ASC LIMIT 1,online_exams,[] -Which assessment has the smallest frequency count?,SELECT Assessment FROM Student_Assessments GROUP BY Assessment ORDER BY COUNT(*) ASC LIMIT 1,online_exams,[] -Please show the first names of the students that have at least two answer records.,SELECT T2.First_Name FROM Student_Answers AS T1 JOIN Students AS T2 ON T1.Student_ID = T2.Student_ID GROUP BY T1.Student_ID HAVING COUNT(*) >= 2,online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -Which students have 2 or more answer records? Give me their first names.,SELECT T2.First_Name FROM Student_Answers AS T1 JOIN Students AS T2 ON T1.Student_ID = T2.Student_ID GROUP BY T1.Student_ID HAVING COUNT(*) >= 2,online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -What is the most common valid answer text?,SELECT Valid_Answer_Text FROM Valid_Answers GROUP BY Valid_Answer_Text ORDER BY COUNT(*) DESC LIMIT 1,online_exams,[] -Find the valid answer text that appeared most frequently.,SELECT Valid_Answer_Text FROM Valid_Answers GROUP BY Valid_Answer_Text ORDER BY COUNT(*) DESC LIMIT 1,online_exams,[] +"What are the distinct student answer texts that received comments ""Normal""?","SELECT DISTINCT Student_Answer_Text FROM Student_Answers WHERE Comments = ""Normal""",online_exams,"[{'table_name': 'student answers', 'table_schema': [{'col_name': 'student answer id'}, {'col_name': 'exam id'}, {'col_name': 'question id'}, {'col_name': 'student id'}, {'col_name': 'date of answer'}, {'col_name': 'comments'}, {'col_name': 'satisfactory yn'}, {'col_name': 'student answer text'}], 'foreign_key_columns': ['exam id', 'question id', 'student id'], 'primary_keys': ['student answer id']}]" +"List all the distinct student answer texts to which comments ""Normal"" were given?","SELECT DISTINCT Student_Answer_Text FROM Student_Answers WHERE Comments = ""Normal""",online_exams,"[{'table_name': 'student answers', 'table_schema': [{'col_name': 'student answer id'}, {'col_name': 'exam id'}, {'col_name': 'question id'}, {'col_name': 'student id'}, {'col_name': 'date of answer'}, {'col_name': 'comments'}, {'col_name': 'satisfactory yn'}, {'col_name': 'student answer text'}], 'foreign_key_columns': ['exam id', 'question id', 'student id'], 'primary_keys': ['student answer id']}]" +How many different comments are there for student answers?,SELECT count(DISTINCT Comments) FROM Student_Answers,online_exams,"[{'table_name': 'student answers', 'table_schema': [{'col_name': 'student answer id'}, {'col_name': 'exam id'}, {'col_name': 'question id'}, {'col_name': 'student id'}, {'col_name': 'date of answer'}, {'col_name': 'comments'}, {'col_name': 'satisfactory yn'}, {'col_name': 'student answer text'}], 'foreign_key_columns': ['exam id', 'question id', 'student id'], 'primary_keys': ['student answer id']}]" +Count the number of different comments for student answers.,SELECT count(DISTINCT Comments) FROM Student_Answers,online_exams,"[{'table_name': 'student answers', 'table_schema': [{'col_name': 'student answer id'}, {'col_name': 'exam id'}, {'col_name': 'question id'}, {'col_name': 'student id'}, {'col_name': 'date of answer'}, {'col_name': 'comments'}, {'col_name': 'satisfactory yn'}, {'col_name': 'student answer text'}], 'foreign_key_columns': ['exam id', 'question id', 'student id'], 'primary_keys': ['student answer id']}]" +List all the student answer texts in descending order of count.,SELECT Student_Answer_Text FROM Student_Answers GROUP BY Student_Answer_Text ORDER BY COUNT(*) DESC,online_exams,"[{'table_name': 'student answers', 'table_schema': [{'col_name': 'student answer id'}, {'col_name': 'exam id'}, {'col_name': 'question id'}, {'col_name': 'student id'}, {'col_name': 'date of answer'}, {'col_name': 'comments'}, {'col_name': 'satisfactory yn'}, {'col_name': 'student answer text'}], 'foreign_key_columns': ['exam id', 'question id', 'student id'], 'primary_keys': ['student answer id']}]" +Sort the student answer texts in descending order of their frequency of occurrence.,SELECT Student_Answer_Text FROM Student_Answers GROUP BY Student_Answer_Text ORDER BY COUNT(*) DESC,online_exams,"[{'table_name': 'student answers', 'table_schema': [{'col_name': 'student answer id'}, {'col_name': 'exam id'}, {'col_name': 'question id'}, {'col_name': 'student id'}, {'col_name': 'date of answer'}, {'col_name': 'comments'}, {'col_name': 'satisfactory yn'}, {'col_name': 'student answer text'}], 'foreign_key_columns': ['exam id', 'question id', 'student id'], 'primary_keys': ['student answer id']}]" +Please show the first names of students and the dates of their answers.,"SELECT T2.First_Name , T1.Date_of_Answer FROM Student_Answers AS T1 JOIN Students AS T2 ON T1.Student_ID = T2.Student_ID",online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'student answers', 'table_schema': [{'col_name': 'student answer id'}, {'col_name': 'exam id'}, {'col_name': 'question id'}, {'col_name': 'student id'}, {'col_name': 'date of answer'}, {'col_name': 'comments'}, {'col_name': 'satisfactory yn'}, {'col_name': 'student answer text'}], 'foreign_key_columns': ['exam id', 'question id', 'student id'], 'primary_keys': ['student answer id']}]" +"For each student answer, find the first name of the student and the date of the answer.","SELECT T2.First_Name , T1.Date_of_Answer FROM Student_Answers AS T1 JOIN Students AS T2 ON T1.Student_ID = T2.Student_ID",online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'student answers', 'table_schema': [{'col_name': 'student answer id'}, {'col_name': 'exam id'}, {'col_name': 'question id'}, {'col_name': 'student id'}, {'col_name': 'date of answer'}, {'col_name': 'comments'}, {'col_name': 'satisfactory yn'}, {'col_name': 'student answer text'}], 'foreign_key_columns': ['exam id', 'question id', 'student id'], 'primary_keys': ['student answer id']}]" +Please show the email addresses of students and the dates of their answers in descending order of dates.,"SELECT T2.Email_Adress , T1.Date_of_Answer FROM Student_Answers AS T1 JOIN Students AS T2 ON T1.Student_ID = T2.Student_ID ORDER BY T1.Date_of_Answer DESC",online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'student answers', 'table_schema': [{'col_name': 'student answer id'}, {'col_name': 'exam id'}, {'col_name': 'question id'}, {'col_name': 'student id'}, {'col_name': 'date of answer'}, {'col_name': 'comments'}, {'col_name': 'satisfactory yn'}, {'col_name': 'student answer text'}], 'foreign_key_columns': ['exam id', 'question id', 'student id'], 'primary_keys': ['student answer id']}]" +"For each student answer, find the email address of the student and the date of the answer. Sort them in descending order of dates.","SELECT T2.Email_Adress , T1.Date_of_Answer FROM Student_Answers AS T1 JOIN Students AS T2 ON T1.Student_ID = T2.Student_ID ORDER BY T1.Date_of_Answer DESC",online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'student answers', 'table_schema': [{'col_name': 'student answer id'}, {'col_name': 'exam id'}, {'col_name': 'question id'}, {'col_name': 'student id'}, {'col_name': 'date of answer'}, {'col_name': 'comments'}, {'col_name': 'satisfactory yn'}, {'col_name': 'student answer text'}], 'foreign_key_columns': ['exam id', 'question id', 'student id'], 'primary_keys': ['student answer id']}]" +Please show the least common assessment for students.,SELECT Assessment FROM Student_Assessments GROUP BY Assessment ORDER BY COUNT(*) ASC LIMIT 1,online_exams,"[{'table_name': 'student assessments', 'table_schema': [{'col_name': 'student answer id'}, {'col_name': 'valid answer id'}, {'col_name': 'student answer text'}, {'col_name': 'satisfactory yn'}, {'col_name': 'assessment'}], 'foreign_key_columns': ['valid answer id'], 'primary_keys': ['student answer id']}]" +Which assessment has the smallest frequency count?,SELECT Assessment FROM Student_Assessments GROUP BY Assessment ORDER BY COUNT(*) ASC LIMIT 1,online_exams,"[{'table_name': 'student assessments', 'table_schema': [{'col_name': 'student answer id'}, {'col_name': 'valid answer id'}, {'col_name': 'student answer text'}, {'col_name': 'satisfactory yn'}, {'col_name': 'assessment'}], 'foreign_key_columns': ['valid answer id'], 'primary_keys': ['student answer id']}]" +Please show the first names of the students that have at least two answer records.,SELECT T2.First_Name FROM Student_Answers AS T1 JOIN Students AS T2 ON T1.Student_ID = T2.Student_ID GROUP BY T1.Student_ID HAVING COUNT(*) >= 2,online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'student answers', 'table_schema': [{'col_name': 'student answer id'}, {'col_name': 'exam id'}, {'col_name': 'question id'}, {'col_name': 'student id'}, {'col_name': 'date of answer'}, {'col_name': 'comments'}, {'col_name': 'satisfactory yn'}, {'col_name': 'student answer text'}], 'foreign_key_columns': ['exam id', 'question id', 'student id'], 'primary_keys': ['student answer id']}]" +Which students have 2 or more answer records? Give me their first names.,SELECT T2.First_Name FROM Student_Answers AS T1 JOIN Students AS T2 ON T1.Student_ID = T2.Student_ID GROUP BY T1.Student_ID HAVING COUNT(*) >= 2,online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'student answers', 'table_schema': [{'col_name': 'student answer id'}, {'col_name': 'exam id'}, {'col_name': 'question id'}, {'col_name': 'student id'}, {'col_name': 'date of answer'}, {'col_name': 'comments'}, {'col_name': 'satisfactory yn'}, {'col_name': 'student answer text'}], 'foreign_key_columns': ['exam id', 'question id', 'student id'], 'primary_keys': ['student answer id']}]" +What is the most common valid answer text?,SELECT Valid_Answer_Text FROM Valid_Answers GROUP BY Valid_Answer_Text ORDER BY COUNT(*) DESC LIMIT 1,online_exams,"[{'table_name': 'valid answers', 'table_schema': [{'col_name': 'valid answer id'}, {'col_name': 'question id'}, {'col_name': 'valid answer text'}], 'foreign_key_columns': ['question id'], 'primary_keys': ['valid answer id']}]" +Find the valid answer text that appeared most frequently.,SELECT Valid_Answer_Text FROM Valid_Answers GROUP BY Valid_Answer_Text ORDER BY COUNT(*) DESC LIMIT 1,online_exams,"[{'table_name': 'valid answers', 'table_schema': [{'col_name': 'valid answer id'}, {'col_name': 'question id'}, {'col_name': 'valid answer text'}], 'foreign_key_columns': ['question id'], 'primary_keys': ['valid answer id']}]" "List the last names of the students whose gender is not ""M"".","SELECT Last_Name FROM Students WHERE Gender_MFU != ""M""",online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" "What are the last names of the students with gender other than ""M""?","SELECT Last_Name FROM Students WHERE Gender_MFU != ""M""",online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" List each gender and the corresponding number of students.,"SELECT Gender_MFU , COUNT(*) FROM Students GROUP BY Gender_MFU",online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" "For each gender, return the gender code and the number of students who identify as that gender.","SELECT Gender_MFU , COUNT(*) FROM Students GROUP BY Gender_MFU",online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" "List the last names of the students whose gender is ""F"" or ""M"".","SELECT Last_Name FROM Students WHERE Gender_MFU = ""F"" OR Gender_MFU = ""M""",online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" "Which students identify their gender as ""F"" or ""M""? Give me their last names.","SELECT Last_Name FROM Students WHERE Gender_MFU = ""F"" OR Gender_MFU = ""M""",online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -List the first names of the students who do not have any answers.,SELECT First_Name FROM Students WHERE Student_ID NOT IN (SELECT Student_ID FROM Student_Answers),online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -Which students do not have any answers? Find their first names.,SELECT First_Name FROM Students WHERE Student_ID NOT IN (SELECT Student_ID FROM Student_Answers),online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -"Show the student answer texts that received both ""Normal"" and ""Absent"" as comments.","SELECT Student_Answer_Text FROM Student_Answers WHERE Comments = ""Normal"" INTERSECT SELECT Student_Answer_Text FROM Student_Answers WHERE Comments = ""Absent""",online_exams,[] -"Which student answer texts were given both ""Normal"" and ""Absent"" as comments?","SELECT Student_Answer_Text FROM Student_Answers WHERE Comments = ""Normal"" INTERSECT SELECT Student_Answer_Text FROM Student_Answers WHERE Comments = ""Absent""",online_exams,[] +List the first names of the students who do not have any answers.,SELECT First_Name FROM Students WHERE Student_ID NOT IN (SELECT Student_ID FROM Student_Answers),online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'student answers', 'table_schema': [{'col_name': 'student answer id'}, {'col_name': 'exam id'}, {'col_name': 'question id'}, {'col_name': 'student id'}, {'col_name': 'date of answer'}, {'col_name': 'comments'}, {'col_name': 'satisfactory yn'}, {'col_name': 'student answer text'}], 'foreign_key_columns': ['exam id', 'question id', 'student id'], 'primary_keys': ['student answer id']}]" +Which students do not have any answers? Find their first names.,SELECT First_Name FROM Students WHERE Student_ID NOT IN (SELECT Student_ID FROM Student_Answers),online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'student answers', 'table_schema': [{'col_name': 'student answer id'}, {'col_name': 'exam id'}, {'col_name': 'question id'}, {'col_name': 'student id'}, {'col_name': 'date of answer'}, {'col_name': 'comments'}, {'col_name': 'satisfactory yn'}, {'col_name': 'student answer text'}], 'foreign_key_columns': ['exam id', 'question id', 'student id'], 'primary_keys': ['student answer id']}]" +"Show the student answer texts that received both ""Normal"" and ""Absent"" as comments.","SELECT Student_Answer_Text FROM Student_Answers WHERE Comments = ""Normal"" INTERSECT SELECT Student_Answer_Text FROM Student_Answers WHERE Comments = ""Absent""",online_exams,"[{'table_name': 'student answers', 'table_schema': [{'col_name': 'student answer id'}, {'col_name': 'exam id'}, {'col_name': 'question id'}, {'col_name': 'student id'}, {'col_name': 'date of answer'}, {'col_name': 'comments'}, {'col_name': 'satisfactory yn'}, {'col_name': 'student answer text'}], 'foreign_key_columns': ['exam id', 'question id', 'student id'], 'primary_keys': ['student answer id']}]" +"Which student answer texts were given both ""Normal"" and ""Absent"" as comments?","SELECT Student_Answer_Text FROM Student_Answers WHERE Comments = ""Normal"" INTERSECT SELECT Student_Answer_Text FROM Student_Answers WHERE Comments = ""Absent""",online_exams,"[{'table_name': 'student answers', 'table_schema': [{'col_name': 'student answer id'}, {'col_name': 'exam id'}, {'col_name': 'question id'}, {'col_name': 'student id'}, {'col_name': 'date of answer'}, {'col_name': 'comments'}, {'col_name': 'satisfactory yn'}, {'col_name': 'student answer text'}], 'foreign_key_columns': ['exam id', 'question id', 'student id'], 'primary_keys': ['student answer id']}]" Show the types of questions that have at least three questions.,SELECT Type_of_Question_Code FROM Questions GROUP BY Type_of_Question_Code HAVING count(*) >= 3,online_exams,"[{'table_name': 'questions', 'table_schema': [{'col_name': 'question id'}, {'col_name': 'type of question code'}, {'col_name': 'question text'}], 'foreign_key_columns': [], 'primary_keys': ['question id']}]" Which types of questions have 3 or more questions? Return the questions type code.,SELECT Type_of_Question_Code FROM Questions GROUP BY Type_of_Question_Code HAVING count(*) >= 3,online_exams,"[{'table_name': 'questions', 'table_schema': [{'col_name': 'question id'}, {'col_name': 'type of question code'}, {'col_name': 'question text'}], 'foreign_key_columns': [], 'primary_keys': ['question id']}]" Show all information on students.,SELECT * FROM Students,online_exams,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'gender mfu'}, {'col_name': 'student address'}, {'col_name': 'email adress'}, {'col_name': 'cell mobile phone'}, {'col_name': 'home phone'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" @@ -288,32 +288,32 @@ Give the different payment method codes that customers use.,SELECT DISTINCT paym "What are the ids and product types for all products, sorted alphabetically by product name?","SELECT product_id , product_type_code FROM Products ORDER BY product_name",customers_and_orders,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'product type code'}, {'col_name': 'product name'}, {'col_name': 'product price'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" What is the product type with least number of products?,SELECT product_type_code FROM Products GROUP BY product_type_code ORDER BY count(*) ASC LIMIT 1,customers_and_orders,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'product type code'}, {'col_name': 'product name'}, {'col_name': 'product price'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" What is the code of the product type that is least common?,SELECT product_type_code FROM Products GROUP BY product_type_code ORDER BY count(*) ASC LIMIT 1,customers_and_orders,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'product type code'}, {'col_name': 'product name'}, {'col_name': 'product price'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" -How many customer orders do we have?,SELECT count(*) FROM Customer_orders,customers_and_orders,[] -Count the number of customer orders.,SELECT count(*) FROM Customer_orders,customers_and_orders,[] -"Show the order ids, order dates, and order status codes for all orders by customer Jeromy.","SELECT order_id , order_date , order_status_code FROM Customer_orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_name = ""Jeromy""",customers_and_orders,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'address id'}, {'col_name': 'payment method code'}, {'col_name': 'customer number'}, {'col_name': 'customer name'}, {'col_name': 'customer address'}, {'col_name': 'customer phone'}, {'col_name': 'customer email'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -"What were the ids, dates, and status codes for orders made by Jeromy?","SELECT order_id , order_date , order_status_code FROM Customer_orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_name = ""Jeromy""",customers_and_orders,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'address id'}, {'col_name': 'payment method code'}, {'col_name': 'customer number'}, {'col_name': 'customer name'}, {'col_name': 'customer address'}, {'col_name': 'customer phone'}, {'col_name': 'customer email'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -"Show all customer names, ids and the number of orders by each customer.","SELECT T2.customer_name , T1.customer_id , count(*) FROM Customer_orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id",customers_and_orders,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'address id'}, {'col_name': 'payment method code'}, {'col_name': 'customer number'}, {'col_name': 'customer name'}, {'col_name': 'customer address'}, {'col_name': 'customer phone'}, {'col_name': 'customer email'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -"What are the names, ids, and number of orders made for each customer?","SELECT T2.customer_name , T1.customer_id , count(*) FROM Customer_orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id",customers_and_orders,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'address id'}, {'col_name': 'payment method code'}, {'col_name': 'customer number'}, {'col_name': 'customer name'}, {'col_name': 'customer address'}, {'col_name': 'customer phone'}, {'col_name': 'customer email'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -"What is the customer id, name, phone, and email for the customer with most orders?","SELECT T1.customer_id , T2.customer_name , T2.customer_phone , T2.customer_email FROM Customer_orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1",customers_and_orders,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'address id'}, {'col_name': 'payment method code'}, {'col_name': 'customer number'}, {'col_name': 'customer name'}, {'col_name': 'customer address'}, {'col_name': 'customer phone'}, {'col_name': 'customer email'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -"Give the id, name, phone, and email corresponding to the customer who made the most orders.","SELECT T1.customer_id , T2.customer_name , T2.customer_phone , T2.customer_email FROM Customer_orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1",customers_and_orders,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'address id'}, {'col_name': 'payment method code'}, {'col_name': 'customer number'}, {'col_name': 'customer name'}, {'col_name': 'customer address'}, {'col_name': 'customer phone'}, {'col_name': 'customer email'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -Show all order status and the number of orders in each status.,"SELECT order_status_code , count(*) FROM Customer_orders GROUP BY order_status_code",customers_and_orders,[] -How many orders have each order status code?,"SELECT order_status_code , count(*) FROM Customer_orders GROUP BY order_status_code",customers_and_orders,[] -What is the order status code that is most common?,SELECT order_status_code FROM Customer_orders GROUP BY order_status_code ORDER BY count(*) DESC LIMIT 1,customers_and_orders,[] -Give the order status code that is most frequent across customer orders.,SELECT order_status_code FROM Customer_orders GROUP BY order_status_code ORDER BY count(*) DESC LIMIT 1,customers_and_orders,[] -How many customers do not have an order?,SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_orders),customers_and_orders,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'address id'}, {'col_name': 'payment method code'}, {'col_name': 'customer number'}, {'col_name': 'customer name'}, {'col_name': 'customer address'}, {'col_name': 'customer phone'}, {'col_name': 'customer email'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -Count the number of customers who have not made an order.,SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_orders),customers_and_orders,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'address id'}, {'col_name': 'payment method code'}, {'col_name': 'customer number'}, {'col_name': 'customer name'}, {'col_name': 'customer address'}, {'col_name': 'customer phone'}, {'col_name': 'customer email'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -Show all product names without an order.,SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS t1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id,customers_and_orders,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'product type code'}, {'col_name': 'product name'}, {'col_name': 'product price'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" -What are the names of products that have not been ordered?,SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS t1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id,customers_and_orders,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'product type code'}, {'col_name': 'product name'}, {'col_name': 'product price'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" -How many products named Monitor have been ordered?,"SELECT sum(order_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id WHERE T2.product_name = ""Monitor""",customers_and_orders,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'product type code'}, {'col_name': 'product name'}, {'col_name': 'product price'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" -What is the total number of Monitor products that have been ordered?,"SELECT sum(order_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id WHERE T2.product_name = ""Monitor""",customers_and_orders,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'product type code'}, {'col_name': 'product name'}, {'col_name': 'product price'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" -How many customers have ordered the product named Monitor?,"SELECT count(DISTINCT T3.customer_id) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id JOIN Customer_orders AS T3 ON T3.order_id = T1.order_id WHERE T2.product_name = ""Monitor""",customers_and_orders,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'product type code'}, {'col_name': 'product name'}, {'col_name': 'product price'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" -Count the number of different customers who have bought a Monitor Product.,"SELECT count(DISTINCT T3.customer_id) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id JOIN Customer_orders AS T3 ON T3.order_id = T1.order_id WHERE T2.product_name = ""Monitor""",customers_and_orders,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'product type code'}, {'col_name': 'product name'}, {'col_name': 'product price'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}]" -How many customers have an order?,SELECT count(DISTINCT customer_id) FROM Customer_orders,customers_and_orders,[] -Count the number of differnt customers who have made an order.,SELECT count(DISTINCT customer_id) FROM Customer_orders,customers_and_orders,[] -Show all customer ids without an order.,SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Customer_orders,customers_and_orders,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'address id'}, {'col_name': 'payment method code'}, {'col_name': 'customer number'}, {'col_name': 'customer name'}, {'col_name': 'customer address'}, {'col_name': 'customer phone'}, {'col_name': 'customer email'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -What are the ids of customers who have not made an order?,SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Customer_orders,customers_and_orders,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'address id'}, {'col_name': 'payment method code'}, {'col_name': 'customer number'}, {'col_name': 'customer name'}, {'col_name': 'customer address'}, {'col_name': 'customer phone'}, {'col_name': 'customer email'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -Show all the order dates and ids of the orders with quantity of any product larger than 6 or with more than 3 products.,"SELECT T1.order_date , T1.order_id FROM Customer_Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id WHERE T2.order_quantity > 6 UNION SELECT T1.order_date , T1.order_id FROM Customer_Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id HAVING count(*) > 3;",customers_and_orders,[] -What are the order ids and corresponding order dates for orders with a quantity greater than 6 or consisting of more than 3 products?,"SELECT T1.order_date , T1.order_id FROM Customer_Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id WHERE T2.order_quantity > 6 UNION SELECT T1.order_date , T1.order_id FROM Customer_Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id HAVING count(*) > 3;",customers_and_orders,[] +How many customer orders do we have?,SELECT count(*) FROM Customer_orders,customers_and_orders,"[{'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +Count the number of customer orders.,SELECT count(*) FROM Customer_orders,customers_and_orders,"[{'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +"Show the order ids, order dates, and order status codes for all orders by customer Jeromy.","SELECT order_id , order_date , order_status_code FROM Customer_orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_name = ""Jeromy""",customers_and_orders,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'address id'}, {'col_name': 'payment method code'}, {'col_name': 'customer number'}, {'col_name': 'customer name'}, {'col_name': 'customer address'}, {'col_name': 'customer phone'}, {'col_name': 'customer email'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +"What were the ids, dates, and status codes for orders made by Jeromy?","SELECT order_id , order_date , order_status_code FROM Customer_orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_name = ""Jeromy""",customers_and_orders,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'address id'}, {'col_name': 'payment method code'}, {'col_name': 'customer number'}, {'col_name': 'customer name'}, {'col_name': 'customer address'}, {'col_name': 'customer phone'}, {'col_name': 'customer email'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +"Show all customer names, ids and the number of orders by each customer.","SELECT T2.customer_name , T1.customer_id , count(*) FROM Customer_orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id",customers_and_orders,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'address id'}, {'col_name': 'payment method code'}, {'col_name': 'customer number'}, {'col_name': 'customer name'}, {'col_name': 'customer address'}, {'col_name': 'customer phone'}, {'col_name': 'customer email'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +"What are the names, ids, and number of orders made for each customer?","SELECT T2.customer_name , T1.customer_id , count(*) FROM Customer_orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id",customers_and_orders,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'address id'}, {'col_name': 'payment method code'}, {'col_name': 'customer number'}, {'col_name': 'customer name'}, {'col_name': 'customer address'}, {'col_name': 'customer phone'}, {'col_name': 'customer email'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +"What is the customer id, name, phone, and email for the customer with most orders?","SELECT T1.customer_id , T2.customer_name , T2.customer_phone , T2.customer_email FROM Customer_orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1",customers_and_orders,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'address id'}, {'col_name': 'payment method code'}, {'col_name': 'customer number'}, {'col_name': 'customer name'}, {'col_name': 'customer address'}, {'col_name': 'customer phone'}, {'col_name': 'customer email'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +"Give the id, name, phone, and email corresponding to the customer who made the most orders.","SELECT T1.customer_id , T2.customer_name , T2.customer_phone , T2.customer_email FROM Customer_orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1",customers_and_orders,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'address id'}, {'col_name': 'payment method code'}, {'col_name': 'customer number'}, {'col_name': 'customer name'}, {'col_name': 'customer address'}, {'col_name': 'customer phone'}, {'col_name': 'customer email'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +Show all order status and the number of orders in each status.,"SELECT order_status_code , count(*) FROM Customer_orders GROUP BY order_status_code",customers_and_orders,"[{'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +How many orders have each order status code?,"SELECT order_status_code , count(*) FROM Customer_orders GROUP BY order_status_code",customers_and_orders,"[{'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +What is the order status code that is most common?,SELECT order_status_code FROM Customer_orders GROUP BY order_status_code ORDER BY count(*) DESC LIMIT 1,customers_and_orders,"[{'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +Give the order status code that is most frequent across customer orders.,SELECT order_status_code FROM Customer_orders GROUP BY order_status_code ORDER BY count(*) DESC LIMIT 1,customers_and_orders,"[{'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +How many customers do not have an order?,SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_orders),customers_and_orders,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'address id'}, {'col_name': 'payment method code'}, {'col_name': 'customer number'}, {'col_name': 'customer name'}, {'col_name': 'customer address'}, {'col_name': 'customer phone'}, {'col_name': 'customer email'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +Count the number of customers who have not made an order.,SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_orders),customers_and_orders,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'address id'}, {'col_name': 'payment method code'}, {'col_name': 'customer number'}, {'col_name': 'customer name'}, {'col_name': 'customer address'}, {'col_name': 'customer phone'}, {'col_name': 'customer email'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +Show all product names without an order.,SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS t1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id,customers_and_orders,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'product type code'}, {'col_name': 'product name'}, {'col_name': 'product price'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'order id'}, {'col_name': 'product id'}, {'col_name': 'order quantity'}], 'foreign_key_columns': ['product id', 'order id'], 'primary_keys': []}]" +What are the names of products that have not been ordered?,SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS t1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id,customers_and_orders,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'product type code'}, {'col_name': 'product name'}, {'col_name': 'product price'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'order id'}, {'col_name': 'product id'}, {'col_name': 'order quantity'}], 'foreign_key_columns': ['product id', 'order id'], 'primary_keys': []}]" +How many products named Monitor have been ordered?,"SELECT sum(order_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id WHERE T2.product_name = ""Monitor""",customers_and_orders,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'product type code'}, {'col_name': 'product name'}, {'col_name': 'product price'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'order id'}, {'col_name': 'product id'}, {'col_name': 'order quantity'}], 'foreign_key_columns': ['product id', 'order id'], 'primary_keys': []}]" +What is the total number of Monitor products that have been ordered?,"SELECT sum(order_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id WHERE T2.product_name = ""Monitor""",customers_and_orders,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'product type code'}, {'col_name': 'product name'}, {'col_name': 'product price'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'order id'}, {'col_name': 'product id'}, {'col_name': 'order quantity'}], 'foreign_key_columns': ['product id', 'order id'], 'primary_keys': []}]" +How many customers have ordered the product named Monitor?,"SELECT count(DISTINCT T3.customer_id) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id JOIN Customer_orders AS T3 ON T3.order_id = T1.order_id WHERE T2.product_name = ""Monitor""",customers_and_orders,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'product type code'}, {'col_name': 'product name'}, {'col_name': 'product price'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'order id'}, {'col_name': 'product id'}, {'col_name': 'order quantity'}], 'foreign_key_columns': ['product id', 'order id'], 'primary_keys': []}]" +Count the number of different customers who have bought a Monitor Product.,"SELECT count(DISTINCT T3.customer_id) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id JOIN Customer_orders AS T3 ON T3.order_id = T1.order_id WHERE T2.product_name = ""Monitor""",customers_and_orders,"[{'table_name': 'products', 'table_schema': [{'col_name': 'product id'}, {'col_name': 'product type code'}, {'col_name': 'product name'}, {'col_name': 'product price'}], 'foreign_key_columns': [], 'primary_keys': ['product id']}, {'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'order id'}, {'col_name': 'product id'}, {'col_name': 'order quantity'}], 'foreign_key_columns': ['product id', 'order id'], 'primary_keys': []}]" +How many customers have an order?,SELECT count(DISTINCT customer_id) FROM Customer_orders,customers_and_orders,"[{'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +Count the number of differnt customers who have made an order.,SELECT count(DISTINCT customer_id) FROM Customer_orders,customers_and_orders,"[{'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +Show all customer ids without an order.,SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Customer_orders,customers_and_orders,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'address id'}, {'col_name': 'payment method code'}, {'col_name': 'customer number'}, {'col_name': 'customer name'}, {'col_name': 'customer address'}, {'col_name': 'customer phone'}, {'col_name': 'customer email'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +What are the ids of customers who have not made an order?,SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Customer_orders,customers_and_orders,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'address id'}, {'col_name': 'payment method code'}, {'col_name': 'customer number'}, {'col_name': 'customer name'}, {'col_name': 'customer address'}, {'col_name': 'customer phone'}, {'col_name': 'customer email'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}]" +Show all the order dates and ids of the orders with quantity of any product larger than 6 or with more than 3 products.,"SELECT T1.order_date , T1.order_id FROM Customer_Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id WHERE T2.order_quantity > 6 UNION SELECT T1.order_date , T1.order_id FROM Customer_Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id HAVING count(*) > 3;",customers_and_orders,"[{'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'order id'}, {'col_name': 'product id'}, {'col_name': 'order quantity'}], 'foreign_key_columns': ['product id', 'order id'], 'primary_keys': []}]" +What are the order ids and corresponding order dates for orders with a quantity greater than 6 or consisting of more than 3 products?,"SELECT T1.order_date , T1.order_id FROM Customer_Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id WHERE T2.order_quantity > 6 UNION SELECT T1.order_date , T1.order_id FROM Customer_Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id HAVING count(*) > 3;",customers_and_orders,"[{'table_name': 'customer orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'customer id'}, {'col_name': 'order date'}, {'col_name': 'order status code'}], 'foreign_key_columns': ['customer id'], 'primary_keys': ['order id']}, {'table_name': 'order items', 'table_schema': [{'col_name': 'order item id'}, {'col_name': 'order id'}, {'col_name': 'product id'}, {'col_name': 'order quantity'}], 'foreign_key_columns': ['product id', 'order id'], 'primary_keys': []}]" How many buildings are there?,SELECT count(*) FROM building,region_building,"[{'table_name': 'building', 'table_schema': [{'col_name': 'building id'}, {'col_name': 'region id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'number of stories'}, {'col_name': 'completed year'}], 'foreign_key_columns': ['region id'], 'primary_keys': ['building id']}]" Count the number of buildings.,SELECT count(*) FROM building,region_building,"[{'table_name': 'building', 'table_schema': [{'col_name': 'building id'}, {'col_name': 'region id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'number of stories'}, {'col_name': 'completed year'}], 'foreign_key_columns': ['region id'], 'primary_keys': ['building id']}]" List the names of buildings in ascending order of number of stories.,SELECT Name FROM building ORDER BY Number_of_Stories ASC,region_building,"[{'table_name': 'building', 'table_schema': [{'col_name': 'building id'}, {'col_name': 'region id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'number of stories'}, {'col_name': 'completed year'}], 'foreign_key_columns': ['region id'], 'primary_keys': ['building id']}]" @@ -358,42 +358,42 @@ List details of all the channel in alphabetical order .,select channel_details f What is the list of channel details ordered alphabetically ?,select channel_details from channels order by channel_details,government_shift,"[{'table_name': 'channels', 'table_schema': [{'col_name': 'channel id'}, {'col_name': 'channel details'}], 'foreign_key_columns': [], 'primary_keys': ['channel id']}]" How many services are there?,SELECT count(*) FROM services,government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}]" Count the number of services.,SELECT count(*) FROM services,government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}]" -What is the most common analytical layer type code?,SELECT analytical_layer_type_code FROM analytical_layer GROUP BY analytical_layer_type_code ORDER BY count(*) DESC LIMIT 1,government_shift,[] -Find the analytical layer type code that appears most often.,SELECT analytical_layer_type_code FROM analytical_layer GROUP BY analytical_layer_type_code ORDER BY count(*) DESC LIMIT 1,government_shift,[] -"Find all the services that has been used by the customer with details ""Hardy Kutch"".","SELECT t3.service_details FROM customers AS t1 JOIN customers_and_services AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t1.customer_details = ""Hardy Kutch""",government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -"Which services were used by the customer with details ""Hardy Kutch""? Give me the service details.","SELECT t3.service_details FROM customers AS t1 JOIN customers_and_services AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t1.customer_details = ""Hardy Kutch""",government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -Find the details of the services that have been used by more than 3 times .,select t1.service_details from services as t1 join customers_and_services as t2 on t1.service_id = t2.service_id group by t1.service_details having count(*) > 3,government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}]" -Which services were used by customers by more than 3 times? Give me the service details.,SELECT t1.service_details FROM services AS t1 JOIN customers_and_services AS t2 ON t1.service_id = t2.service_id GROUP BY t1.service_details HAVING count(*) > 3,government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}]" -Find the details of the customer who has used services the most times.,SELECT t1.customer_details FROM customers AS t1 JOIN customers_and_services AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_details ORDER BY count(*) DESC LIMIT 1,government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -return the details of the customer with largest count of used services.,select t1.customer_details from customers as t1 join customers_and_services as t2 on t1.customer_id = t2.customer_id group by t1.customer_details order by count(*) desc limit 1,government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -Find the name of the customer who has used the most types of services .,select t1.customer_details from customers as t1 join customers_and_services as t2 on t1.customer_id = t2.customer_id group by t1.customer_details order by count(*) desc limit 1,government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -Which customer has used the most types of services ? Give me the customer details .,select t1.customer_details from customers as t1 join customers_and_services as t2 on t1.customer_id = t2.customer_id group by t1.customer_details order by count(*) desc limit 1,government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -Find the details of the customer who has never used any services .,select customer_details from customers where customer_id not in (select customer_id from customers_and_services),government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -Which customers never used any services ? Give me the customer details .,select customer_details from customers where customer_id not in (select customer_id from customers_and_services),government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -Find the details of the customers who have used the least-used service .,select distinct t1.customer_details from customers as t1 join customers_and_services as t2 on t1.customer_id = t2.customer_id where t2.service_id = (select service_id from services group by service_id order by count(*) asc limit 1),government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -Which customers used the least commonly-used service ? Give me the distinct customer details .,select distinct t1.customer_details from customers as t1 join customers_and_services as t2 on t1.customer_id = t2.customer_id where t2.service_id = (select service_id from services group by service_id order by count(*) asc limit 1),government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -How many distinct customer and services details are there?,SELECT count(DISTINCT customers_and_services_details) FROM customers_and_services,government_shift,[] -Count the total number of available customers and services details.,SELECT count(DISTINCT customers_and_services_details) FROM customers_and_services,government_shift,[] +What is the most common analytical layer type code?,SELECT analytical_layer_type_code FROM analytical_layer GROUP BY analytical_layer_type_code ORDER BY count(*) DESC LIMIT 1,government_shift,"[{'table_name': 'analytical layer', 'table_schema': [{'col_name': 'analytical id'}, {'col_name': 'customers and services id'}, {'col_name': 'pattern recognition'}, {'col_name': 'analytical layer type code'}], 'foreign_key_columns': ['customers and services id'], 'primary_keys': ['analytical id']}]" +Find the analytical layer type code that appears most often.,SELECT analytical_layer_type_code FROM analytical_layer GROUP BY analytical_layer_type_code ORDER BY count(*) DESC LIMIT 1,government_shift,"[{'table_name': 'analytical layer', 'table_schema': [{'col_name': 'analytical id'}, {'col_name': 'customers and services id'}, {'col_name': 'pattern recognition'}, {'col_name': 'analytical layer type code'}], 'foreign_key_columns': ['customers and services id'], 'primary_keys': ['analytical id']}]" +"Find all the services that has been used by the customer with details ""Hardy Kutch"".","SELECT t3.service_details FROM customers AS t1 JOIN customers_and_services AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t1.customer_details = ""Hardy Kutch""",government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}]" +"Which services were used by the customer with details ""Hardy Kutch""? Give me the service details.","SELECT t3.service_details FROM customers AS t1 JOIN customers_and_services AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t1.customer_details = ""Hardy Kutch""",government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}]" +Find the details of the services that have been used by more than 3 times .,select t1.service_details from services as t1 join customers_and_services as t2 on t1.service_id = t2.service_id group by t1.service_details having count(*) > 3,government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}]" +Which services were used by customers by more than 3 times? Give me the service details.,SELECT t1.service_details FROM services AS t1 JOIN customers_and_services AS t2 ON t1.service_id = t2.service_id GROUP BY t1.service_details HAVING count(*) > 3,government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}]" +Find the details of the customer who has used services the most times.,SELECT t1.customer_details FROM customers AS t1 JOIN customers_and_services AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_details ORDER BY count(*) DESC LIMIT 1,government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}]" +return the details of the customer with largest count of used services.,select t1.customer_details from customers as t1 join customers_and_services as t2 on t1.customer_id = t2.customer_id group by t1.customer_details order by count(*) desc limit 1,government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}]" +Find the name of the customer who has used the most types of services .,select t1.customer_details from customers as t1 join customers_and_services as t2 on t1.customer_id = t2.customer_id group by t1.customer_details order by count(*) desc limit 1,government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}]" +Which customer has used the most types of services ? Give me the customer details .,select t1.customer_details from customers as t1 join customers_and_services as t2 on t1.customer_id = t2.customer_id group by t1.customer_details order by count(*) desc limit 1,government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}]" +Find the details of the customer who has never used any services .,select customer_details from customers where customer_id not in (select customer_id from customers_and_services),government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}]" +Which customers never used any services ? Give me the customer details .,select customer_details from customers where customer_id not in (select customer_id from customers_and_services),government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}]" +Find the details of the customers who have used the least-used service .,select distinct t1.customer_details from customers as t1 join customers_and_services as t2 on t1.customer_id = t2.customer_id where t2.service_id = (select service_id from services group by service_id order by count(*) asc limit 1),government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}]" +Which customers used the least commonly-used service ? Give me the distinct customer details .,select distinct t1.customer_details from customers as t1 join customers_and_services as t2 on t1.customer_id = t2.customer_id where t2.service_id = (select service_id from services group by service_id order by count(*) asc limit 1),government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}]" +How many distinct customer and services details are there?,SELECT count(DISTINCT customers_and_services_details) FROM customers_and_services,government_shift,"[{'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}]" +Count the total number of available customers and services details.,SELECT count(DISTINCT customers_and_services_details) FROM customers_and_services,government_shift,"[{'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}]" "Find all the customers whose name contains ""Kutch"".","SELECT customer_details FROM customers WHERE customer_details LIKE ""%Kutch%""",government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" "What are the details of the customers who have ""Kutch"" in part of their details?","SELECT customer_details FROM customers WHERE customer_details LIKE ""%Kutch%""",government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -"Find the name of all the services which either have been used by customer ""Hardy Kutch"" or have been rated as ""good"" in one of the customer interactions.","SELECT DISTINCT t3.service_details FROM customers AS t1 JOIN customers_and_services AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id JOIN customer_interactions AS t4 ON t3.service_id = t4.service_id WHERE t1.customer_details = ""Hardy Kutch"" OR t4.services_and_channels_details = ""good""",government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -"Which services are used by the customer ""Hardy Kutch"" or are rated as ""good"" in a customer interaction? Give me the service details.","SELECT DISTINCT t3.service_details FROM customers AS t1 JOIN customers_and_services AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id JOIN customer_interactions AS t4 ON t3.service_id = t4.service_id WHERE t1.customer_details = ""Hardy Kutch"" OR t4.services_and_channels_details = ""good""",government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -"Find the names of all the services which both have been used by customer ""Hardy Kutch"" and have been rated ""bad"" in one of the customer interactions.","SELECT DISTINCT t3.service_details FROM customers AS t1 JOIN customers_and_services AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id JOIN customer_interactions AS t4 ON t3.service_id = t4.service_id WHERE t1.customer_details = ""Hardy Kutch"" AND t4.services_and_channels_details = ""bad""",government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -"Which services are both used by the customer ""Hardy Kutch"" and are rated as ""bad"" in a customer interaction? Give me the service details.","SELECT DISTINCT t3.service_details FROM customers AS t1 JOIN customers_and_services AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id JOIN customer_interactions AS t4 ON t3.service_id = t4.service_id WHERE t1.customer_details = ""Hardy Kutch"" AND t4.services_and_channels_details = ""bad""",government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -Find details of all the services that have interacted with `` 15 ij '' for the the channel details.,"select distinct t1.service_details from services as t1 join customer_interactions as t2 on t1.service_id = t2.service_id join channels as t3 on t2.channel_id = t3.channel_id where t3.channel_details = ""15 ij""",government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'channels', 'table_schema': [{'col_name': 'channel id'}, {'col_name': 'channel details'}], 'foreign_key_columns': [], 'primary_keys': ['channel id']}]" -"Give me the details of all the services that have interacted with the channel with detail ""15 ij"".","SELECT DISTINCT t1.service_details FROM services AS t1 JOIN customer_interactions AS t2 ON t1.service_id = t2.service_id JOIN channels AS t3 ON t2.channel_id = t3.channel_id WHERE t3.channel_details = ""15 ij""",government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'channels', 'table_schema': [{'col_name': 'channel id'}, {'col_name': 'channel details'}], 'foreign_key_columns': [], 'primary_keys': ['channel id']}]" -Find all the details of the customers who have been involved in an interaction with status `` Stuck '' and service and channel detail `` bad '' .,"select t1.customer_details from customers as t1 join customer_interactions as t2 on t1.customer_id = t2.customer_id where t2.status_code = ""stuck"" and services_and_channels_details = ""bad""",government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -"Which customers have experienced status ""Stuck"" and service and channel detail ""bad"" in an interaction? Give me the customer details.","SELECT t1.customer_details FROM customers AS t1 JOIN customer_interactions AS t2 ON t1.customer_id = t2.customer_id WHERE t2.status_code = ""Stuck"" AND services_and_channels_details = ""bad""",government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -How many integration platforms are successful?,"SELECT count(*) FROM integration_platform WHERE integration_platform_details = ""Success""",government_shift,[] -"Count the number of integration platforms that have ""Success"" in the details.","SELECT count(*) FROM integration_platform WHERE integration_platform_details = ""Success""",government_shift,[] -List the details of all the customers who are associated with a failed integration platform .,"select distinct t1.customer_details from customers as t1 join customer_interactions as t2 on t1.customer_id = t2.customer_id join integration_platform as t3 where t3.integration_platform_details = ""fail""",government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -"Which customers have integration platform details ""Fail"" in interactions? Give me the customer details.","SELECT DISTINCT t1.customer_details FROM customers AS t1 JOIN customer_interactions AS t2 ON t1.customer_id = t2.customer_id JOIN integration_platform AS t3 WHERE t3.integration_platform_details = ""Fail""",government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -Which service ( s ) has never been used by any customer ? List their details .,select service_details from services except select t2.service_details from customers_and_services as t1 join services as t2 on t1.service_id = t2.service_id,government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}]" -Find details of the services that no customer has ever used . Return the service details .,select service_details from services except select t2.service_details from customers_and_services as t1 join services as t2 on t1.service_id = t2.service_id,government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}]" -Find all the layer type codes with their corresponding usage count.,"SELECT analytical_layer_type_code , count(*) FROM analytical_layer GROUP BY analytical_layer_type_code",government_shift,[] -"For each analytical layer, return the analytical layer type code and the number of times it was used.","SELECT analytical_layer_type_code , count(*) FROM analytical_layer GROUP BY analytical_layer_type_code",government_shift,[] -Find details of all the services that have been marked as `` unsatisfied '' in customers and services details .,"select distinct t1.service_details from services as t1 join customers_and_services as t2 on t1.service_id = t2.service_id where t2.customers_and_services_details = ""unsatisfied""",government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}]" -"Which services have been rated as ""unsatisfied"" in customers and services details? Give me the service_details.","SELECT DISTINCT t1.service_details FROM services AS t1 JOIN customers_and_services AS t2 ON t1.service_id = t2.service_id WHERE t2.customers_and_services_details = ""Unsatisfied""",government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}]" +"Find the name of all the services which either have been used by customer ""Hardy Kutch"" or have been rated as ""good"" in one of the customer interactions.","SELECT DISTINCT t3.service_details FROM customers AS t1 JOIN customers_and_services AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id JOIN customer_interactions AS t4 ON t3.service_id = t4.service_id WHERE t1.customer_details = ""Hardy Kutch"" OR t4.services_and_channels_details = ""good""",government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}, {'table_name': 'customer interactions', 'table_schema': [{'col_name': 'customer interaction id'}, {'col_name': 'channel id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'status code'}, {'col_name': 'services and channels details'}], 'foreign_key_columns': ['customer id', 'channel id', 'service id'], 'primary_keys': ['customer interaction id']}]" +"Which services are used by the customer ""Hardy Kutch"" or are rated as ""good"" in a customer interaction? Give me the service details.","SELECT DISTINCT t3.service_details FROM customers AS t1 JOIN customers_and_services AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id JOIN customer_interactions AS t4 ON t3.service_id = t4.service_id WHERE t1.customer_details = ""Hardy Kutch"" OR t4.services_and_channels_details = ""good""",government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}, {'table_name': 'customer interactions', 'table_schema': [{'col_name': 'customer interaction id'}, {'col_name': 'channel id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'status code'}, {'col_name': 'services and channels details'}], 'foreign_key_columns': ['customer id', 'channel id', 'service id'], 'primary_keys': ['customer interaction id']}]" +"Find the names of all the services which both have been used by customer ""Hardy Kutch"" and have been rated ""bad"" in one of the customer interactions.","SELECT DISTINCT t3.service_details FROM customers AS t1 JOIN customers_and_services AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id JOIN customer_interactions AS t4 ON t3.service_id = t4.service_id WHERE t1.customer_details = ""Hardy Kutch"" AND t4.services_and_channels_details = ""bad""",government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}, {'table_name': 'customer interactions', 'table_schema': [{'col_name': 'customer interaction id'}, {'col_name': 'channel id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'status code'}, {'col_name': 'services and channels details'}], 'foreign_key_columns': ['customer id', 'channel id', 'service id'], 'primary_keys': ['customer interaction id']}]" +"Which services are both used by the customer ""Hardy Kutch"" and are rated as ""bad"" in a customer interaction? Give me the service details.","SELECT DISTINCT t3.service_details FROM customers AS t1 JOIN customers_and_services AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id JOIN customer_interactions AS t4 ON t3.service_id = t4.service_id WHERE t1.customer_details = ""Hardy Kutch"" AND t4.services_and_channels_details = ""bad""",government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}, {'table_name': 'customer interactions', 'table_schema': [{'col_name': 'customer interaction id'}, {'col_name': 'channel id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'status code'}, {'col_name': 'services and channels details'}], 'foreign_key_columns': ['customer id', 'channel id', 'service id'], 'primary_keys': ['customer interaction id']}]" +Find details of all the services that have interacted with `` 15 ij '' for the the channel details.,"select distinct t1.service_details from services as t1 join customer_interactions as t2 on t1.service_id = t2.service_id join channels as t3 on t2.channel_id = t3.channel_id where t3.channel_details = ""15 ij""",government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'channels', 'table_schema': [{'col_name': 'channel id'}, {'col_name': 'channel details'}], 'foreign_key_columns': [], 'primary_keys': ['channel id']}, {'table_name': 'customer interactions', 'table_schema': [{'col_name': 'customer interaction id'}, {'col_name': 'channel id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'status code'}, {'col_name': 'services and channels details'}], 'foreign_key_columns': ['customer id', 'channel id', 'service id'], 'primary_keys': ['customer interaction id']}]" +"Give me the details of all the services that have interacted with the channel with detail ""15 ij"".","SELECT DISTINCT t1.service_details FROM services AS t1 JOIN customer_interactions AS t2 ON t1.service_id = t2.service_id JOIN channels AS t3 ON t2.channel_id = t3.channel_id WHERE t3.channel_details = ""15 ij""",government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'channels', 'table_schema': [{'col_name': 'channel id'}, {'col_name': 'channel details'}], 'foreign_key_columns': [], 'primary_keys': ['channel id']}, {'table_name': 'customer interactions', 'table_schema': [{'col_name': 'customer interaction id'}, {'col_name': 'channel id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'status code'}, {'col_name': 'services and channels details'}], 'foreign_key_columns': ['customer id', 'channel id', 'service id'], 'primary_keys': ['customer interaction id']}]" +Find all the details of the customers who have been involved in an interaction with status `` Stuck '' and service and channel detail `` bad '' .,"select t1.customer_details from customers as t1 join customer_interactions as t2 on t1.customer_id = t2.customer_id where t2.status_code = ""stuck"" and services_and_channels_details = ""bad""",government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer interactions', 'table_schema': [{'col_name': 'customer interaction id'}, {'col_name': 'channel id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'status code'}, {'col_name': 'services and channels details'}], 'foreign_key_columns': ['customer id', 'channel id', 'service id'], 'primary_keys': ['customer interaction id']}]" +"Which customers have experienced status ""Stuck"" and service and channel detail ""bad"" in an interaction? Give me the customer details.","SELECT t1.customer_details FROM customers AS t1 JOIN customer_interactions AS t2 ON t1.customer_id = t2.customer_id WHERE t2.status_code = ""Stuck"" AND services_and_channels_details = ""bad""",government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer interactions', 'table_schema': [{'col_name': 'customer interaction id'}, {'col_name': 'channel id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'status code'}, {'col_name': 'services and channels details'}], 'foreign_key_columns': ['customer id', 'channel id', 'service id'], 'primary_keys': ['customer interaction id']}]" +How many integration platforms are successful?,"SELECT count(*) FROM integration_platform WHERE integration_platform_details = ""Success""",government_shift,"[{'table_name': 'integration platform', 'table_schema': [{'col_name': 'integration platform id'}, {'col_name': 'customer interaction id'}, {'col_name': 'integration platform details'}], 'foreign_key_columns': ['customer interaction id'], 'primary_keys': ['integration platform id']}]" +"Count the number of integration platforms that have ""Success"" in the details.","SELECT count(*) FROM integration_platform WHERE integration_platform_details = ""Success""",government_shift,"[{'table_name': 'integration platform', 'table_schema': [{'col_name': 'integration platform id'}, {'col_name': 'customer interaction id'}, {'col_name': 'integration platform details'}], 'foreign_key_columns': ['customer interaction id'], 'primary_keys': ['integration platform id']}]" +List the details of all the customers who are associated with a failed integration platform .,"select distinct t1.customer_details from customers as t1 join customer_interactions as t2 on t1.customer_id = t2.customer_id join integration_platform as t3 where t3.integration_platform_details = ""fail""",government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer interactions', 'table_schema': [{'col_name': 'customer interaction id'}, {'col_name': 'channel id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'status code'}, {'col_name': 'services and channels details'}], 'foreign_key_columns': ['customer id', 'channel id', 'service id'], 'primary_keys': ['customer interaction id']}, {'table_name': 'integration platform', 'table_schema': [{'col_name': 'integration platform id'}, {'col_name': 'customer interaction id'}, {'col_name': 'integration platform details'}], 'foreign_key_columns': ['customer interaction id'], 'primary_keys': ['integration platform id']}]" +"Which customers have integration platform details ""Fail"" in interactions? Give me the customer details.","SELECT DISTINCT t1.customer_details FROM customers AS t1 JOIN customer_interactions AS t2 ON t1.customer_id = t2.customer_id JOIN integration_platform AS t3 WHERE t3.integration_platform_details = ""Fail""",government_shift,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'customer details'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer interactions', 'table_schema': [{'col_name': 'customer interaction id'}, {'col_name': 'channel id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'status code'}, {'col_name': 'services and channels details'}], 'foreign_key_columns': ['customer id', 'channel id', 'service id'], 'primary_keys': ['customer interaction id']}, {'table_name': 'integration platform', 'table_schema': [{'col_name': 'integration platform id'}, {'col_name': 'customer interaction id'}, {'col_name': 'integration platform details'}], 'foreign_key_columns': ['customer interaction id'], 'primary_keys': ['integration platform id']}]" +Which service ( s ) has never been used by any customer ? List their details .,select service_details from services except select t2.service_details from customers_and_services as t1 join services as t2 on t1.service_id = t2.service_id,government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}]" +Find details of the services that no customer has ever used . Return the service details .,select service_details from services except select t2.service_details from customers_and_services as t1 join services as t2 on t1.service_id = t2.service_id,government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}]" +Find all the layer type codes with their corresponding usage count.,"SELECT analytical_layer_type_code , count(*) FROM analytical_layer GROUP BY analytical_layer_type_code",government_shift,"[{'table_name': 'analytical layer', 'table_schema': [{'col_name': 'analytical id'}, {'col_name': 'customers and services id'}, {'col_name': 'pattern recognition'}, {'col_name': 'analytical layer type code'}], 'foreign_key_columns': ['customers and services id'], 'primary_keys': ['analytical id']}]" +"For each analytical layer, return the analytical layer type code and the number of times it was used.","SELECT analytical_layer_type_code , count(*) FROM analytical_layer GROUP BY analytical_layer_type_code",government_shift,"[{'table_name': 'analytical layer', 'table_schema': [{'col_name': 'analytical id'}, {'col_name': 'customers and services id'}, {'col_name': 'pattern recognition'}, {'col_name': 'analytical layer type code'}], 'foreign_key_columns': ['customers and services id'], 'primary_keys': ['analytical id']}]" +Find details of all the services that have been marked as `` unsatisfied '' in customers and services details .,"select distinct t1.service_details from services as t1 join customers_and_services as t2 on t1.service_id = t2.service_id where t2.customers_and_services_details = ""unsatisfied""",government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}]" +"Which services have been rated as ""unsatisfied"" in customers and services details? Give me the service_details.","SELECT DISTINCT t1.service_details FROM services AS t1 JOIN customers_and_services AS t2 ON t1.service_id = t2.service_id WHERE t2.customers_and_services_details = ""Unsatisfied""",government_shift,"[{'table_name': 'services', 'table_schema': [{'col_name': 'service id'}, {'col_name': 'service details'}], 'foreign_key_columns': [], 'primary_keys': ['service id']}, {'table_name': 'customers and services', 'table_schema': [{'col_name': 'customers and services id'}, {'col_name': 'customer id'}, {'col_name': 'service id'}, {'col_name': 'customers and services details'}], 'foreign_key_columns': ['customer id', 'service id'], 'primary_keys': ['customers and services id']}]" How many vehicles do we have?,SELECT count(*) FROM vehicles,vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" Count the number of vehicles.,SELECT count(*) FROM vehicles,vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" Show names for all vehicles in descending order of model year.,SELECT name FROM vehicles ORDER BY model_year DESC,vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" @@ -422,52 +422,52 @@ What is the average age for customers with a membership credit above the average Return the average age for customers who have membership above the average across all customers.,SELECT avg(age) FROM customers WHERE membership_credit > (SELECT avg(membership_credit) FROM customers),vehicle_rent,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'membership credit'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" Show all information for all discounts.,SELECT * FROM discount,vehicle_rent,"[{'table_name': 'discount', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'membership credit'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" Return all information about discounts.,SELECT * FROM discount,vehicle_rent,"[{'table_name': 'discount', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'membership credit'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -Show the name and total hours of renting for each vehicle.,"SELECT T2.name , sum(T1.total_hours) FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id = T2.id GROUP BY T2.id",vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What are the names and total rental hours for each vehicle?,"SELECT T2.name , sum(T1.total_hours) FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id = T2.id GROUP BY T2.id",vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -Show the name of vehicles with no renting history.,SELECT name FROM vehicles WHERE id NOT IN (SELECT vehicles_id FROM renting_history),vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What are the names of vehicles that have never been rented?,SELECT name FROM vehicles WHERE id NOT IN (SELECT vehicles_id FROM renting_history),vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -Show the name of customer with at least two renting history records.,SELECT T2.name FROM renting_history AS T1 JOIN customers AS T2 ON T1.customer_id = T2.id GROUP BY T2.id HAVING count(*) >= 2,vehicle_rent,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'membership credit'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What are the names of customers who have two or more records of rental history?,SELECT T2.name FROM renting_history AS T1 JOIN customers AS T2 ON T1.customer_id = T2.id GROUP BY T2.id HAVING count(*) >= 2,vehicle_rent,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'membership credit'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -Show the name and model year of the vehicle with most number of renting history records.,"SELECT T2.name , T2.model_year FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1",vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What is the name and model year of the vehicle which has been rented the most times?,"SELECT T2.name , T2.model_year FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1",vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -Show the vehicle name with a descending order of total hours of renting.,SELECT T2.name FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id = T2.id GROUP BY T2.id ORDER BY sum(T1.total_hours) DESC,vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -"What are the names of vehicles, sorted descending by total hours of renting?",SELECT T2.name FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id = T2.id GROUP BY T2.id ORDER BY sum(T1.total_hours) DESC,vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What is the discount name with most number of renting history records?,SELECT T2.name FROM renting_history AS T1 JOIN discount AS T2 ON T1.discount_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1,vehicle_rent,"[{'table_name': 'discount', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'membership credit'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -Return the name of the discount that corresponds to the most rental history records.,SELECT T2.name FROM renting_history AS T1 JOIN discount AS T2 ON T1.discount_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1,vehicle_rent,"[{'table_name': 'discount', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'membership credit'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -Find the name and powertrain type of the cars that rented for more than 30 total hours.,"SELECT T2.name , T2.Type_of_powertrain FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id = T2.id GROUP BY T1.vehicles_id HAVING sum(T1.total_hours) > 30",vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What are the names and powertrain types of cars that have more than 30 total rental hours?,"SELECT T2.name , T2.Type_of_powertrain FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id = T2.id GROUP BY T1.vehicles_id HAVING sum(T1.total_hours) > 30",vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" +Show the name and total hours of renting for each vehicle.,"SELECT T2.name , sum(T1.total_hours) FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id = T2.id GROUP BY T2.id",vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'renting history', 'table_schema': [{'col_name': 'id'}, {'col_name': 'customer id'}, {'col_name': 'discount id'}, {'col_name': 'vehicles id'}, {'col_name': 'total hours'}], 'foreign_key_columns': ['discount id', 'vehicles id', 'customer id'], 'primary_keys': ['id']}]" +What are the names and total rental hours for each vehicle?,"SELECT T2.name , sum(T1.total_hours) FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id = T2.id GROUP BY T2.id",vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'renting history', 'table_schema': [{'col_name': 'id'}, {'col_name': 'customer id'}, {'col_name': 'discount id'}, {'col_name': 'vehicles id'}, {'col_name': 'total hours'}], 'foreign_key_columns': ['discount id', 'vehicles id', 'customer id'], 'primary_keys': ['id']}]" +Show the name of vehicles with no renting history.,SELECT name FROM vehicles WHERE id NOT IN (SELECT vehicles_id FROM renting_history),vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'renting history', 'table_schema': [{'col_name': 'id'}, {'col_name': 'customer id'}, {'col_name': 'discount id'}, {'col_name': 'vehicles id'}, {'col_name': 'total hours'}], 'foreign_key_columns': ['discount id', 'vehicles id', 'customer id'], 'primary_keys': ['id']}]" +What are the names of vehicles that have never been rented?,SELECT name FROM vehicles WHERE id NOT IN (SELECT vehicles_id FROM renting_history),vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'renting history', 'table_schema': [{'col_name': 'id'}, {'col_name': 'customer id'}, {'col_name': 'discount id'}, {'col_name': 'vehicles id'}, {'col_name': 'total hours'}], 'foreign_key_columns': ['discount id', 'vehicles id', 'customer id'], 'primary_keys': ['id']}]" +Show the name of customer with at least two renting history records.,SELECT T2.name FROM renting_history AS T1 JOIN customers AS T2 ON T1.customer_id = T2.id GROUP BY T2.id HAVING count(*) >= 2,vehicle_rent,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'membership credit'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'renting history', 'table_schema': [{'col_name': 'id'}, {'col_name': 'customer id'}, {'col_name': 'discount id'}, {'col_name': 'vehicles id'}, {'col_name': 'total hours'}], 'foreign_key_columns': ['discount id', 'vehicles id', 'customer id'], 'primary_keys': ['id']}]" +What are the names of customers who have two or more records of rental history?,SELECT T2.name FROM renting_history AS T1 JOIN customers AS T2 ON T1.customer_id = T2.id GROUP BY T2.id HAVING count(*) >= 2,vehicle_rent,"[{'table_name': 'customers', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'membership credit'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'renting history', 'table_schema': [{'col_name': 'id'}, {'col_name': 'customer id'}, {'col_name': 'discount id'}, {'col_name': 'vehicles id'}, {'col_name': 'total hours'}], 'foreign_key_columns': ['discount id', 'vehicles id', 'customer id'], 'primary_keys': ['id']}]" +Show the name and model year of the vehicle with most number of renting history records.,"SELECT T2.name , T2.model_year FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1",vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'renting history', 'table_schema': [{'col_name': 'id'}, {'col_name': 'customer id'}, {'col_name': 'discount id'}, {'col_name': 'vehicles id'}, {'col_name': 'total hours'}], 'foreign_key_columns': ['discount id', 'vehicles id', 'customer id'], 'primary_keys': ['id']}]" +What is the name and model year of the vehicle which has been rented the most times?,"SELECT T2.name , T2.model_year FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1",vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'renting history', 'table_schema': [{'col_name': 'id'}, {'col_name': 'customer id'}, {'col_name': 'discount id'}, {'col_name': 'vehicles id'}, {'col_name': 'total hours'}], 'foreign_key_columns': ['discount id', 'vehicles id', 'customer id'], 'primary_keys': ['id']}]" +Show the vehicle name with a descending order of total hours of renting.,SELECT T2.name FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id = T2.id GROUP BY T2.id ORDER BY sum(T1.total_hours) DESC,vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'renting history', 'table_schema': [{'col_name': 'id'}, {'col_name': 'customer id'}, {'col_name': 'discount id'}, {'col_name': 'vehicles id'}, {'col_name': 'total hours'}], 'foreign_key_columns': ['discount id', 'vehicles id', 'customer id'], 'primary_keys': ['id']}]" +"What are the names of vehicles, sorted descending by total hours of renting?",SELECT T2.name FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id = T2.id GROUP BY T2.id ORDER BY sum(T1.total_hours) DESC,vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'renting history', 'table_schema': [{'col_name': 'id'}, {'col_name': 'customer id'}, {'col_name': 'discount id'}, {'col_name': 'vehicles id'}, {'col_name': 'total hours'}], 'foreign_key_columns': ['discount id', 'vehicles id', 'customer id'], 'primary_keys': ['id']}]" +What is the discount name with most number of renting history records?,SELECT T2.name FROM renting_history AS T1 JOIN discount AS T2 ON T1.discount_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1,vehicle_rent,"[{'table_name': 'discount', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'membership credit'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'renting history', 'table_schema': [{'col_name': 'id'}, {'col_name': 'customer id'}, {'col_name': 'discount id'}, {'col_name': 'vehicles id'}, {'col_name': 'total hours'}], 'foreign_key_columns': ['discount id', 'vehicles id', 'customer id'], 'primary_keys': ['id']}]" +Return the name of the discount that corresponds to the most rental history records.,SELECT T2.name FROM renting_history AS T1 JOIN discount AS T2 ON T1.discount_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1,vehicle_rent,"[{'table_name': 'discount', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'membership credit'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'renting history', 'table_schema': [{'col_name': 'id'}, {'col_name': 'customer id'}, {'col_name': 'discount id'}, {'col_name': 'vehicles id'}, {'col_name': 'total hours'}], 'foreign_key_columns': ['discount id', 'vehicles id', 'customer id'], 'primary_keys': ['id']}]" +Find the name and powertrain type of the cars that rented for more than 30 total hours.,"SELECT T2.name , T2.Type_of_powertrain FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id = T2.id GROUP BY T1.vehicles_id HAVING sum(T1.total_hours) > 30",vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'renting history', 'table_schema': [{'col_name': 'id'}, {'col_name': 'customer id'}, {'col_name': 'discount id'}, {'col_name': 'vehicles id'}, {'col_name': 'total hours'}], 'foreign_key_columns': ['discount id', 'vehicles id', 'customer id'], 'primary_keys': ['id']}]" +What are the names and powertrain types of cars that have more than 30 total rental hours?,"SELECT T2.name , T2.Type_of_powertrain FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id = T2.id GROUP BY T1.vehicles_id HAVING sum(T1.total_hours) > 30",vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'renting history', 'table_schema': [{'col_name': 'id'}, {'col_name': 'customer id'}, {'col_name': 'discount id'}, {'col_name': 'vehicles id'}, {'col_name': 'total hours'}], 'foreign_key_columns': ['discount id', 'vehicles id', 'customer id'], 'primary_keys': ['id']}]" Find the average city and highway fuel rates for cars with different powertrain types.,"SELECT avg(City_fuel_economy_rate) , avg(Highway_fuel_economy_rate) , Type_of_powertrain FROM vehicles GROUP BY Type_of_powertrain",vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" "What are the average city fuel economy rate, average highway fuel economy rate for different types of powertrains?","SELECT avg(City_fuel_economy_rate) , avg(Highway_fuel_economy_rate) , Type_of_powertrain FROM vehicles GROUP BY Type_of_powertrain",vehicle_rent,"[{'table_name': 'vehicles', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'model year'}, {'col_name': 'type of powertrain'}, {'col_name': 'combined fuel economy rate'}, {'col_name': 'city fuel economy rate'}, {'col_name': 'highway fuel economy rate'}, {'col_name': 'cost per 25 miles'}, {'col_name': 'annual fuel cost'}, {'col_name': 'notes'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What is the average amount of a student loan?,SELECT avg(amount_of_loan) FROM Student_Loans,cre_Students_Information_Systems,[] -Compute the average amount of student loans.,SELECT avg(amount_of_loan) FROM Student_Loans,cre_Students_Information_Systems,[] +What is the average amount of a student loan?,SELECT avg(amount_of_loan) FROM Student_Loans,cre_Students_Information_Systems,"[{'table_name': 'student loans', 'table_schema': [{'col_name': 'student loan id'}, {'col_name': 'student id'}, {'col_name': 'date of loan'}, {'col_name': 'amount of loan'}, {'col_name': 'other details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['student loan id']}]" +Compute the average amount of student loans.,SELECT avg(amount_of_loan) FROM Student_Loans,cre_Students_Information_Systems,"[{'table_name': 'student loans', 'table_schema': [{'col_name': 'student loan id'}, {'col_name': 'student id'}, {'col_name': 'date of loan'}, {'col_name': 'amount of loan'}, {'col_name': 'other details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['student loan id']}]" List the biographical data and student id for the students who take 2 or more classes and the students who have less than 2 detentions.,"SELECT T1.bio_data , T1.student_id FROM Students AS T1 JOIN Classes AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) >= 2 UNION SELECT T1.bio_data , T1.student_id FROM Students AS T1 JOIN Detention AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) < 2",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'classes', 'table_schema': [{'col_name': 'class id'}, {'col_name': 'student id'}, {'col_name': 'teacher id'}, {'col_name': 'class details'}], 'foreign_key_columns': ['teacher id', 'student id'], 'primary_keys': ['class id']}, {'table_name': 'detention', 'table_schema': [{'col_name': 'detention id'}, {'col_name': 'detention type code'}, {'col_name': 'student id'}, {'col_name': 'datetime detention start'}, {'col_name': 'datetime detention end'}, {'col_name': 'detention summary'}, {'col_name': 'other details'}], 'foreign_key_columns': ['detention type code', 'student id'], 'primary_keys': ['detention id']}]" What are the biographical data and student id of the students who either took two or more classes and or have less than two detentions?,"SELECT T1.bio_data , T1.student_id FROM Students AS T1 JOIN Classes AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) >= 2 UNION SELECT T1.bio_data , T1.student_id FROM Students AS T1 JOIN Detention AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) < 2",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'classes', 'table_schema': [{'col_name': 'class id'}, {'col_name': 'student id'}, {'col_name': 'teacher id'}, {'col_name': 'class details'}], 'foreign_key_columns': ['teacher id', 'student id'], 'primary_keys': ['class id']}, {'table_name': 'detention', 'table_schema': [{'col_name': 'detention id'}, {'col_name': 'detention type code'}, {'col_name': 'student id'}, {'col_name': 'datetime detention start'}, {'col_name': 'datetime detention end'}, {'col_name': 'detention summary'}, {'col_name': 'other details'}], 'foreign_key_columns': ['detention type code', 'student id'], 'primary_keys': ['detention id']}]" List the details of the teachers who teach some class whose detail has the substring 'data' but do not teach a class whose detail contains the prefix 'net',SELECT T1.teacher_details FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.class_details LIKE '%data%' EXCEPT SELECT T1.teacher_details FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.class_details LIKE 'net%',cre_Students_Information_Systems,"[{'table_name': 'teachers', 'table_schema': [{'col_name': 'teacher id'}, {'col_name': 'teacher details'}], 'foreign_key_columns': [], 'primary_keys': ['teacher id']}, {'table_name': 'classes', 'table_schema': [{'col_name': 'class id'}, {'col_name': 'student id'}, {'col_name': 'teacher id'}, {'col_name': 'class details'}], 'foreign_key_columns': ['teacher id', 'student id'], 'primary_keys': ['class id']}]" Which teachers teach a class that has the substring 'data' in its detail but do not teach a class that has prefix 'net' in its detail? Give me the teacher details.,SELECT T1.teacher_details FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.class_details LIKE '%data%' EXCEPT SELECT T1.teacher_details FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.class_details LIKE 'net%',cre_Students_Information_Systems,"[{'table_name': 'teachers', 'table_schema': [{'col_name': 'teacher id'}, {'col_name': 'teacher details'}], 'foreign_key_columns': [], 'primary_keys': ['teacher id']}, {'table_name': 'classes', 'table_schema': [{'col_name': 'class id'}, {'col_name': 'student id'}, {'col_name': 'teacher id'}, {'col_name': 'class details'}], 'foreign_key_columns': ['teacher id', 'student id'], 'primary_keys': ['class id']}]" -List the biographical data of the students who never had a detention or student loan .,select bio_data from students where student_id not in (select t1.student_id from students as t1 join detention as t2 on t1.student_id = t2.student_id union select t1.student_id from students as t1 join student_loans as t2 on t1.student_id = t2.student_id),cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'detention', 'table_schema': [{'col_name': 'detention id'}, {'col_name': 'detention type code'}, {'col_name': 'student id'}, {'col_name': 'datetime detention start'}, {'col_name': 'datetime detention end'}, {'col_name': 'detention summary'}, {'col_name': 'other details'}], 'foreign_key_columns': ['detention type code', 'student id'], 'primary_keys': ['detention id']}]" -Which students never had a detention or student loan ? Find their biographical data .,select bio_data from students where student_id not in (select t1.student_id from students as t1 join detention as t2 on t1.student_id = t2.student_id union select t1.student_id from students as t1 join student_loans as t2 on t1.student_id = t2.student_id),cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'detention', 'table_schema': [{'col_name': 'detention id'}, {'col_name': 'detention type code'}, {'col_name': 'student id'}, {'col_name': 'datetime detention start'}, {'col_name': 'datetime detention end'}, {'col_name': 'detention summary'}, {'col_name': 'other details'}], 'foreign_key_columns': ['detention type code', 'student id'], 'primary_keys': ['detention id']}]" -What are the loan amounts and loan dates of the students who have at least 2 achievements?,"SELECT amount_of_loan , date_of_loan FROM Student_Loans WHERE student_id IN ( SELECT student_id FROM Achievements GROUP BY student_id HAVING count(*) >= 2 )",cre_Students_Information_Systems,"[{'table_name': 'achievements', 'table_schema': [{'col_name': 'achievement id'}, {'col_name': 'achievement type code'}, {'col_name': 'student id'}, {'col_name': 'date achievement'}, {'col_name': 'achievement details'}, {'col_name': 'other details'}], 'foreign_key_columns': ['achievement type code', 'student id'], 'primary_keys': ['achievement id']}]" -List the amount and date of loan for the students who have two or more achievements.,"SELECT amount_of_loan , date_of_loan FROM Student_Loans WHERE student_id IN ( SELECT student_id FROM Achievements GROUP BY student_id HAVING count(*) >= 2 )",cre_Students_Information_Systems,"[{'table_name': 'achievements', 'table_schema': [{'col_name': 'achievement id'}, {'col_name': 'achievement type code'}, {'col_name': 'student id'}, {'col_name': 'date achievement'}, {'col_name': 'achievement details'}, {'col_name': 'other details'}], 'foreign_key_columns': ['achievement type code', 'student id'], 'primary_keys': ['achievement id']}]" +List the biographical data of the students who never had a detention or student loan .,select bio_data from students where student_id not in (select t1.student_id from students as t1 join detention as t2 on t1.student_id = t2.student_id union select t1.student_id from students as t1 join student_loans as t2 on t1.student_id = t2.student_id),cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'student loans', 'table_schema': [{'col_name': 'student loan id'}, {'col_name': 'student id'}, {'col_name': 'date of loan'}, {'col_name': 'amount of loan'}, {'col_name': 'other details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['student loan id']}, {'table_name': 'detention', 'table_schema': [{'col_name': 'detention id'}, {'col_name': 'detention type code'}, {'col_name': 'student id'}, {'col_name': 'datetime detention start'}, {'col_name': 'datetime detention end'}, {'col_name': 'detention summary'}, {'col_name': 'other details'}], 'foreign_key_columns': ['detention type code', 'student id'], 'primary_keys': ['detention id']}]" +Which students never had a detention or student loan ? Find their biographical data .,select bio_data from students where student_id not in (select t1.student_id from students as t1 join detention as t2 on t1.student_id = t2.student_id union select t1.student_id from students as t1 join student_loans as t2 on t1.student_id = t2.student_id),cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'student loans', 'table_schema': [{'col_name': 'student loan id'}, {'col_name': 'student id'}, {'col_name': 'date of loan'}, {'col_name': 'amount of loan'}, {'col_name': 'other details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['student loan id']}, {'table_name': 'detention', 'table_schema': [{'col_name': 'detention id'}, {'col_name': 'detention type code'}, {'col_name': 'student id'}, {'col_name': 'datetime detention start'}, {'col_name': 'datetime detention end'}, {'col_name': 'detention summary'}, {'col_name': 'other details'}], 'foreign_key_columns': ['detention type code', 'student id'], 'primary_keys': ['detention id']}]" +What are the loan amounts and loan dates of the students who have at least 2 achievements?,"SELECT amount_of_loan , date_of_loan FROM Student_Loans WHERE student_id IN ( SELECT student_id FROM Achievements GROUP BY student_id HAVING count(*) >= 2 )",cre_Students_Information_Systems,"[{'table_name': 'student loans', 'table_schema': [{'col_name': 'student loan id'}, {'col_name': 'student id'}, {'col_name': 'date of loan'}, {'col_name': 'amount of loan'}, {'col_name': 'other details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['student loan id']}, {'table_name': 'achievements', 'table_schema': [{'col_name': 'achievement id'}, {'col_name': 'achievement type code'}, {'col_name': 'student id'}, {'col_name': 'date achievement'}, {'col_name': 'achievement details'}, {'col_name': 'other details'}], 'foreign_key_columns': ['achievement type code', 'student id'], 'primary_keys': ['achievement id']}]" +List the amount and date of loan for the students who have two or more achievements.,"SELECT amount_of_loan , date_of_loan FROM Student_Loans WHERE student_id IN ( SELECT student_id FROM Achievements GROUP BY student_id HAVING count(*) >= 2 )",cre_Students_Information_Systems,"[{'table_name': 'student loans', 'table_schema': [{'col_name': 'student loan id'}, {'col_name': 'student id'}, {'col_name': 'date of loan'}, {'col_name': 'amount of loan'}, {'col_name': 'other details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['student loan id']}, {'table_name': 'achievements', 'table_schema': [{'col_name': 'achievement id'}, {'col_name': 'achievement type code'}, {'col_name': 'student id'}, {'col_name': 'date achievement'}, {'col_name': 'achievement details'}, {'col_name': 'other details'}], 'foreign_key_columns': ['achievement type code', 'student id'], 'primary_keys': ['achievement id']}]" List the detail and id of the teacher who teaches the most courses.,"SELECT T1.teacher_details , T1.teacher_id FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id = T2.teacher_id GROUP BY T1.teacher_id ORDER BY count(*) DESC LIMIT 1",cre_Students_Information_Systems,"[{'table_name': 'teachers', 'table_schema': [{'col_name': 'teacher id'}, {'col_name': 'teacher details'}], 'foreign_key_columns': [], 'primary_keys': ['teacher id']}, {'table_name': 'classes', 'table_schema': [{'col_name': 'class id'}, {'col_name': 'student id'}, {'col_name': 'teacher id'}, {'col_name': 'class details'}], 'foreign_key_columns': ['teacher id', 'student id'], 'primary_keys': ['class id']}]" What are the detail and id of the teacher who teaches the largest number of courses?,"SELECT T1.teacher_details , T1.teacher_id FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id = T2.teacher_id GROUP BY T1.teacher_id ORDER BY count(*) DESC LIMIT 1",cre_Students_Information_Systems,"[{'table_name': 'teachers', 'table_schema': [{'col_name': 'teacher id'}, {'col_name': 'teacher details'}], 'foreign_key_columns': [], 'primary_keys': ['teacher id']}, {'table_name': 'classes', 'table_schema': [{'col_name': 'class id'}, {'col_name': 'student id'}, {'col_name': 'teacher id'}, {'col_name': 'class details'}], 'foreign_key_columns': ['teacher id', 'student id'], 'primary_keys': ['class id']}]" What are the distinct descriptions of all the detentions which have ever happened?,SELECT distinct(T1.detention_type_description) FROM Ref_Detention_Type AS T1 JOIN Detention AS T2 ON T1.detention_type_code = T2.detention_type_code,cre_Students_Information_Systems,"[{'table_name': 'detention', 'table_schema': [{'col_name': 'detention id'}, {'col_name': 'detention type code'}, {'col_name': 'student id'}, {'col_name': 'datetime detention start'}, {'col_name': 'datetime detention end'}, {'col_name': 'detention summary'}, {'col_name': 'other details'}], 'foreign_key_columns': ['detention type code', 'student id'], 'primary_keys': ['detention id']}]" Return the distinct descriptions of all the detentions that have happened.,SELECT distinct(T1.detention_type_description) FROM Ref_Detention_Type AS T1 JOIN Detention AS T2 ON T1.detention_type_code = T2.detention_type_code,cre_Students_Information_Systems,"[{'table_name': 'detention', 'table_schema': [{'col_name': 'detention id'}, {'col_name': 'detention type code'}, {'col_name': 'student id'}, {'col_name': 'datetime detention start'}, {'col_name': 'datetime detention end'}, {'col_name': 'detention summary'}, {'col_name': 'other details'}], 'foreign_key_columns': ['detention type code', 'student id'], 'primary_keys': ['detention id']}]" -List the personal details and the address type descriptions of all the students.,"SELECT DISTINCT T1.student_details , T3.address_type_description FROM Students AS T1 JOIN Students_Addresses AS T2 ON T1.student_id = T2.student_id JOIN Ref_Address_Types AS T3 ON T2.address_type_code = T3.address_type_code",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -What are the personal details and the address type descriptions of each student?,"SELECT DISTINCT T1.student_details , T3.address_type_description FROM Students AS T1 JOIN Students_Addresses AS T2 ON T1.student_id = T2.student_id JOIN Ref_Address_Types AS T3 ON T2.address_type_code = T3.address_type_code",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -List the the address details and the biographical information of the students.,"SELECT T1.address_details , T3.bio_data FROM Addresses AS T1 JOIN Students_Addresses AS T2 ON T1.address_id = T2.address_id JOIN Students AS T3 ON T2.student_id = T3.student_id",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'addresses', 'table_schema': [{'col_name': 'address id'}, {'col_name': 'address details'}], 'foreign_key_columns': [], 'primary_keys': ['address id']}]" -What are the address details and biographical information of each student?,"SELECT T1.address_details , T3.bio_data FROM Addresses AS T1 JOIN Students_Addresses AS T2 ON T1.address_id = T2.address_id JOIN Students AS T3 ON T2.student_id = T3.student_id",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'addresses', 'table_schema': [{'col_name': 'address id'}, {'col_name': 'address details'}], 'foreign_key_columns': [], 'primary_keys': ['address id']}]" +List the personal details and the address type descriptions of all the students.,"SELECT DISTINCT T1.student_details , T3.address_type_description FROM Students AS T1 JOIN Students_Addresses AS T2 ON T1.student_id = T2.student_id JOIN Ref_Address_Types AS T3 ON T2.address_type_code = T3.address_type_code",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'students addresses', 'table_schema': [{'col_name': 'student address id'}, {'col_name': 'address id'}, {'col_name': 'address type code'}, {'col_name': 'student id'}, {'col_name': 'date from'}, {'col_name': 'date to'}], 'foreign_key_columns': ['address type code', 'address id', 'student id'], 'primary_keys': ['student address id']}]" +What are the personal details and the address type descriptions of each student?,"SELECT DISTINCT T1.student_details , T3.address_type_description FROM Students AS T1 JOIN Students_Addresses AS T2 ON T1.student_id = T2.student_id JOIN Ref_Address_Types AS T3 ON T2.address_type_code = T3.address_type_code",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'students addresses', 'table_schema': [{'col_name': 'student address id'}, {'col_name': 'address id'}, {'col_name': 'address type code'}, {'col_name': 'student id'}, {'col_name': 'date from'}, {'col_name': 'date to'}], 'foreign_key_columns': ['address type code', 'address id', 'student id'], 'primary_keys': ['student address id']}]" +List the the address details and the biographical information of the students.,"SELECT T1.address_details , T3.bio_data FROM Addresses AS T1 JOIN Students_Addresses AS T2 ON T1.address_id = T2.address_id JOIN Students AS T3 ON T2.student_id = T3.student_id",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'addresses', 'table_schema': [{'col_name': 'address id'}, {'col_name': 'address details'}], 'foreign_key_columns': [], 'primary_keys': ['address id']}, {'table_name': 'students addresses', 'table_schema': [{'col_name': 'student address id'}, {'col_name': 'address id'}, {'col_name': 'address type code'}, {'col_name': 'student id'}, {'col_name': 'date from'}, {'col_name': 'date to'}], 'foreign_key_columns': ['address type code', 'address id', 'student id'], 'primary_keys': ['student address id']}]" +What are the address details and biographical information of each student?,"SELECT T1.address_details , T3.bio_data FROM Addresses AS T1 JOIN Students_Addresses AS T2 ON T1.address_id = T2.address_id JOIN Students AS T3 ON T2.student_id = T3.student_id",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'addresses', 'table_schema': [{'col_name': 'address id'}, {'col_name': 'address details'}], 'foreign_key_columns': [], 'primary_keys': ['address id']}, {'table_name': 'students addresses', 'table_schema': [{'col_name': 'student address id'}, {'col_name': 'address id'}, {'col_name': 'address type code'}, {'col_name': 'student id'}, {'col_name': 'date from'}, {'col_name': 'date to'}], 'foreign_key_columns': ['address type code', 'address id', 'student id'], 'primary_keys': ['student address id']}]" List the biographical data and the date of the transcript of all the students.,"SELECT T1.bio_data , T2.date_of_transcript FROM Students AS T1 JOIN Transcripts AS T2 ON T1.student_id = T2.student_id",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'transcripts', 'table_schema': [{'col_name': 'transcript id'}, {'col_name': 'student id'}, {'col_name': 'date of transcript'}, {'col_name': 'transcript details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['transcript id']}]" What are the biographical data and the date of transcript issuance of each student?,"SELECT T1.bio_data , T2.date_of_transcript FROM Students AS T1 JOIN Transcripts AS T2 ON T1.student_id = T2.student_id",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'transcripts', 'table_schema': [{'col_name': 'transcript id'}, {'col_name': 'student id'}, {'col_name': 'date of transcript'}, {'col_name': 'transcript details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['transcript id']}]" -How many students got the most common result in the behavioral monitoring details? Also list the result details.,"SELECT count(DISTINCT student_id) , behaviour_monitoring_details FROM Behaviour_Monitoring GROUP BY behaviour_monitoring_details ORDER BY count(*) DESC LIMIT 1",cre_Students_Information_Systems,[] -Find the most common result in the behavioral monitoring details. What are the count and the details of this result?,"SELECT count(DISTINCT student_id) , behaviour_monitoring_details FROM Behaviour_Monitoring GROUP BY behaviour_monitoring_details ORDER BY count(*) DESC LIMIT 1",cre_Students_Information_Systems,[] -Which students not only got the most common result but also got a result obtained by 3 students in behaviour monitoring? List the student's biographical data and details.,"SELECT T1.bio_data , T1.student_details FROM Students AS T1 JOIN Behaviour_Monitoring AS T2 ON T1.student_id = T2.student_id WHERE T2.behaviour_monitoring_details IN ( SELECT behaviour_monitoring_details FROM Behaviour_Monitoring GROUP BY behaviour_monitoring_details ORDER BY count(*) DESC LIMIT 1 ) INTERSECT SELECT T1.bio_data , T1.student_details FROM Students AS T1 JOIN Behaviour_Monitoring AS T2 ON T1.student_id = T2.student_id WHERE T2.behaviour_monitoring_details IN ( SELECT behaviour_monitoring_details FROM Behaviour_Monitoring GROUP BY behaviour_monitoring_details HAVING count(*) = 3 )",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -Find the biographical data and details of students who got not only the most common result but also a result that is obtained by 3 students in behaviour monitoring.,"SELECT T1.bio_data , T1.student_details FROM Students AS T1 JOIN Behaviour_Monitoring AS T2 ON T1.student_id = T2.student_id WHERE T2.behaviour_monitoring_details IN ( SELECT behaviour_monitoring_details FROM Behaviour_Monitoring GROUP BY behaviour_monitoring_details ORDER BY count(*) DESC LIMIT 1 ) INTERSECT SELECT T1.bio_data , T1.student_details FROM Students AS T1 JOIN Behaviour_Monitoring AS T2 ON T1.student_id = T2.student_id WHERE T2.behaviour_monitoring_details IN ( SELECT behaviour_monitoring_details FROM Behaviour_Monitoring GROUP BY behaviour_monitoring_details HAVING count(*) = 3 )",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -Which students only got the most common result for his or her all behaviour monitoring details? List the students' biographical information.,SELECT T1.bio_data FROM Students AS T1 JOIN Behaviour_Monitoring AS T2 ON T1.student_id = T2.student_id WHERE T2.behaviour_monitoring_details IN ( SELECT behaviour_monitoring_details FROM Behaviour_Monitoring GROUP BY behaviour_monitoring_details ORDER BY count(*) DESC LIMIT 1 ) EXCEPT SELECT T1.bio_data FROM Students AS T1 JOIN Behaviour_Monitoring AS T2 ON T1.student_id = T2.student_id WHERE T2.behaviour_monitoring_details NOT IN ( SELECT behaviour_monitoring_details FROM Behaviour_Monitoring GROUP BY behaviour_monitoring_details ORDER BY count(*) DESC LIMIT 1 ),cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -What is the biographical information of the students who got the most common result for their behaviour monitoring details ?,select t1.bio_data from students as t1 join behaviour_monitoring as t2 on t1.student_id = t2.student_id where t2.behaviour_monitoring_details in ( select behaviour_monitoring_details from behaviour_monitoring group by behaviour_monitoring_details order by count(*) desc limit 1 ) except select t1.bio_data from students as t1 join behaviour_monitoring as t2 on t1.student_id = t2.student_id where t2.behaviour_monitoring_details not in ( select behaviour_monitoring_details from behaviour_monitoring group by behaviour_monitoring_details order by count(*) desc limit 1 ),cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -Which students have gone through any event? List the students' biographical data and event date.,"SELECT T1.bio_data , T2.event_date FROM Students AS T1 JOIN Student_Events AS T2 ON T1.student_id = T2.student_id",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -Find the biographical data and event date for students who participated in any events.,"SELECT T1.bio_data , T2.event_date FROM Students AS T1 JOIN Student_Events AS T2 ON T1.student_id = T2.student_id",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -"How many students have joined in the most common type of event? List the number, the event type and description.","SELECT count(*) , T2.event_type_code , T3.event_type_description FROM Students AS T1 JOIN Student_Events AS T2 ON T1.student_id = T2.student_id JOIN Ref_Event_Types AS T3 ON T2.event_type_code = T3.event_type_code GROUP BY T2.event_type_code ORDER BY count(*) DESC LIMIT 1",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -"What is the type of event the most students joined? Give me the number of students, and the event type code and description.","SELECT count(*) , T2.event_type_code , T3.event_type_description FROM Students AS T1 JOIN Student_Events AS T2 ON T1.student_id = T2.student_id JOIN Ref_Event_Types AS T3 ON T2.event_type_code = T3.event_type_code GROUP BY T2.event_type_code ORDER BY count(*) DESC LIMIT 1",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" +How many students got the most common result in the behavioral monitoring details? Also list the result details.,"SELECT count(DISTINCT student_id) , behaviour_monitoring_details FROM Behaviour_Monitoring GROUP BY behaviour_monitoring_details ORDER BY count(*) DESC LIMIT 1",cre_Students_Information_Systems,"[{'table_name': 'behaviour monitoring', 'table_schema': [{'col_name': 'behaviour monitoring id'}, {'col_name': 'student id'}, {'col_name': 'behaviour monitoring details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['behaviour monitoring id']}]" +Find the most common result in the behavioral monitoring details. What are the count and the details of this result?,"SELECT count(DISTINCT student_id) , behaviour_monitoring_details FROM Behaviour_Monitoring GROUP BY behaviour_monitoring_details ORDER BY count(*) DESC LIMIT 1",cre_Students_Information_Systems,"[{'table_name': 'behaviour monitoring', 'table_schema': [{'col_name': 'behaviour monitoring id'}, {'col_name': 'student id'}, {'col_name': 'behaviour monitoring details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['behaviour monitoring id']}]" +Which students not only got the most common result but also got a result obtained by 3 students in behaviour monitoring? List the student's biographical data and details.,"SELECT T1.bio_data , T1.student_details FROM Students AS T1 JOIN Behaviour_Monitoring AS T2 ON T1.student_id = T2.student_id WHERE T2.behaviour_monitoring_details IN ( SELECT behaviour_monitoring_details FROM Behaviour_Monitoring GROUP BY behaviour_monitoring_details ORDER BY count(*) DESC LIMIT 1 ) INTERSECT SELECT T1.bio_data , T1.student_details FROM Students AS T1 JOIN Behaviour_Monitoring AS T2 ON T1.student_id = T2.student_id WHERE T2.behaviour_monitoring_details IN ( SELECT behaviour_monitoring_details FROM Behaviour_Monitoring GROUP BY behaviour_monitoring_details HAVING count(*) = 3 )",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'behaviour monitoring', 'table_schema': [{'col_name': 'behaviour monitoring id'}, {'col_name': 'student id'}, {'col_name': 'behaviour monitoring details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['behaviour monitoring id']}]" +Find the biographical data and details of students who got not only the most common result but also a result that is obtained by 3 students in behaviour monitoring.,"SELECT T1.bio_data , T1.student_details FROM Students AS T1 JOIN Behaviour_Monitoring AS T2 ON T1.student_id = T2.student_id WHERE T2.behaviour_monitoring_details IN ( SELECT behaviour_monitoring_details FROM Behaviour_Monitoring GROUP BY behaviour_monitoring_details ORDER BY count(*) DESC LIMIT 1 ) INTERSECT SELECT T1.bio_data , T1.student_details FROM Students AS T1 JOIN Behaviour_Monitoring AS T2 ON T1.student_id = T2.student_id WHERE T2.behaviour_monitoring_details IN ( SELECT behaviour_monitoring_details FROM Behaviour_Monitoring GROUP BY behaviour_monitoring_details HAVING count(*) = 3 )",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'behaviour monitoring', 'table_schema': [{'col_name': 'behaviour monitoring id'}, {'col_name': 'student id'}, {'col_name': 'behaviour monitoring details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['behaviour monitoring id']}]" +Which students only got the most common result for his or her all behaviour monitoring details? List the students' biographical information.,SELECT T1.bio_data FROM Students AS T1 JOIN Behaviour_Monitoring AS T2 ON T1.student_id = T2.student_id WHERE T2.behaviour_monitoring_details IN ( SELECT behaviour_monitoring_details FROM Behaviour_Monitoring GROUP BY behaviour_monitoring_details ORDER BY count(*) DESC LIMIT 1 ) EXCEPT SELECT T1.bio_data FROM Students AS T1 JOIN Behaviour_Monitoring AS T2 ON T1.student_id = T2.student_id WHERE T2.behaviour_monitoring_details NOT IN ( SELECT behaviour_monitoring_details FROM Behaviour_Monitoring GROUP BY behaviour_monitoring_details ORDER BY count(*) DESC LIMIT 1 ),cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'behaviour monitoring', 'table_schema': [{'col_name': 'behaviour monitoring id'}, {'col_name': 'student id'}, {'col_name': 'behaviour monitoring details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['behaviour monitoring id']}]" +What is the biographical information of the students who got the most common result for their behaviour monitoring details ?,select t1.bio_data from students as t1 join behaviour_monitoring as t2 on t1.student_id = t2.student_id where t2.behaviour_monitoring_details in ( select behaviour_monitoring_details from behaviour_monitoring group by behaviour_monitoring_details order by count(*) desc limit 1 ) except select t1.bio_data from students as t1 join behaviour_monitoring as t2 on t1.student_id = t2.student_id where t2.behaviour_monitoring_details not in ( select behaviour_monitoring_details from behaviour_monitoring group by behaviour_monitoring_details order by count(*) desc limit 1 ),cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'behaviour monitoring', 'table_schema': [{'col_name': 'behaviour monitoring id'}, {'col_name': 'student id'}, {'col_name': 'behaviour monitoring details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['behaviour monitoring id']}]" +Which students have gone through any event? List the students' biographical data and event date.,"SELECT T1.bio_data , T2.event_date FROM Students AS T1 JOIN Student_Events AS T2 ON T1.student_id = T2.student_id",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'student events', 'table_schema': [{'col_name': 'event id'}, {'col_name': 'event type code'}, {'col_name': 'student id'}, {'col_name': 'event date'}, {'col_name': 'other details'}], 'foreign_key_columns': ['event type code', 'student id'], 'primary_keys': ['event id']}]" +Find the biographical data and event date for students who participated in any events.,"SELECT T1.bio_data , T2.event_date FROM Students AS T1 JOIN Student_Events AS T2 ON T1.student_id = T2.student_id",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'student events', 'table_schema': [{'col_name': 'event id'}, {'col_name': 'event type code'}, {'col_name': 'student id'}, {'col_name': 'event date'}, {'col_name': 'other details'}], 'foreign_key_columns': ['event type code', 'student id'], 'primary_keys': ['event id']}]" +"How many students have joined in the most common type of event? List the number, the event type and description.","SELECT count(*) , T2.event_type_code , T3.event_type_description FROM Students AS T1 JOIN Student_Events AS T2 ON T1.student_id = T2.student_id JOIN Ref_Event_Types AS T3 ON T2.event_type_code = T3.event_type_code GROUP BY T2.event_type_code ORDER BY count(*) DESC LIMIT 1",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'student events', 'table_schema': [{'col_name': 'event id'}, {'col_name': 'event type code'}, {'col_name': 'student id'}, {'col_name': 'event date'}, {'col_name': 'other details'}], 'foreign_key_columns': ['event type code', 'student id'], 'primary_keys': ['event id']}]" +"What is the type of event the most students joined? Give me the number of students, and the event type code and description.","SELECT count(*) , T2.event_type_code , T3.event_type_description FROM Students AS T1 JOIN Student_Events AS T2 ON T1.student_id = T2.student_id JOIN Ref_Event_Types AS T3 ON T2.event_type_code = T3.event_type_code GROUP BY T2.event_type_code ORDER BY count(*) DESC LIMIT 1",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'student events', 'table_schema': [{'col_name': 'event id'}, {'col_name': 'event type code'}, {'col_name': 'student id'}, {'col_name': 'event date'}, {'col_name': 'other details'}], 'foreign_key_columns': ['event type code', 'student id'], 'primary_keys': ['event id']}]" How are all the achievements described? List the achievement detail and the type description.,"SELECT T1.achievement_details , T2.achievement_type_description FROM Achievements AS T1 JOIN Ref_Achievement_Type AS T2 ON T1.achievement_type_code = T2.achievement_type_code",cre_Students_Information_Systems,"[{'table_name': 'achievements', 'table_schema': [{'col_name': 'achievement id'}, {'col_name': 'achievement type code'}, {'col_name': 'student id'}, {'col_name': 'date achievement'}, {'col_name': 'achievement details'}, {'col_name': 'other details'}], 'foreign_key_columns': ['achievement type code', 'student id'], 'primary_keys': ['achievement id']}]" What are the achievement detail and the type description of each achievements?,"SELECT T1.achievement_details , T2.achievement_type_description FROM Achievements AS T1 JOIN Ref_Achievement_Type AS T2 ON T1.achievement_type_code = T2.achievement_type_code",cre_Students_Information_Systems,"[{'table_name': 'achievements', 'table_schema': [{'col_name': 'achievement id'}, {'col_name': 'achievement type code'}, {'col_name': 'student id'}, {'col_name': 'date achievement'}, {'col_name': 'achievement details'}, {'col_name': 'other details'}], 'foreign_key_columns': ['achievement type code', 'student id'], 'primary_keys': ['achievement id']}]" How many teachers have taught a student who has not won any achievements?,SELECT count(DISTINCT T1.teacher_id) FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.student_id NOT IN ( SELECT student_id FROM Achievements ),cre_Students_Information_Systems,"[{'table_name': 'teachers', 'table_schema': [{'col_name': 'teacher id'}, {'col_name': 'teacher details'}], 'foreign_key_columns': [], 'primary_keys': ['teacher id']}, {'table_name': 'classes', 'table_schema': [{'col_name': 'class id'}, {'col_name': 'student id'}, {'col_name': 'teacher id'}, {'col_name': 'class details'}], 'foreign_key_columns': ['teacher id', 'student id'], 'primary_keys': ['class id']}, {'table_name': 'achievements', 'table_schema': [{'col_name': 'achievement id'}, {'col_name': 'achievement type code'}, {'col_name': 'student id'}, {'col_name': 'date achievement'}, {'col_name': 'achievement details'}, {'col_name': 'other details'}], 'foreign_key_columns': ['achievement type code', 'student id'], 'primary_keys': ['achievement id']}]" @@ -490,28 +490,28 @@ Which students take 2 courses? List student id and details.,"SELECT T1.student_i What are the ids and details of the students who take 2 courses?,"SELECT T1.student_id , T1.student_details FROM Students AS T1 JOIN Classes AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) = 2",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'classes', 'table_schema': [{'col_name': 'class id'}, {'col_name': 'student id'}, {'col_name': 'teacher id'}, {'col_name': 'class details'}], 'foreign_key_columns': ['teacher id', 'student id'], 'primary_keys': ['class id']}]" What is the least common detention type? Show the type code and the description.,"SELECT T1.detention_type_code , T2.detention_type_description FROM Detention AS T1 JOIN Ref_Detention_Type AS T2 ON T1.detention_type_code = T2.detention_type_code GROUP BY T1.detention_type_code ORDER BY count(*) ASC LIMIT 1",cre_Students_Information_Systems,"[{'table_name': 'detention', 'table_schema': [{'col_name': 'detention id'}, {'col_name': 'detention type code'}, {'col_name': 'student id'}, {'col_name': 'datetime detention start'}, {'col_name': 'datetime detention end'}, {'col_name': 'detention summary'}, {'col_name': 'other details'}], 'foreign_key_columns': ['detention type code', 'student id'], 'primary_keys': ['detention id']}]" Give me the type code and description of the least common detention type.,"SELECT T1.detention_type_code , T2.detention_type_description FROM Detention AS T1 JOIN Ref_Detention_Type AS T2 ON T1.detention_type_code = T2.detention_type_code GROUP BY T1.detention_type_code ORDER BY count(*) ASC LIMIT 1",cre_Students_Information_Systems,"[{'table_name': 'detention', 'table_schema': [{'col_name': 'detention id'}, {'col_name': 'detention type code'}, {'col_name': 'student id'}, {'col_name': 'datetime detention start'}, {'col_name': 'datetime detention end'}, {'col_name': 'detention summary'}, {'col_name': 'other details'}], 'foreign_key_columns': ['detention type code', 'student id'], 'primary_keys': ['detention id']}]" -Which students have a student loan more than the average amount? List the students' biographical data and the details.,"SELECT T1.bio_data , T1.student_details FROM Students AS T1 JOIN Student_Loans AS T2 ON T1.student_id = T2.student_id WHERE T2.amount_of_loan > ( SELECT avg(amount_of_loan) FROM Student_Loans )",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -Find the biographical data and details for students whose student loan is above the average amount.,"SELECT T1.bio_data , T1.student_details FROM Students AS T1 JOIN Student_Loans AS T2 ON T1.student_id = T2.student_id WHERE T2.amount_of_loan > ( SELECT avg(amount_of_loan) FROM Student_Loans )",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -When was the earliest date of loan?,SELECT date_of_loan FROM Student_Loans ORDER BY date_of_loan ASC LIMIT 1,cre_Students_Information_Systems,[] -Return the earliest date of loan in the record.,SELECT date_of_loan FROM Student_Loans ORDER BY date_of_loan ASC LIMIT 1,cre_Students_Information_Systems,[] -Which student has the loan with the minimum value? List the student's biographical information.,SELECT T1.bio_data FROM Students AS T1 JOIN Student_Loans AS T2 ON T1.student_id = T2.student_id ORDER BY T2.amount_of_loan ASC LIMIT 1,cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -Find the biographical information of the student with the smallest student loan.,SELECT T1.bio_data FROM Students AS T1 JOIN Student_Loans AS T2 ON T1.student_id = T2.student_id ORDER BY T2.amount_of_loan ASC LIMIT 1,cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -When was the transcript issued for the student with loan of maximum value?,SELECT T1.date_of_transcript FROM Transcripts AS T1 JOIN Student_Loans AS T2 ON T1.student_id = T2.student_id ORDER BY T2.amount_of_loan DESC LIMIT 1,cre_Students_Information_Systems,"[{'table_name': 'transcripts', 'table_schema': [{'col_name': 'transcript id'}, {'col_name': 'student id'}, {'col_name': 'date of transcript'}, {'col_name': 'transcript details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['transcript id']}]" -What is the transcript issuance date for the student with the largest amount of loan?,SELECT T1.date_of_transcript FROM Transcripts AS T1 JOIN Student_Loans AS T2 ON T1.student_id = T2.student_id ORDER BY T2.amount_of_loan DESC LIMIT 1,cre_Students_Information_Systems,"[{'table_name': 'transcripts', 'table_schema': [{'col_name': 'transcript id'}, {'col_name': 'student id'}, {'col_name': 'date of transcript'}, {'col_name': 'transcript details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['transcript id']}]" +Which students have a student loan more than the average amount? List the students' biographical data and the details.,"SELECT T1.bio_data , T1.student_details FROM Students AS T1 JOIN Student_Loans AS T2 ON T1.student_id = T2.student_id WHERE T2.amount_of_loan > ( SELECT avg(amount_of_loan) FROM Student_Loans )",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'student loans', 'table_schema': [{'col_name': 'student loan id'}, {'col_name': 'student id'}, {'col_name': 'date of loan'}, {'col_name': 'amount of loan'}, {'col_name': 'other details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['student loan id']}]" +Find the biographical data and details for students whose student loan is above the average amount.,"SELECT T1.bio_data , T1.student_details FROM Students AS T1 JOIN Student_Loans AS T2 ON T1.student_id = T2.student_id WHERE T2.amount_of_loan > ( SELECT avg(amount_of_loan) FROM Student_Loans )",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'student loans', 'table_schema': [{'col_name': 'student loan id'}, {'col_name': 'student id'}, {'col_name': 'date of loan'}, {'col_name': 'amount of loan'}, {'col_name': 'other details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['student loan id']}]" +When was the earliest date of loan?,SELECT date_of_loan FROM Student_Loans ORDER BY date_of_loan ASC LIMIT 1,cre_Students_Information_Systems,"[{'table_name': 'student loans', 'table_schema': [{'col_name': 'student loan id'}, {'col_name': 'student id'}, {'col_name': 'date of loan'}, {'col_name': 'amount of loan'}, {'col_name': 'other details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['student loan id']}]" +Return the earliest date of loan in the record.,SELECT date_of_loan FROM Student_Loans ORDER BY date_of_loan ASC LIMIT 1,cre_Students_Information_Systems,"[{'table_name': 'student loans', 'table_schema': [{'col_name': 'student loan id'}, {'col_name': 'student id'}, {'col_name': 'date of loan'}, {'col_name': 'amount of loan'}, {'col_name': 'other details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['student loan id']}]" +Which student has the loan with the minimum value? List the student's biographical information.,SELECT T1.bio_data FROM Students AS T1 JOIN Student_Loans AS T2 ON T1.student_id = T2.student_id ORDER BY T2.amount_of_loan ASC LIMIT 1,cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'student loans', 'table_schema': [{'col_name': 'student loan id'}, {'col_name': 'student id'}, {'col_name': 'date of loan'}, {'col_name': 'amount of loan'}, {'col_name': 'other details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['student loan id']}]" +Find the biographical information of the student with the smallest student loan.,SELECT T1.bio_data FROM Students AS T1 JOIN Student_Loans AS T2 ON T1.student_id = T2.student_id ORDER BY T2.amount_of_loan ASC LIMIT 1,cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'student loans', 'table_schema': [{'col_name': 'student loan id'}, {'col_name': 'student id'}, {'col_name': 'date of loan'}, {'col_name': 'amount of loan'}, {'col_name': 'other details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['student loan id']}]" +When was the transcript issued for the student with loan of maximum value?,SELECT T1.date_of_transcript FROM Transcripts AS T1 JOIN Student_Loans AS T2 ON T1.student_id = T2.student_id ORDER BY T2.amount_of_loan DESC LIMIT 1,cre_Students_Information_Systems,"[{'table_name': 'transcripts', 'table_schema': [{'col_name': 'transcript id'}, {'col_name': 'student id'}, {'col_name': 'date of transcript'}, {'col_name': 'transcript details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['transcript id']}, {'table_name': 'student loans', 'table_schema': [{'col_name': 'student loan id'}, {'col_name': 'student id'}, {'col_name': 'date of loan'}, {'col_name': 'amount of loan'}, {'col_name': 'other details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['student loan id']}]" +What is the transcript issuance date for the student with the largest amount of loan?,SELECT T1.date_of_transcript FROM Transcripts AS T1 JOIN Student_Loans AS T2 ON T1.student_id = T2.student_id ORDER BY T2.amount_of_loan DESC LIMIT 1,cre_Students_Information_Systems,"[{'table_name': 'transcripts', 'table_schema': [{'col_name': 'transcript id'}, {'col_name': 'student id'}, {'col_name': 'date of transcript'}, {'col_name': 'transcript details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['transcript id']}, {'table_name': 'student loans', 'table_schema': [{'col_name': 'student loan id'}, {'col_name': 'student id'}, {'col_name': 'date of loan'}, {'col_name': 'amount of loan'}, {'col_name': 'other details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['student loan id']}]" Which teachers have taught the student with the earliest transcript issuance? List the teacher details.,SELECT T1.teacher_details FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id = T2.teacher_id JOIN Transcripts AS T3 ON T2.student_id = T3.student_id ORDER BY T3.date_of_transcript ASC LIMIT 1,cre_Students_Information_Systems,"[{'table_name': 'transcripts', 'table_schema': [{'col_name': 'transcript id'}, {'col_name': 'student id'}, {'col_name': 'date of transcript'}, {'col_name': 'transcript details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['transcript id']}, {'table_name': 'teachers', 'table_schema': [{'col_name': 'teacher id'}, {'col_name': 'teacher details'}], 'foreign_key_columns': [], 'primary_keys': ['teacher id']}, {'table_name': 'classes', 'table_schema': [{'col_name': 'class id'}, {'col_name': 'student id'}, {'col_name': 'teacher id'}, {'col_name': 'class details'}], 'foreign_key_columns': ['teacher id', 'student id'], 'primary_keys': ['class id']}]" Find the details of the teachers who have taught the student with the earliest transcript issuance.,SELECT T1.teacher_details FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id = T2.teacher_id JOIN Transcripts AS T3 ON T2.student_id = T3.student_id ORDER BY T3.date_of_transcript ASC LIMIT 1,cre_Students_Information_Systems,"[{'table_name': 'transcripts', 'table_schema': [{'col_name': 'transcript id'}, {'col_name': 'student id'}, {'col_name': 'date of transcript'}, {'col_name': 'transcript details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['transcript id']}, {'table_name': 'teachers', 'table_schema': [{'col_name': 'teacher id'}, {'col_name': 'teacher details'}], 'foreign_key_columns': [], 'primary_keys': ['teacher id']}, {'table_name': 'classes', 'table_schema': [{'col_name': 'class id'}, {'col_name': 'student id'}, {'col_name': 'teacher id'}, {'col_name': 'class details'}], 'foreign_key_columns': ['teacher id', 'student id'], 'primary_keys': ['class id']}]" -How much total loan does each student have ? List the student ids and the amounts .,"select student_id , sum(amount_of_loan) from student_loans group by student_id",cre_Students_Information_Systems,[] -"For each student, find the student id and the total amount of loan he or she has.","SELECT student_id , sum(amount_of_loan) FROM Student_Loans GROUP BY student_id",cre_Students_Information_Systems,[] +How much total loan does each student have ? List the student ids and the amounts .,"select student_id , sum(amount_of_loan) from student_loans group by student_id",cre_Students_Information_Systems,"[{'table_name': 'student loans', 'table_schema': [{'col_name': 'student loan id'}, {'col_name': 'student id'}, {'col_name': 'date of loan'}, {'col_name': 'amount of loan'}, {'col_name': 'other details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['student loan id']}]" +"For each student, find the student id and the total amount of loan he or she has.","SELECT student_id , sum(amount_of_loan) FROM Student_Loans GROUP BY student_id",cre_Students_Information_Systems,"[{'table_name': 'student loans', 'table_schema': [{'col_name': 'student loan id'}, {'col_name': 'student id'}, {'col_name': 'date of loan'}, {'col_name': 'amount of loan'}, {'col_name': 'other details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['student loan id']}]" "How many courses does each student take? List the student id, the student biographical data and the course count.","SELECT T1.student_id , T1.bio_data , count(*) FROM Students AS T1 JOIN Classes AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'classes', 'table_schema': [{'col_name': 'class id'}, {'col_name': 'student id'}, {'col_name': 'teacher id'}, {'col_name': 'class details'}], 'foreign_key_columns': ['teacher id', 'student id'], 'primary_keys': ['class id']}]" "For each student, find the student id, student biographical data, and the number of courses he or she takes.","SELECT T1.student_id , T1.bio_data , count(*) FROM Students AS T1 JOIN Classes AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id",cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'classes', 'table_schema': [{'col_name': 'class id'}, {'col_name': 'student id'}, {'col_name': 'teacher id'}, {'col_name': 'class details'}], 'foreign_key_columns': ['teacher id', 'student id'], 'primary_keys': ['class id']}]" How many students have gone through a detention?,SELECT count(DISTINCT student_id) FROM Detention,cre_Students_Information_Systems,"[{'table_name': 'detention', 'table_schema': [{'col_name': 'detention id'}, {'col_name': 'detention type code'}, {'col_name': 'student id'}, {'col_name': 'datetime detention start'}, {'col_name': 'datetime detention end'}, {'col_name': 'detention summary'}, {'col_name': 'other details'}], 'foreign_key_columns': ['detention type code', 'student id'], 'primary_keys': ['detention id']}]" Count the number of students who have a detention record.,SELECT count(DISTINCT student_id) FROM Detention,cre_Students_Information_Systems,"[{'table_name': 'detention', 'table_schema': [{'col_name': 'detention id'}, {'col_name': 'detention type code'}, {'col_name': 'student id'}, {'col_name': 'datetime detention start'}, {'col_name': 'datetime detention end'}, {'col_name': 'detention summary'}, {'col_name': 'other details'}], 'foreign_key_columns': ['detention type code', 'student id'], 'primary_keys': ['detention id']}]" -What is the code and description of the most common student address type?,"SELECT T1.address_type_code , T2.address_type_description FROM Students_Addresses AS T1 JOIN Ref_Address_Types AS T2 WHERE T1.address_type_code = T2.address_type_code GROUP BY T1.address_type_code ORDER BY count(*) DESC LIMIT 1",cre_Students_Information_Systems,[] -What is the most common student address type? Give me the code and description of the address type.,"SELECT T1.address_type_code , T2.address_type_description FROM Students_Addresses AS T1 JOIN Ref_Address_Types AS T2 WHERE T1.address_type_code = T2.address_type_code GROUP BY T1.address_type_code ORDER BY count(*) DESC LIMIT 1",cre_Students_Information_Systems,[] -"For those students who have gone through an event, who do not have a student loan? List the students' biographical data",SELECT T1.bio_data FROM Students AS T1 JOIN Student_Events AS T2 WHERE T1.student_id = T2.student_id EXCEPT SELECT T1.bio_data FROM Students AS T1 JOIN Student_Loans AS T2 WHERE T1.student_id = T2.student_id,cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -"Among the students who have an event record, who do not have a student loan? Return the students' biographical data.",SELECT T1.bio_data FROM Students AS T1 JOIN Student_Events AS T2 WHERE T1.student_id = T2.student_id EXCEPT SELECT T1.bio_data FROM Students AS T1 JOIN Student_Loans AS T2 WHERE T1.student_id = T2.student_id,cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}]" -List the start time and the end time of the students' addresses for the students who have 2 transcripts.,"SELECT date_from , date_to FROM Students_Addresses WHERE student_id IN ( SELECT student_id FROM Transcripts GROUP BY student_id HAVING count(*) = 2 )",cre_Students_Information_Systems,"[{'table_name': 'transcripts', 'table_schema': [{'col_name': 'transcript id'}, {'col_name': 'student id'}, {'col_name': 'date of transcript'}, {'col_name': 'transcript details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['transcript id']}]" -What are the start time and end time of addresses for the students who receive 2 transcripts?,"SELECT date_from , date_to FROM Students_Addresses WHERE student_id IN ( SELECT student_id FROM Transcripts GROUP BY student_id HAVING count(*) = 2 )",cre_Students_Information_Systems,"[{'table_name': 'transcripts', 'table_schema': [{'col_name': 'transcript id'}, {'col_name': 'student id'}, {'col_name': 'date of transcript'}, {'col_name': 'transcript details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['transcript id']}]" +What is the code and description of the most common student address type?,"SELECT T1.address_type_code , T2.address_type_description FROM Students_Addresses AS T1 JOIN Ref_Address_Types AS T2 WHERE T1.address_type_code = T2.address_type_code GROUP BY T1.address_type_code ORDER BY count(*) DESC LIMIT 1",cre_Students_Information_Systems,"[{'table_name': 'students addresses', 'table_schema': [{'col_name': 'student address id'}, {'col_name': 'address id'}, {'col_name': 'address type code'}, {'col_name': 'student id'}, {'col_name': 'date from'}, {'col_name': 'date to'}], 'foreign_key_columns': ['address type code', 'address id', 'student id'], 'primary_keys': ['student address id']}]" +What is the most common student address type? Give me the code and description of the address type.,"SELECT T1.address_type_code , T2.address_type_description FROM Students_Addresses AS T1 JOIN Ref_Address_Types AS T2 WHERE T1.address_type_code = T2.address_type_code GROUP BY T1.address_type_code ORDER BY count(*) DESC LIMIT 1",cre_Students_Information_Systems,"[{'table_name': 'students addresses', 'table_schema': [{'col_name': 'student address id'}, {'col_name': 'address id'}, {'col_name': 'address type code'}, {'col_name': 'student id'}, {'col_name': 'date from'}, {'col_name': 'date to'}], 'foreign_key_columns': ['address type code', 'address id', 'student id'], 'primary_keys': ['student address id']}]" +"For those students who have gone through an event, who do not have a student loan? List the students' biographical data",SELECT T1.bio_data FROM Students AS T1 JOIN Student_Events AS T2 WHERE T1.student_id = T2.student_id EXCEPT SELECT T1.bio_data FROM Students AS T1 JOIN Student_Loans AS T2 WHERE T1.student_id = T2.student_id,cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'student events', 'table_schema': [{'col_name': 'event id'}, {'col_name': 'event type code'}, {'col_name': 'student id'}, {'col_name': 'event date'}, {'col_name': 'other details'}], 'foreign_key_columns': ['event type code', 'student id'], 'primary_keys': ['event id']}, {'table_name': 'student loans', 'table_schema': [{'col_name': 'student loan id'}, {'col_name': 'student id'}, {'col_name': 'date of loan'}, {'col_name': 'amount of loan'}, {'col_name': 'other details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['student loan id']}]" +"Among the students who have an event record, who do not have a student loan? Return the students' biographical data.",SELECT T1.bio_data FROM Students AS T1 JOIN Student_Events AS T2 WHERE T1.student_id = T2.student_id EXCEPT SELECT T1.bio_data FROM Students AS T1 JOIN Student_Loans AS T2 WHERE T1.student_id = T2.student_id,cre_Students_Information_Systems,"[{'table_name': 'students', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'bio data'}, {'col_name': 'student details'}], 'foreign_key_columns': [], 'primary_keys': ['student id']}, {'table_name': 'student events', 'table_schema': [{'col_name': 'event id'}, {'col_name': 'event type code'}, {'col_name': 'student id'}, {'col_name': 'event date'}, {'col_name': 'other details'}], 'foreign_key_columns': ['event type code', 'student id'], 'primary_keys': ['event id']}, {'table_name': 'student loans', 'table_schema': [{'col_name': 'student loan id'}, {'col_name': 'student id'}, {'col_name': 'date of loan'}, {'col_name': 'amount of loan'}, {'col_name': 'other details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['student loan id']}]" +List the start time and the end time of the students' addresses for the students who have 2 transcripts.,"SELECT date_from , date_to FROM Students_Addresses WHERE student_id IN ( SELECT student_id FROM Transcripts GROUP BY student_id HAVING count(*) = 2 )",cre_Students_Information_Systems,"[{'table_name': 'transcripts', 'table_schema': [{'col_name': 'transcript id'}, {'col_name': 'student id'}, {'col_name': 'date of transcript'}, {'col_name': 'transcript details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['transcript id']}, {'table_name': 'students addresses', 'table_schema': [{'col_name': 'student address id'}, {'col_name': 'address id'}, {'col_name': 'address type code'}, {'col_name': 'student id'}, {'col_name': 'date from'}, {'col_name': 'date to'}], 'foreign_key_columns': ['address type code', 'address id', 'student id'], 'primary_keys': ['student address id']}]" +What are the start time and end time of addresses for the students who receive 2 transcripts?,"SELECT date_from , date_to FROM Students_Addresses WHERE student_id IN ( SELECT student_id FROM Transcripts GROUP BY student_id HAVING count(*) = 2 )",cre_Students_Information_Systems,"[{'table_name': 'transcripts', 'table_schema': [{'col_name': 'transcript id'}, {'col_name': 'student id'}, {'col_name': 'date of transcript'}, {'col_name': 'transcript details'}], 'foreign_key_columns': ['student id'], 'primary_keys': ['transcript id']}, {'table_name': 'students addresses', 'table_schema': [{'col_name': 'student address id'}, {'col_name': 'address id'}, {'col_name': 'address type code'}, {'col_name': 'student id'}, {'col_name': 'date from'}, {'col_name': 'date to'}], 'foreign_key_columns': ['address type code', 'address id', 'student id'], 'primary_keys': ['student address id']}]" When did all the detentions start?,SELECT datetime_detention_start FROM Detention,cre_Students_Information_Systems,"[{'table_name': 'detention', 'table_schema': [{'col_name': 'detention id'}, {'col_name': 'detention type code'}, {'col_name': 'student id'}, {'col_name': 'datetime detention start'}, {'col_name': 'datetime detention end'}, {'col_name': 'detention summary'}, {'col_name': 'other details'}], 'foreign_key_columns': ['detention type code', 'student id'], 'primary_keys': ['detention id']}]" Give me the detention start date for all the detention records.,SELECT datetime_detention_start FROM Detention,cre_Students_Information_Systems,"[{'table_name': 'detention', 'table_schema': [{'col_name': 'detention id'}, {'col_name': 'detention type code'}, {'col_name': 'student id'}, {'col_name': 'datetime detention start'}, {'col_name': 'datetime detention end'}, {'col_name': 'detention summary'}, {'col_name': 'other details'}], 'foreign_key_columns': ['detention type code', 'student id'], 'primary_keys': ['detention id']}]" List all the author names.,SELECT name FROM Author,book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}]" @@ -528,34 +528,34 @@ How many clients are there?,SELECT count(*) FROM Client,book_1,"[{'table_name': Return the number of clients.,SELECT count(*) FROM Client,book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}]" List names and addresses of all clients in alphabetical order by their names.,"SELECT name , address FROM Client ORDER BY name",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}]" "What are the names and addressed of all clients, ordered alphabetically by name?","SELECT name , address FROM Client ORDER BY name",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}]" -Show all book titles and corresponding author names.,"SELECT T3.title , T1.name FROM Author AS T1 JOIN Author_Book AS T2 ON T2.Author = T1.idAuthor JOIN Book AS T3 ON T2.isbn = T3.isbn",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -What are the names of all books and their corresponding authors?,"SELECT T3.title , T1.name FROM Author AS T1 JOIN Author_Book AS T2 ON T2.Author = T1.idAuthor JOIN Book AS T3 ON T2.isbn = T3.isbn",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" +Show all book titles and corresponding author names.,"SELECT T3.title , T1.name FROM Author AS T1 JOIN Author_Book AS T2 ON T2.Author = T1.idAuthor JOIN Book AS T3 ON T2.isbn = T3.isbn",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'author book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'author'}], 'foreign_key_columns': ['isbn'], 'primary_keys': ['isbn']}]" +What are the names of all books and their corresponding authors?,"SELECT T3.title , T1.name FROM Author AS T1 JOIN Author_Book AS T2 ON T2.Author = T1.idAuthor JOIN Book AS T3 ON T2.isbn = T3.isbn",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'author book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'author'}], 'foreign_key_columns': ['isbn'], 'primary_keys': ['isbn']}]" Show all order ids and their client names.,"SELECT T1.idOrder , T2.name FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient = T2.idClient",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}]" What are the ids of all orders and the corresponding client names?,"SELECT T1.idOrder , T2.name FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient = T2.idClient",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}]" -Show all author names and the numbers of books each has written.,"SELECT T1.name , count(*) FROM Author AS T1 JOIN Author_Book AS T2 ON T1.idAuthor = T2.Author GROUP BY T1.idAuthor",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}]" -"What are the names of all the authors, and how many books has each written?","SELECT T1.name , count(*) FROM Author AS T1 JOIN Author_Book AS T2 ON T1.idAuthor = T2.Author GROUP BY T1.idAuthor",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}]" -Show all book isbns and the numbers of orders for each.,"SELECT isbn , count(*) FROM Books_Order GROUP BY isbn",book_1,[] -"What are all isbns for each book, and how many times has each been ordered?","SELECT isbn , count(*) FROM Books_Order GROUP BY isbn",book_1,[] -Show all book isbns and the total amount ordered for each.,"SELECT isbn , sum(amount) FROM Books_Order GROUP BY isbn",book_1,[] -"What are the isbns for all books, and what is the total amount ordered for each?","SELECT isbn , sum(amount) FROM Books_Order GROUP BY isbn",book_1,[] -Show the book title corresponding to the book with the most number of orders.,SELECT T2.title FROM Books_Order AS T1 JOIN Book AS T2 ON T1.isbn = T2.isbn GROUP BY T1.isbn ORDER BY count(*) DESC LIMIT 1,book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -What is the title of the book that has been ordered the greatest number of times?,SELECT T2.title FROM Books_Order AS T1 JOIN Book AS T2 ON T1.isbn = T2.isbn GROUP BY T1.isbn ORDER BY count(*) DESC LIMIT 1,book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -Show the book title and purchase price of the book that has had the greatest amount in orders.,"SELECT T2.title , T2.PurchasePrice FROM Books_Order AS T1 JOIN BOOk AS T2 ON T1.isbn = T2.isbn GROUP BY T1.isbn ORDER BY sum(amount) DESC LIMIT 1",book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -What is the title and purchase price of the book that has the highest total order amount?,"SELECT T2.title , T2.PurchasePrice FROM Books_Order AS T1 JOIN BOOk AS T2 ON T1.isbn = T2.isbn GROUP BY T1.isbn ORDER BY sum(amount) DESC LIMIT 1",book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -Show the titles of books that have been ordered.,SELECT DISTINCT T1.title FROM book AS T1 JOIN books_order AS T2 ON T1.isbn = T2.isbn,book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -What are the different titles of books that have been ordered in the past?,SELECT DISTINCT T1.title FROM book AS T1 JOIN books_order AS T2 ON T1.isbn = T2.isbn,book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" +Show all author names and the numbers of books each has written.,"SELECT T1.name , count(*) FROM Author AS T1 JOIN Author_Book AS T2 ON T1.idAuthor = T2.Author GROUP BY T1.idAuthor",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'author'}], 'foreign_key_columns': ['isbn'], 'primary_keys': ['isbn']}]" +"What are the names of all the authors, and how many books has each written?","SELECT T1.name , count(*) FROM Author AS T1 JOIN Author_Book AS T2 ON T1.idAuthor = T2.Author GROUP BY T1.idAuthor",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'author'}], 'foreign_key_columns': ['isbn'], 'primary_keys': ['isbn']}]" +Show all book isbns and the numbers of orders for each.,"SELECT isbn , count(*) FROM Books_Order GROUP BY isbn",book_1,"[{'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +"What are all isbns for each book, and how many times has each been ordered?","SELECT isbn , count(*) FROM Books_Order GROUP BY isbn",book_1,"[{'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +Show all book isbns and the total amount ordered for each.,"SELECT isbn , sum(amount) FROM Books_Order GROUP BY isbn",book_1,"[{'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +"What are the isbns for all books, and what is the total amount ordered for each?","SELECT isbn , sum(amount) FROM Books_Order GROUP BY isbn",book_1,"[{'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +Show the book title corresponding to the book with the most number of orders.,SELECT T2.title FROM Books_Order AS T1 JOIN Book AS T2 ON T1.isbn = T2.isbn GROUP BY T1.isbn ORDER BY count(*) DESC LIMIT 1,book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +What is the title of the book that has been ordered the greatest number of times?,SELECT T2.title FROM Books_Order AS T1 JOIN Book AS T2 ON T1.isbn = T2.isbn GROUP BY T1.isbn ORDER BY count(*) DESC LIMIT 1,book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +Show the book title and purchase price of the book that has had the greatest amount in orders.,"SELECT T2.title , T2.PurchasePrice FROM Books_Order AS T1 JOIN BOOk AS T2 ON T1.isbn = T2.isbn GROUP BY T1.isbn ORDER BY sum(amount) DESC LIMIT 1",book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +What is the title and purchase price of the book that has the highest total order amount?,"SELECT T2.title , T2.PurchasePrice FROM Books_Order AS T1 JOIN BOOk AS T2 ON T1.isbn = T2.isbn GROUP BY T1.isbn ORDER BY sum(amount) DESC LIMIT 1",book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +Show the titles of books that have been ordered.,SELECT DISTINCT T1.title FROM book AS T1 JOIN books_order AS T2 ON T1.isbn = T2.isbn,book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +What are the different titles of books that have been ordered in the past?,SELECT DISTINCT T1.title FROM book AS T1 JOIN books_order AS T2 ON T1.isbn = T2.isbn,book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" Show the names of clients who have ordered at least once.,SELECT DISTINCT T1.name FROM Client AS T1 JOIN Orders AS T2 ON T1.idClient = T2.idClient,book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}]" What are the names of the different clients who have made an order?,SELECT DISTINCT T1.name FROM Client AS T1 JOIN Orders AS T2 ON T1.idClient = T2.idClient,book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}]" Show all client names and the number of orders each has made.,"SELECT T2.name , count(*) FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient = T2.idClient GROUP BY T1.idClient",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}]" "What are the names of all the clients, and how many times has each of them ordered?","SELECT T2.name , count(*) FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient = T2.idClient GROUP BY T1.idClient",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}]" What is the name of the client with the most number of orders?,SELECT T2.name FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient = T2.idClient GROUP BY T1.idClient ORDER BY count(*) DESC LIMIT 1,book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}]" Give the name of the client who has made the most orders.,SELECT T2.name FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient = T2.idClient GROUP BY T1.idClient ORDER BY count(*) DESC LIMIT 1,book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}]" -Show the client names and their total amounts of books ordered.,"SELECT T2.name , sum(T3.amount) FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient = T2.idClient JOIN Books_Order AS T3 ON T3.idOrder = T1.idOrder GROUP BY T1.idClient",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}]" -"What are the names of all the clients, and the total amount of books ordered by each?","SELECT T2.name , sum(T3.amount) FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient = T2.idClient JOIN Books_Order AS T3 ON T3.idOrder = T1.idOrder GROUP BY T1.idClient",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}]" -Show the client name who has the most total amount of books ordered.,SELECT T2.name FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient = T2.idClient JOIN Books_Order AS T3 ON T3.idOrder = T1.idOrder GROUP BY T1.idClient ORDER BY sum(T3.amount) DESC LIMIT 1,book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}]" -What is the name of the client who has ordered the greatest total amount of books?,SELECT T2.name FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient = T2.idClient JOIN Books_Order AS T3 ON T3.idOrder = T1.idOrder GROUP BY T1.idClient ORDER BY sum(T3.amount) DESC LIMIT 1,book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}]" -Show all book titles for books that have no orders.,SELECT title FROM book EXCEPT SELECT T1.title FROM book AS T1 JOIN books_order AS T2 ON T1.isbn = T2.isbn,book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -What are the titles of books that have never been ordered?,SELECT title FROM book EXCEPT SELECT T1.title FROM book AS T1 JOIN books_order AS T2 ON T1.isbn = T2.isbn,book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" +Show the client names and their total amounts of books ordered.,"SELECT T2.name , sum(T3.amount) FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient = T2.idClient JOIN Books_Order AS T3 ON T3.idOrder = T1.idOrder GROUP BY T1.idClient",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +"What are the names of all the clients, and the total amount of books ordered by each?","SELECT T2.name , sum(T3.amount) FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient = T2.idClient JOIN Books_Order AS T3 ON T3.idOrder = T1.idOrder GROUP BY T1.idClient",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +Show the client name who has the most total amount of books ordered.,SELECT T2.name FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient = T2.idClient JOIN Books_Order AS T3 ON T3.idOrder = T1.idOrder GROUP BY T1.idClient ORDER BY sum(T3.amount) DESC LIMIT 1,book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +What is the name of the client who has ordered the greatest total amount of books?,SELECT T2.name FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient = T2.idClient JOIN Books_Order AS T3 ON T3.idOrder = T1.idOrder GROUP BY T1.idClient ORDER BY sum(T3.amount) DESC LIMIT 1,book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +Show all book titles for books that have no orders.,SELECT title FROM book EXCEPT SELECT T1.title FROM book AS T1 JOIN books_order AS T2 ON T1.isbn = T2.isbn,book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +What are the titles of books that have never been ordered?,SELECT title FROM book EXCEPT SELECT T1.title FROM book AS T1 JOIN books_order AS T2 ON T1.isbn = T2.isbn,book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" Show all client names for clients who have not made orders.,SELECT name FROM Client EXCEPT SELECT T1.name FROM Client AS T1 JOIN Orders AS T2 ON T1.idClient = T2.idClient,book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}]" What are the names of clients who have never made an order?,SELECT name FROM Client EXCEPT SELECT T1.name FROM Client AS T1 JOIN Orders AS T2 ON T1.idClient = T2.idClient,book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}]" What is the maximum and the minimum sale price?,"SELECT max(saleprice) , min(saleprice) FROM Book",book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" @@ -570,28 +570,28 @@ List all book titles which have the lowest sale price .,select title from book o What are the titles of books that have a sale price equal to the lowest sale price across all books ?,select title from book order by saleprice asc limit 1,book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" List all book titles which have highest purchase prices .,select title from book order by purchaseprice desc limit 1,book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" What are the titles of books with the highest purchase price across all books ?,select title from book order by purchaseprice desc limit 1,book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -What is the average sale price of books written by George Orwell?,"SELECT avg(saleprice) FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name = ""George Orwell""",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -Give the average sale price of books authored by George Orwell.,"SELECT avg(saleprice) FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name = ""George Orwell""",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -What are sale prices of books written by Plato?,"SELECT saleprice FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name = ""Plato""",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -Return the sale prices of books authored by Plato.,"SELECT saleprice FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name = ""Plato""",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -What is the title of the book written by George Orwell that has the lowest sale price?,"SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name = ""George Orwell"" ORDER BY T1.saleprice LIMIT 1",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -Give the title of book by George Orwell that has the lowest saleprice.,"SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name = ""George Orwell"" ORDER BY T1.saleprice LIMIT 1",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -What is the title of the book written by Plato has price lower than the average sale price of all books?,"SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name = ""Plato"" AND T1.saleprice < (SELECT avg(saleprice) FROM Book)",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -Give the titles of books authored by Plato that have a sale price lower than the average sale price across all books.,"SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name = ""Plato"" AND T1.saleprice < (SELECT avg(saleprice) FROM Book)",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -"Who is the author of the book ""Pride and Prejudice""?","SELECT T3.name FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T1.title = ""Pride and Prejudice""",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -Give the name of the author who wrote the book titled Pride and Prejudice.,"SELECT T3.name FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T1.title = ""Pride and Prejudice""",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -List titles of all books published by an author whose name contains the string 'Plato'?,"SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name LIKE ""%Plato%""",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -What are the titles of all books written by an author with a name that contains Plato?,"SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name LIKE ""%Plato%""",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -"How many orders do we have for ""Pride and Prejudice""?","SELECT count(*) FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn = T2.isbn WHERE T1.title = ""Pride and Prejudice""",book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -Return the number of orders received for Pride and Prejudice.,"SELECT count(*) FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn = T2.isbn WHERE T1.title = ""Pride and Prejudice""",book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -"Show ids for orders including both ""Pride and Prejudice"" and ""The Little Prince"".","SELECT idOrder FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn = T2.isbn WHERE T1.title = ""Pride and Prejudice"" INTERSECT SELECT idOrder FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn = T2.isbn WHERE T1.title = ""The Little Prince""",book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -What are the order ids for orders that include both Pride and Prejudice and The Little Prince?,"SELECT idOrder FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn = T2.isbn WHERE T1.title = ""Pride and Prejudice"" INTERSECT SELECT idOrder FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn = T2.isbn WHERE T1.title = ""The Little Prince""",book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -Show all book isbns which were ordered by both client Peter Doe and client James Smith.,"SELECT T2.isbn FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient WHERE T3.name = ""Peter Doe"" INTERSECT SELECT T2.isbn FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient WHERE T3.name = ""James Smith""",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}]" -What are the isbns of books ordered by both clients named Peter Doe and James Smith?,"SELECT T2.isbn FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient WHERE T3.name = ""Peter Doe"" INTERSECT SELECT T2.isbn FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient WHERE T3.name = ""James Smith""",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}]" -Find the title of books which are ordered by client Peter Doe but not client James Smith.,"SELECT T4.title FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient JOIN book AS T4 ON T2.ISBN = T4.isbn WHERE T3.name = ""Peter Doe"" EXCEPT SELECT T4.title FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient JOIN book AS T4 ON T2.ISBN = T4.isbn WHERE T3.name = ""James Smith""",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -"What are the titles of books that the client Peter Doe ordered, but the client James Smith did not?","SELECT T4.title FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient JOIN book AS T4 ON T2.ISBN = T4.isbn WHERE T3.name = ""Peter Doe"" EXCEPT SELECT T4.title FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient JOIN book AS T4 ON T2.ISBN = T4.isbn WHERE T3.name = ""James Smith""",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -"Show all client names who have orders for ""Pride and Prejudice"".","SELECT T3.name FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient JOIN Book AS T4 ON T4.isbn = T2.isbn WHERE T4.title = ""Pride and Prejudice""",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" -What are the names of clients who have ordered Pride and Prejudice?,"SELECT T3.name FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient JOIN Book AS T4 ON T4.isbn = T2.isbn WHERE T4.title = ""Pride and Prejudice""",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}]" +What is the average sale price of books written by George Orwell?,"SELECT avg(saleprice) FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name = ""George Orwell""",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'author book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'author'}], 'foreign_key_columns': ['isbn'], 'primary_keys': ['isbn']}]" +Give the average sale price of books authored by George Orwell.,"SELECT avg(saleprice) FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name = ""George Orwell""",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'author book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'author'}], 'foreign_key_columns': ['isbn'], 'primary_keys': ['isbn']}]" +What are sale prices of books written by Plato?,"SELECT saleprice FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name = ""Plato""",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'author book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'author'}], 'foreign_key_columns': ['isbn'], 'primary_keys': ['isbn']}]" +Return the sale prices of books authored by Plato.,"SELECT saleprice FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name = ""Plato""",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'author book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'author'}], 'foreign_key_columns': ['isbn'], 'primary_keys': ['isbn']}]" +What is the title of the book written by George Orwell that has the lowest sale price?,"SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name = ""George Orwell"" ORDER BY T1.saleprice LIMIT 1",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'author book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'author'}], 'foreign_key_columns': ['isbn'], 'primary_keys': ['isbn']}]" +Give the title of book by George Orwell that has the lowest saleprice.,"SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name = ""George Orwell"" ORDER BY T1.saleprice LIMIT 1",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'author book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'author'}], 'foreign_key_columns': ['isbn'], 'primary_keys': ['isbn']}]" +What is the title of the book written by Plato has price lower than the average sale price of all books?,"SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name = ""Plato"" AND T1.saleprice < (SELECT avg(saleprice) FROM Book)",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'author book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'author'}], 'foreign_key_columns': ['isbn'], 'primary_keys': ['isbn']}]" +Give the titles of books authored by Plato that have a sale price lower than the average sale price across all books.,"SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name = ""Plato"" AND T1.saleprice < (SELECT avg(saleprice) FROM Book)",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'author book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'author'}], 'foreign_key_columns': ['isbn'], 'primary_keys': ['isbn']}]" +"Who is the author of the book ""Pride and Prejudice""?","SELECT T3.name FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T1.title = ""Pride and Prejudice""",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'author book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'author'}], 'foreign_key_columns': ['isbn'], 'primary_keys': ['isbn']}]" +Give the name of the author who wrote the book titled Pride and Prejudice.,"SELECT T3.name FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T1.title = ""Pride and Prejudice""",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'author book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'author'}], 'foreign_key_columns': ['isbn'], 'primary_keys': ['isbn']}]" +List titles of all books published by an author whose name contains the string 'Plato'?,"SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name LIKE ""%Plato%""",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'author book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'author'}], 'foreign_key_columns': ['isbn'], 'primary_keys': ['isbn']}]" +What are the titles of all books written by an author with a name that contains Plato?,"SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name LIKE ""%Plato%""",book_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'author book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'author'}], 'foreign_key_columns': ['isbn'], 'primary_keys': ['isbn']}]" +"How many orders do we have for ""Pride and Prejudice""?","SELECT count(*) FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn = T2.isbn WHERE T1.title = ""Pride and Prejudice""",book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +Return the number of orders received for Pride and Prejudice.,"SELECT count(*) FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn = T2.isbn WHERE T1.title = ""Pride and Prejudice""",book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +"Show ids for orders including both ""Pride and Prejudice"" and ""The Little Prince"".","SELECT idOrder FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn = T2.isbn WHERE T1.title = ""Pride and Prejudice"" INTERSECT SELECT idOrder FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn = T2.isbn WHERE T1.title = ""The Little Prince""",book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +What are the order ids for orders that include both Pride and Prejudice and The Little Prince?,"SELECT idOrder FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn = T2.isbn WHERE T1.title = ""Pride and Prejudice"" INTERSECT SELECT idOrder FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn = T2.isbn WHERE T1.title = ""The Little Prince""",book_1,"[{'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +Show all book isbns which were ordered by both client Peter Doe and client James Smith.,"SELECT T2.isbn FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient WHERE T3.name = ""Peter Doe"" INTERSECT SELECT T2.isbn FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient WHERE T3.name = ""James Smith""",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +What are the isbns of books ordered by both clients named Peter Doe and James Smith?,"SELECT T2.isbn FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient WHERE T3.name = ""Peter Doe"" INTERSECT SELECT T2.isbn FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient WHERE T3.name = ""James Smith""",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +Find the title of books which are ordered by client Peter Doe but not client James Smith.,"SELECT T4.title FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient JOIN book AS T4 ON T2.ISBN = T4.isbn WHERE T3.name = ""Peter Doe"" EXCEPT SELECT T4.title FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient JOIN book AS T4 ON T2.ISBN = T4.isbn WHERE T3.name = ""James Smith""",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +"What are the titles of books that the client Peter Doe ordered, but the client James Smith did not?","SELECT T4.title FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient JOIN book AS T4 ON T2.ISBN = T4.isbn WHERE T3.name = ""Peter Doe"" EXCEPT SELECT T4.title FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient JOIN book AS T4 ON T2.ISBN = T4.isbn WHERE T3.name = ""James Smith""",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +"Show all client names who have orders for ""Pride and Prejudice"".","SELECT T3.name FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient JOIN Book AS T4 ON T4.isbn = T2.isbn WHERE T4.title = ""Pride and Prejudice""",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" +What are the names of clients who have ordered Pride and Prejudice?,"SELECT T3.name FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder = T2.idOrder JOIN Client AS T3 ON T1.idClient = T3.idClient JOIN Book AS T4 ON T4.isbn = T2.isbn WHERE T4.title = ""Pride and Prejudice""",book_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'name'}, {'col_name': 'address'}, {'col_name': 'numcc'}], 'foreign_key_columns': [], 'primary_keys': ['client id']}, {'table_name': 'orders', 'table_schema': [{'col_name': 'order id'}, {'col_name': 'client id'}, {'col_name': 'order date'}, {'col_name': 'date expired'}], 'foreign_key_columns': [], 'primary_keys': ['order id']}, {'table_name': 'book', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'title'}, {'col_name': 'author'}, {'col_name': 'purchase price'}, {'col_name': 'sale price'}], 'foreign_key_columns': [], 'primary_keys': ['isbn']}, {'table_name': 'books order', 'table_schema': [{'col_name': 'isbn'}, {'col_name': 'order id'}, {'col_name': 'amount'}], 'foreign_key_columns': ['order id', 'isbn'], 'primary_keys': ['isbn']}]" How many books are there?,SELECT count(*) FROM book,book_review,"[{'table_name': 'book', 'table_schema': [{'col_name': 'book id'}, {'col_name': 'title'}, {'col_name': 'type'}, {'col_name': 'pages'}, {'col_name': 'chapters'}, {'col_name': 'audio'}, {'col_name': 'release'}], 'foreign_key_columns': [], 'primary_keys': ['book id']}]" List the titles of books in ascending alphabetical order.,SELECT Title FROM book ORDER BY Title ASC,book_review,"[{'table_name': 'book', 'table_schema': [{'col_name': 'book id'}, {'col_name': 'title'}, {'col_name': 'type'}, {'col_name': 'pages'}, {'col_name': 'chapters'}, {'col_name': 'audio'}, {'col_name': 'release'}], 'foreign_key_columns': [], 'primary_keys': ['book id']}]" List the titles of books in descending order of pages.,SELECT Title FROM book ORDER BY Pages DESC,book_review,"[{'table_name': 'book', 'table_schema': [{'col_name': 'book id'}, {'col_name': 'title'}, {'col_name': 'type'}, {'col_name': 'pages'}, {'col_name': 'chapters'}, {'col_name': 'audio'}, {'col_name': 'release'}], 'foreign_key_columns': [], 'primary_keys': ['book id']}]" @@ -631,18 +631,18 @@ Show the most common nationality of customers.,SELECT Nationality FROM customer Which nationality does the most customers have?,SELECT Nationality FROM customer GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1,restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" Show the nations that have both customers with card credit smaller than 50 and customers with card credit bigger than 75.,SELECT Nationality FROM customer WHERE Card_Credit < 50 INTERSECT SELECT Nationality FROM customer WHERE Card_Credit > 75,restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" Which nations have both customers with card credit above 50 and customers with card credit below 75.,SELECT Nationality FROM customer WHERE Card_Credit < 50 INTERSECT SELECT Nationality FROM customer WHERE Card_Credit > 75,restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -Show the names of customers and names of dishes they order.,"SELECT T1.Name , T2.Dish_Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID = T2.Customer_ID",restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -"For each order, return the customer name and the dish name.","SELECT T1.Name , T2.Dish_Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID = T2.Customer_ID",restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -"Show the names of customers and names of dishes they order, in descending order of the quantity of dish.","SELECT T1.Name , T2.Dish_Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID = T2.Customer_ID ORDER BY T2.Quantity DESC",restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -"For each order, find the customer name and the dish name. Sort the result in descending order of the quantity of dish.","SELECT T1.Name , T2.Dish_Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID = T2.Customer_ID ORDER BY T2.Quantity DESC",restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -Show each customer name and the total quantities of dishes ordered by that customer.,"SELECT T1.Name , sum(T2.Quantity) FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID = T2.Customer_ID GROUP BY T1.Name",restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -What is the total quantities of dishes ordered by each customer ? List the customer name and the total quantity .,"select t1.name , sum(t2.quantity) from customer as t1 join customer_order as t2 on t1.customer_id = t2.customer_id group by t1.name",restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -Show the customers with total quantity of order bigger than 1.,SELECT T1.Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID = T2.Customer_ID GROUP BY T1.Name HAVING sum(T2.Quantity) > 1,restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -Which customers have total order quantity greater than 1? Give me the customer names.,SELECT T1.Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID = T2.Customer_ID GROUP BY T1.Name HAVING sum(T2.Quantity) > 1,restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" +Show the names of customers and names of dishes they order.,"SELECT T1.Name , T2.Dish_Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID = T2.Customer_ID",restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer order', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'branch id'}, {'col_name': 'dish name'}, {'col_name': 'quantity'}], 'foreign_key_columns': ['branch id', 'customer id'], 'primary_keys': ['customer id']}]" +"For each order, return the customer name and the dish name.","SELECT T1.Name , T2.Dish_Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID = T2.Customer_ID",restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer order', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'branch id'}, {'col_name': 'dish name'}, {'col_name': 'quantity'}], 'foreign_key_columns': ['branch id', 'customer id'], 'primary_keys': ['customer id']}]" +"Show the names of customers and names of dishes they order, in descending order of the quantity of dish.","SELECT T1.Name , T2.Dish_Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID = T2.Customer_ID ORDER BY T2.Quantity DESC",restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer order', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'branch id'}, {'col_name': 'dish name'}, {'col_name': 'quantity'}], 'foreign_key_columns': ['branch id', 'customer id'], 'primary_keys': ['customer id']}]" +"For each order, find the customer name and the dish name. Sort the result in descending order of the quantity of dish.","SELECT T1.Name , T2.Dish_Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID = T2.Customer_ID ORDER BY T2.Quantity DESC",restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer order', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'branch id'}, {'col_name': 'dish name'}, {'col_name': 'quantity'}], 'foreign_key_columns': ['branch id', 'customer id'], 'primary_keys': ['customer id']}]" +Show each customer name and the total quantities of dishes ordered by that customer.,"SELECT T1.Name , sum(T2.Quantity) FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID = T2.Customer_ID GROUP BY T1.Name",restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer order', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'branch id'}, {'col_name': 'dish name'}, {'col_name': 'quantity'}], 'foreign_key_columns': ['branch id', 'customer id'], 'primary_keys': ['customer id']}]" +What is the total quantities of dishes ordered by each customer ? List the customer name and the total quantity .,"select t1.name , sum(t2.quantity) from customer as t1 join customer_order as t2 on t1.customer_id = t2.customer_id group by t1.name",restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer order', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'branch id'}, {'col_name': 'dish name'}, {'col_name': 'quantity'}], 'foreign_key_columns': ['branch id', 'customer id'], 'primary_keys': ['customer id']}]" +Show the customers with total quantity of order bigger than 1.,SELECT T1.Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID = T2.Customer_ID GROUP BY T1.Name HAVING sum(T2.Quantity) > 1,restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer order', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'branch id'}, {'col_name': 'dish name'}, {'col_name': 'quantity'}], 'foreign_key_columns': ['branch id', 'customer id'], 'primary_keys': ['customer id']}]" +Which customers have total order quantity greater than 1? Give me the customer names.,SELECT T1.Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID = T2.Customer_ID GROUP BY T1.Name HAVING sum(T2.Quantity) > 1,restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer order', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'branch id'}, {'col_name': 'dish name'}, {'col_name': 'quantity'}], 'foreign_key_columns': ['branch id', 'customer id'], 'primary_keys': ['customer id']}]" Show distinct managers of branches.,SELECT DISTINCT Manager FROM branch,restaurant_bills,"[{'table_name': 'branch', 'table_schema': [{'col_name': 'branch id'}, {'col_name': 'manager'}, {'col_name': 'years opened'}, {'col_name': 'location of office'}], 'foreign_key_columns': [], 'primary_keys': ['branch id']}]" Who are the distinct managers of branches?,SELECT DISTINCT Manager FROM branch,restaurant_bills,"[{'table_name': 'branch', 'table_schema': [{'col_name': 'branch id'}, {'col_name': 'manager'}, {'col_name': 'years opened'}, {'col_name': 'location of office'}], 'foreign_key_columns': [], 'primary_keys': ['branch id']}]" -List the names of customers that do not have any order.,SELECT name FROM customer WHERE Customer_ID NOT IN (SELECT Customer_ID FROM customer_order),restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" -Which customers do not have any order? Give me the customer names.,SELECT name FROM customer WHERE Customer_ID NOT IN (SELECT Customer_ID FROM customer_order),restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}]" +List the names of customers that do not have any order.,SELECT name FROM customer WHERE Customer_ID NOT IN (SELECT Customer_ID FROM customer_order),restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer order', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'branch id'}, {'col_name': 'dish name'}, {'col_name': 'quantity'}], 'foreign_key_columns': ['branch id', 'customer id'], 'primary_keys': ['customer id']}]" +Which customers do not have any order? Give me the customer names.,SELECT name FROM customer WHERE Customer_ID NOT IN (SELECT Customer_ID FROM customer_order),restaurant_bills,"[{'table_name': 'customer', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'card credit'}, {'col_name': 'level of membership'}], 'foreign_key_columns': [], 'primary_keys': ['customer id']}, {'table_name': 'customer order', 'table_schema': [{'col_name': 'customer id'}, {'col_name': 'branch id'}, {'col_name': 'dish name'}, {'col_name': 'quantity'}], 'foreign_key_columns': ['branch id', 'customer id'], 'primary_keys': ['customer id']}]" How many members are there?,SELECT count(*) FROM member,club_leader,"[{'table_name': 'member', 'table_schema': [{'col_name': 'member id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['member id']}]" List the names of members in ascending order of age.,SELECT Name FROM member ORDER BY Age ASC,club_leader,"[{'table_name': 'member', 'table_schema': [{'col_name': 'member id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['member id']}]" What are the names and nationalities of the members?,"SELECT Name , Nationality FROM member",club_leader,"[{'table_name': 'member', 'table_schema': [{'col_name': 'member id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['member id']}]" @@ -652,38 +652,38 @@ What is the name of the oldest member?,SELECT Name FROM member ORDER BY Age DESC Show different nationalities along with the number of members of each nationality.,"SELECT Nationality , COUNT(*) FROM member GROUP BY Nationality",club_leader,"[{'table_name': 'member', 'table_schema': [{'col_name': 'member id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['member id']}]" Please show the most common nationality of members.,"SELECT Nationality , COUNT(*) FROM member GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1",club_leader,"[{'table_name': 'member', 'table_schema': [{'col_name': 'member id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['member id']}]" Show the nations that have at least two members.,SELECT Nationality FROM member GROUP BY Nationality HAVING COUNT(*) >= 2,club_leader,"[{'table_name': 'member', 'table_schema': [{'col_name': 'member id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['member id']}]" -Show the names of club leaders and the names of clubs they joined.,"SELECT T3.Name , T2.Club_Name FROM club_leader AS T1 JOIN club AS T2 ON T1.Club_ID = T2.Club_ID JOIN member AS T3 ON T1.Member_ID = T3.Member_ID",club_leader,"[{'table_name': 'member', 'table_schema': [{'col_name': 'member id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['member id']}, {'table_name': 'club', 'table_schema': [{'col_name': 'club id'}, {'col_name': 'overall ranking'}, {'col_name': 'team leader'}, {'col_name': 'club name'}], 'foreign_key_columns': [], 'primary_keys': ['club id']}]" -Show the names of club leaders of clubs with overall ranking higher than 100.,"SELECT T3.Name , T2.Club_Name FROM club_leader AS T1 JOIN club AS T2 ON T1.Club_ID = T2.Club_ID JOIN member AS T3 ON T1.Member_ID = T3.Member_ID WHERE T2.Overall_Ranking < 100",club_leader,"[{'table_name': 'member', 'table_schema': [{'col_name': 'member id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['member id']}, {'table_name': 'club', 'table_schema': [{'col_name': 'club id'}, {'col_name': 'overall ranking'}, {'col_name': 'team leader'}, {'col_name': 'club name'}], 'foreign_key_columns': [], 'primary_keys': ['club id']}]" -Show the names of club leaders that joined their club before 2018.,"SELECT T3.Name , T2.Club_Name FROM club_leader AS T1 JOIN club AS T2 ON T1.Club_ID = T2.Club_ID JOIN member AS T3 ON T1.Member_ID = T3.Member_ID WHERE T1.Year_Join < 2018",club_leader,"[{'table_name': 'member', 'table_schema': [{'col_name': 'member id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['member id']}, {'table_name': 'club', 'table_schema': [{'col_name': 'club id'}, {'col_name': 'overall ranking'}, {'col_name': 'team leader'}, {'col_name': 'club name'}], 'foreign_key_columns': [], 'primary_keys': ['club id']}]" -"Show the name of the leader of the club named ""Houston"".","SELECT T3.Name FROM club_leader AS T1 JOIN club AS T2 ON T1.Club_ID = T2.Club_ID JOIN member AS T3 ON T1.Member_ID = T3.Member_ID WHERE T2.Club_Name = ""Houston""",club_leader,"[{'table_name': 'member', 'table_schema': [{'col_name': 'member id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['member id']}, {'table_name': 'club', 'table_schema': [{'col_name': 'club id'}, {'col_name': 'overall ranking'}, {'col_name': 'team leader'}, {'col_name': 'club name'}], 'foreign_key_columns': [], 'primary_keys': ['club id']}]" -List the names of members that are not club leaders.,SELECT Name FROM member WHERE Member_ID NOT IN (SELECT Member_ID FROM club_leader),club_leader,"[{'table_name': 'member', 'table_schema': [{'col_name': 'member id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['member id']}]" +Show the names of club leaders and the names of clubs they joined.,"SELECT T3.Name , T2.Club_Name FROM club_leader AS T1 JOIN club AS T2 ON T1.Club_ID = T2.Club_ID JOIN member AS T3 ON T1.Member_ID = T3.Member_ID",club_leader,"[{'table_name': 'member', 'table_schema': [{'col_name': 'member id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['member id']}, {'table_name': 'club', 'table_schema': [{'col_name': 'club id'}, {'col_name': 'overall ranking'}, {'col_name': 'team leader'}, {'col_name': 'club name'}], 'foreign_key_columns': [], 'primary_keys': ['club id']}, {'table_name': 'club leader', 'table_schema': [{'col_name': 'club id'}, {'col_name': 'member id'}, {'col_name': 'year join'}], 'foreign_key_columns': ['member id', 'club id'], 'primary_keys': ['club id']}]" +Show the names of club leaders of clubs with overall ranking higher than 100.,"SELECT T3.Name , T2.Club_Name FROM club_leader AS T1 JOIN club AS T2 ON T1.Club_ID = T2.Club_ID JOIN member AS T3 ON T1.Member_ID = T3.Member_ID WHERE T2.Overall_Ranking < 100",club_leader,"[{'table_name': 'member', 'table_schema': [{'col_name': 'member id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['member id']}, {'table_name': 'club', 'table_schema': [{'col_name': 'club id'}, {'col_name': 'overall ranking'}, {'col_name': 'team leader'}, {'col_name': 'club name'}], 'foreign_key_columns': [], 'primary_keys': ['club id']}, {'table_name': 'club leader', 'table_schema': [{'col_name': 'club id'}, {'col_name': 'member id'}, {'col_name': 'year join'}], 'foreign_key_columns': ['member id', 'club id'], 'primary_keys': ['club id']}]" +Show the names of club leaders that joined their club before 2018.,"SELECT T3.Name , T2.Club_Name FROM club_leader AS T1 JOIN club AS T2 ON T1.Club_ID = T2.Club_ID JOIN member AS T3 ON T1.Member_ID = T3.Member_ID WHERE T1.Year_Join < 2018",club_leader,"[{'table_name': 'member', 'table_schema': [{'col_name': 'member id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['member id']}, {'table_name': 'club', 'table_schema': [{'col_name': 'club id'}, {'col_name': 'overall ranking'}, {'col_name': 'team leader'}, {'col_name': 'club name'}], 'foreign_key_columns': [], 'primary_keys': ['club id']}, {'table_name': 'club leader', 'table_schema': [{'col_name': 'club id'}, {'col_name': 'member id'}, {'col_name': 'year join'}], 'foreign_key_columns': ['member id', 'club id'], 'primary_keys': ['club id']}]" +"Show the name of the leader of the club named ""Houston"".","SELECT T3.Name FROM club_leader AS T1 JOIN club AS T2 ON T1.Club_ID = T2.Club_ID JOIN member AS T3 ON T1.Member_ID = T3.Member_ID WHERE T2.Club_Name = ""Houston""",club_leader,"[{'table_name': 'member', 'table_schema': [{'col_name': 'member id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['member id']}, {'table_name': 'club', 'table_schema': [{'col_name': 'club id'}, {'col_name': 'overall ranking'}, {'col_name': 'team leader'}, {'col_name': 'club name'}], 'foreign_key_columns': [], 'primary_keys': ['club id']}, {'table_name': 'club leader', 'table_schema': [{'col_name': 'club id'}, {'col_name': 'member id'}, {'col_name': 'year join'}], 'foreign_key_columns': ['member id', 'club id'], 'primary_keys': ['club id']}]" +List the names of members that are not club leaders.,SELECT Name FROM member WHERE Member_ID NOT IN (SELECT Member_ID FROM club_leader),club_leader,"[{'table_name': 'member', 'table_schema': [{'col_name': 'member id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['member id']}, {'table_name': 'club leader', 'table_schema': [{'col_name': 'club id'}, {'col_name': 'member id'}, {'col_name': 'year join'}], 'foreign_key_columns': ['member id', 'club id'], 'primary_keys': ['club id']}]" Show the nations that have both members older than 22 and members younger than 19.,SELECT Nationality FROM member WHERE Age > 22 INTERSECT SELECT Nationality FROM member WHERE Age < 19,club_leader,"[{'table_name': 'member', 'table_schema': [{'col_name': 'member id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['member id']}]" -What is the average age of all the club leaders?,SELECT avg(T2.age) FROM club_leader AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id,club_leader,"[{'table_name': 'member', 'table_schema': [{'col_name': 'member id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['member id']}]" +What is the average age of all the club leaders?,SELECT avg(T2.age) FROM club_leader AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id,club_leader,"[{'table_name': 'member', 'table_schema': [{'col_name': 'member id'}, {'col_name': 'name'}, {'col_name': 'nationality'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['member id']}, {'table_name': 'club leader', 'table_schema': [{'col_name': 'club id'}, {'col_name': 'member id'}, {'col_name': 'year join'}], 'foreign_key_columns': ['member id', 'club id'], 'primary_keys': ['club id']}]" Which club name contains the string 'state'?,SELECT club_name FROM club WHERE club_name LIKE '%state%',club_leader,"[{'table_name': 'club', 'table_schema': [{'col_name': 'club id'}, {'col_name': 'overall ranking'}, {'col_name': 'team leader'}, {'col_name': 'club name'}], 'foreign_key_columns': [], 'primary_keys': ['club id']}]" -List all collections' subset. List the subsets' names.,SELECT Collection_Subset_Name FROM Collection_Subsets;,cre_Doc_and_collections,[] -What are the collection susbset names?,SELECT Collection_Subset_Name FROM Collection_Subsets;,cre_Doc_and_collections,[] -What is detail of collection subset with name 'Top collection'?,"SELECT Collecrtion_Subset_Details FROM Collection_Subsets WHERE Collection_Subset_Name = ""Top collection"";",cre_Doc_and_collections,[] -What collection details are there on the subset named 'Top collection'?,"SELECT Collecrtion_Subset_Details FROM Collection_Subsets WHERE Collection_Subset_Name = ""Top collection"";",cre_Doc_and_collections,[] -List all documents's subset. List the subset's name.,SELECT Document_Subset_Name FROM Document_Subsets;,cre_Doc_and_collections,[] -What are the document subset names?,SELECT Document_Subset_Name FROM Document_Subsets;,cre_Doc_and_collections,[] -What is the detail of document subset with name 'Best for 2000'?,"SELECT Document_Subset_Details FROM Document_Subsets WHERE Document_Subset_Name = ""Best for 2000"";",cre_Doc_and_collections,[] -What are the details on the document subsets that are named 'Best for 2000'?,"SELECT Document_Subset_Details FROM Document_Subsets WHERE Document_Subset_Name = ""Best for 2000"";",cre_Doc_and_collections,[] -List document id of all documents.,SELECT Document_Object_ID FROM Document_Objects;,cre_Doc_and_collections,[] -What is the object id of the document objects?,SELECT Document_Object_ID FROM Document_Objects;,cre_Doc_and_collections,[] -What is the parent document of document owned by Marlin? List the document id.,SELECT Parent_Document_Object_ID FROM Document_Objects WHERE OWNER = 'Marlin',cre_Doc_and_collections,[] -What are the document object ids of the objects owned by Marlin?,SELECT Parent_Document_Object_ID FROM Document_Objects WHERE OWNER = 'Marlin',cre_Doc_and_collections,[] -What is the owner of document with the Description 'Braeden Collection'?,SELECT OWNER FROM Document_Objects WHERE Description = 'Braeden Collection',cre_Doc_and_collections,[] -What are the owners of the document objects described as the 'Braeden Collection'?,SELECT OWNER FROM Document_Objects WHERE Description = 'Braeden Collection',cre_Doc_and_collections,[] -What is the owner of the parent document of document owned by 'Marlin'?,SELECT T2.Owner FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID WHERE T1.Owner = 'Marlin',cre_Doc_and_collections,[] -Who is the owner of the parent document of every documents where 'Marlin' is the owner?,SELECT T2.Owner FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID WHERE T1.Owner = 'Marlin',cre_Doc_and_collections,[] -What are the different descriptions of all the parent documents?,SELECT DISTINCT T2.Description FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID,cre_Doc_and_collections,[] -What is the unique description of every parent document?,SELECT DISTINCT T2.Description FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID,cre_Doc_and_collections,[] -How many documents owned by Marlin?,"SELECT count(*) FROM Document_Objects WHERE OWNER = ""Marlin"";",cre_Doc_and_collections,[] -What is the count of documents owned by Marlin?,"SELECT count(*) FROM Document_Objects WHERE OWNER = ""Marlin"";",cre_Doc_and_collections,[] -List all documents ids that are not the parent of other documents.,SELECT Document_Object_ID FROM Document_Objects EXCEPT SELECT Parent_Document_Object_ID FROM Document_Objects,cre_Doc_and_collections,[] -What are the ids of the documents that are not parent documents?,SELECT Document_Object_ID FROM Document_Objects EXCEPT SELECT Parent_Document_Object_ID FROM Document_Objects,cre_Doc_and_collections,[] -How many child documents does each parent document has? List the document id and the number.,"SELECT T2.Document_Object_ID , count(*) FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID GROUP BY T2.Document_Object_ID;",cre_Doc_and_collections,[] -"What is the number of child documents for each parent document, and what are the ids of the parent documents?","SELECT T2.Document_Object_ID , count(*) FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID GROUP BY T2.Document_Object_ID;",cre_Doc_and_collections,[] +List all collections' subset. List the subsets' names.,SELECT Collection_Subset_Name FROM Collection_Subsets;,cre_Doc_and_collections,"[{'table_name': 'collection subsets', 'table_schema': [{'col_name': 'collection subset id'}, {'col_name': 'collection subset name'}, {'col_name': 'collecrtion subset details'}], 'foreign_key_columns': [], 'primary_keys': ['collection subset id']}]" +What are the collection susbset names?,SELECT Collection_Subset_Name FROM Collection_Subsets;,cre_Doc_and_collections,"[{'table_name': 'collection subsets', 'table_schema': [{'col_name': 'collection subset id'}, {'col_name': 'collection subset name'}, {'col_name': 'collecrtion subset details'}], 'foreign_key_columns': [], 'primary_keys': ['collection subset id']}]" +What is detail of collection subset with name 'Top collection'?,"SELECT Collecrtion_Subset_Details FROM Collection_Subsets WHERE Collection_Subset_Name = ""Top collection"";",cre_Doc_and_collections,"[{'table_name': 'collection subsets', 'table_schema': [{'col_name': 'collection subset id'}, {'col_name': 'collection subset name'}, {'col_name': 'collecrtion subset details'}], 'foreign_key_columns': [], 'primary_keys': ['collection subset id']}]" +What collection details are there on the subset named 'Top collection'?,"SELECT Collecrtion_Subset_Details FROM Collection_Subsets WHERE Collection_Subset_Name = ""Top collection"";",cre_Doc_and_collections,"[{'table_name': 'collection subsets', 'table_schema': [{'col_name': 'collection subset id'}, {'col_name': 'collection subset name'}, {'col_name': 'collecrtion subset details'}], 'foreign_key_columns': [], 'primary_keys': ['collection subset id']}]" +List all documents's subset. List the subset's name.,SELECT Document_Subset_Name FROM Document_Subsets;,cre_Doc_and_collections,"[{'table_name': 'document subsets', 'table_schema': [{'col_name': 'document subset id'}, {'col_name': 'document subset name'}, {'col_name': 'document subset details'}], 'foreign_key_columns': [], 'primary_keys': ['document subset id']}]" +What are the document subset names?,SELECT Document_Subset_Name FROM Document_Subsets;,cre_Doc_and_collections,"[{'table_name': 'document subsets', 'table_schema': [{'col_name': 'document subset id'}, {'col_name': 'document subset name'}, {'col_name': 'document subset details'}], 'foreign_key_columns': [], 'primary_keys': ['document subset id']}]" +What is the detail of document subset with name 'Best for 2000'?,"SELECT Document_Subset_Details FROM Document_Subsets WHERE Document_Subset_Name = ""Best for 2000"";",cre_Doc_and_collections,"[{'table_name': 'document subsets', 'table_schema': [{'col_name': 'document subset id'}, {'col_name': 'document subset name'}, {'col_name': 'document subset details'}], 'foreign_key_columns': [], 'primary_keys': ['document subset id']}]" +What are the details on the document subsets that are named 'Best for 2000'?,"SELECT Document_Subset_Details FROM Document_Subsets WHERE Document_Subset_Name = ""Best for 2000"";",cre_Doc_and_collections,"[{'table_name': 'document subsets', 'table_schema': [{'col_name': 'document subset id'}, {'col_name': 'document subset name'}, {'col_name': 'document subset details'}], 'foreign_key_columns': [], 'primary_keys': ['document subset id']}]" +List document id of all documents.,SELECT Document_Object_ID FROM Document_Objects;,cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}]" +What is the object id of the document objects?,SELECT Document_Object_ID FROM Document_Objects;,cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}]" +What is the parent document of document owned by Marlin? List the document id.,SELECT Parent_Document_Object_ID FROM Document_Objects WHERE OWNER = 'Marlin',cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}]" +What are the document object ids of the objects owned by Marlin?,SELECT Parent_Document_Object_ID FROM Document_Objects WHERE OWNER = 'Marlin',cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}]" +What is the owner of document with the Description 'Braeden Collection'?,SELECT OWNER FROM Document_Objects WHERE Description = 'Braeden Collection',cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}]" +What are the owners of the document objects described as the 'Braeden Collection'?,SELECT OWNER FROM Document_Objects WHERE Description = 'Braeden Collection',cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}]" +What is the owner of the parent document of document owned by 'Marlin'?,SELECT T2.Owner FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID WHERE T1.Owner = 'Marlin',cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}]" +Who is the owner of the parent document of every documents where 'Marlin' is the owner?,SELECT T2.Owner FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID WHERE T1.Owner = 'Marlin',cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}]" +What are the different descriptions of all the parent documents?,SELECT DISTINCT T2.Description FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID,cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}]" +What is the unique description of every parent document?,SELECT DISTINCT T2.Description FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID,cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}]" +How many documents owned by Marlin?,"SELECT count(*) FROM Document_Objects WHERE OWNER = ""Marlin"";",cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}]" +What is the count of documents owned by Marlin?,"SELECT count(*) FROM Document_Objects WHERE OWNER = ""Marlin"";",cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}]" +List all documents ids that are not the parent of other documents.,SELECT Document_Object_ID FROM Document_Objects EXCEPT SELECT Parent_Document_Object_ID FROM Document_Objects,cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}]" +What are the ids of the documents that are not parent documents?,SELECT Document_Object_ID FROM Document_Objects EXCEPT SELECT Parent_Document_Object_ID FROM Document_Objects,cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}]" +How many child documents does each parent document has? List the document id and the number.,"SELECT T2.Document_Object_ID , count(*) FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID GROUP BY T2.Document_Object_ID;",cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}]" +"What is the number of child documents for each parent document, and what are the ids of the parent documents?","SELECT T2.Document_Object_ID , count(*) FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID GROUP BY T2.Document_Object_ID;",cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}]" List the name of all collections.,SELECT Collection_Name FROM Collections;,cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" what are the collection names?,SELECT Collection_Name FROM Collections;,cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" What is the description of collection named Best?,"SELECT Collection_Description FROM Collections WHERE Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" @@ -692,74 +692,74 @@ What is the name of the parent collection of the collection named Nice?,"SELECT What are the names of all parent collections of the collection named Nice?,"SELECT T2.Collection_Name FROM Collections AS T1 JOIN Collections AS T2 ON T1.Parent_Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = ""Nice"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" Which collection is not the parent of other collection? List the collection's name.,SELECT Collection_Name FROM Collections EXCEPT SELECT T2.Collection_Name FROM Collections AS T1 JOIN Collections AS T2 ON T1.Parent_Collection_ID = T2.Collection_ID;,cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" What are the names of the collections that are not the parent of the other collections?,SELECT Collection_Name FROM Collections EXCEPT SELECT T2.Collection_Name FROM Collections AS T1 JOIN Collections AS T2 ON T1.Parent_Collection_ID = T2.Collection_ID;,cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -List document that have more than one child. List the document id.,SELECT T2.Document_Object_ID FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID GROUP BY T2.Document_Object_ID HAVING count(*) > 1;,cre_Doc_and_collections,[] -What are the ids of the documents that have more than one child?,SELECT T2.Document_Object_ID FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID GROUP BY T2.Document_Object_ID HAVING count(*) > 1;,cre_Doc_and_collections,[] +List document that have more than one child. List the document id.,SELECT T2.Document_Object_ID FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID GROUP BY T2.Document_Object_ID HAVING count(*) > 1;,cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}]" +What are the ids of the documents that have more than one child?,SELECT T2.Document_Object_ID FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID GROUP BY T2.Document_Object_ID HAVING count(*) > 1;,cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}]" How many child collection does the collection named Best has?,"SELECT count(*) FROM Collections AS T1 JOIN Collections AS T2 ON T1.Parent_Collection_ID = T2.Collection_ID WHERE T2.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" What is the number of child collections belonging to the collection named Best?,"SELECT count(*) FROM Collections AS T1 JOIN Collections AS T2 ON T1.Parent_Collection_ID = T2.Collection_ID WHERE T2.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -List all document which is related to document owned by Ransom . List the document id .,select t1.document_object_id from document_subset_members as t1 join document_objects as t2 on t1.document_object_id = t2.document_object_id where t2.owner = 'ransom',cre_Doc_and_collections,[] -What are the document object ids of the related to the document owned by Ransom ?,select t1.document_object_id from document_subset_members as t1 join document_objects as t2 on t1.document_object_id = t2.document_object_id where t2.owner = 'ransom',cre_Doc_and_collections,[] -"List collection subset id, name and number of collections in each subset.","SELECT T2.Collection_Subset_ID , T1.Collection_Subset_Name , count(*) FROM Collection_Subsets AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Collection_Subset_ID = T2.Collection_Subset_ID GROUP BY T2.Collection_Subset_ID;",cre_Doc_and_collections,[] -"What are the collection subset ids, names, and number of collections for each subset?","SELECT T2.Collection_Subset_ID , T1.Collection_Subset_Name , count(*) FROM Collection_Subsets AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Collection_Subset_ID = T2.Collection_Subset_ID GROUP BY T2.Collection_Subset_ID;",cre_Doc_and_collections,[] -Which document has most of child? List the document id and the number of child.,"SELECT T2.Document_Object_ID , count(*) FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID GROUP BY T2.Document_Object_ID ORDER BY count(*) DESC LIMIT 1;",cre_Doc_and_collections,[] -"For each document object id, how many children do they have?","SELECT T2.Document_Object_ID , count(*) FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID GROUP BY T2.Document_Object_ID ORDER BY count(*) DESC LIMIT 1;",cre_Doc_and_collections,[] -Which document has least number of related documents? List the document id and the number of related documents.,"SELECT Document_Object_ID , count(*) FROM Document_Subset_Members GROUP BY Document_Object_ID ORDER BY count(*) ASC LIMIT 1;",cre_Doc_and_collections,[] -What is the document object id with the least number of documents ?,"select document_object_id , count(*) from document_subset_members group by document_object_id order by count(*) asc limit 1;",cre_Doc_and_collections,[] -Which document has between 2 and 4 number of documents ? List the document id and the number of related documents .,"select document_object_id , count(*) from document_subset_members group by document_object_id having count(*) between 2 and 4;",cre_Doc_and_collections,[] -What are the ids of the dcouments that have between 2 and 4 related documents and how many related items are there?,"SELECT Document_Object_ID , count(*) FROM Document_Subset_Members GROUP BY Document_Object_ID HAVING count(*) BETWEEN 2 AND 4;",cre_Doc_and_collections,[] -List all owner of documents that is related to documents owned by Braeden.,SELECT DISTINCT OWNER FROM Document_Subset_Members AS T1 JOIN Document_Objects AS T2 ON T1.Related_Document_Object_ID = T2.Document_Object_ID WHERE T2.Owner = 'Braeden';,cre_Doc_and_collections,[] -What are the different owners of documents that are related to ones owned by Braeden?,SELECT DISTINCT OWNER FROM Document_Subset_Members AS T1 JOIN Document_Objects AS T2 ON T1.Related_Document_Object_ID = T2.Document_Object_ID WHERE T2.Owner = 'Braeden';,cre_Doc_and_collections,[] -Which unique subset does document owned by Braeden belong to? List the subset name.,SELECT DISTINCT T1.Document_Subset_Name FROM Document_Subsets AS T1 JOIN Document_Subset_Members AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID JOIN Document_Objects AS T3 ON T2.Document_Object_ID = T3.Document_Object_ID WHERE T3.owner = 'Braeden',cre_Doc_and_collections,[] -What are the different subset names of all documents owned by Braeden?,SELECT DISTINCT T1.Document_Subset_Name FROM Document_Subsets AS T1 JOIN Document_Subset_Members AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID JOIN Document_Objects AS T3 ON T2.Document_Object_ID = T3.Document_Object_ID WHERE T3.owner = 'Braeden',cre_Doc_and_collections,[] -"List subset id, name and number of different documents in each subset.","SELECT T1.Document_Subset_ID , T2.Document_Subset_Name , count(DISTINCT T1.Document_Object_ID) FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID GROUP BY T1.Document_Subset_ID;",cre_Doc_and_collections,[] -"What is the subset id, name, and number of different documents for each subset?","SELECT T1.Document_Subset_ID , T2.Document_Subset_Name , count(DISTINCT T1.Document_Object_ID) FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID GROUP BY T1.Document_Subset_ID;",cre_Doc_and_collections,[] -"Which document subset has most of number of distinct documents ? List subset id , name and number of documents .","select t1.document_subset_id , t2.document_subset_name , count(distinct t1.document_object_id) from document_subset_members as t1 join document_subsets as t2 on t1.document_subset_id = t2.document_subset_id group by t1.document_subset_id order by count(*) desc limit 1;",cre_Doc_and_collections,[] -"For the document subset with the most number of different documents , what are the ids and names of the subset , as well as the number of documents ?","select t1.document_subset_id , t2.document_subset_name , count(distinct t1.document_object_id) from document_subset_members as t1 join document_subsets as t2 on t1.document_subset_id = t2.document_subset_id group by t1.document_subset_id order by count(*) desc limit 1;",cre_Doc_and_collections,[] -"For document subset named 'Best for 2000', List all document id that in this subset.","SELECT DISTINCT T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID WHERE T2.Document_Subset_Name = ""Best for 2000"";",cre_Doc_and_collections,[] -"For the document subset named 'Best for 2000', what are the document ids in that subset?","SELECT DISTINCT T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID WHERE T2.Document_Subset_Name = ""Best for 2000"";",cre_Doc_and_collections,[] -List all document subsets of documents that related to each document id. List the name of document subset and the document id.,"SELECT DISTINCT T3.Document_Subset_Name , T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subset_Members AS T2 ON T1.Related_Document_Object_ID = T2.Document_Object_ID JOIN Document_Subsets AS T3 ON T2.Document_Subset_ID = T3.Document_Subset_ID",cre_Doc_and_collections,[] -"What are the different subsets of documents related to each document id , list the name of the document subset and id of the actual document ?","select distinct t3.document_subset_name , t1.document_object_id from document_subset_members as t1 join document_subset_members as t2 on t1.related_document_object_id = t2.document_object_id join document_subsets as t3 on t2.document_subset_id = t3.document_subset_id",cre_Doc_and_collections,[] -List the Collection Name that document owned by 'Ransom ' belong to .,select t1.collection_name from collections as t1 join documents_in_collections as t2 on t1.collection_id = t2.collection_id join document_objects as t3 on t2.document_object_id = t3.document_object_id where t3.owner = 'ransom',cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -What is the collection name of a document owned by 'Ransom'?,SELECT T1.Collection_Name FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID JOIN Document_Objects AS T3 ON T2.Document_object_id = T3.Document_object_id WHERE T3.owner = 'Ransom',cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -How many collections does each document belong to? List the count and the document id.,"SELECT count(*) , T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID GROUP BY T2.Document_Object_ID",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -"For each document object id, how many collections does it belong to?","SELECT count(*) , T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID GROUP BY T2.Document_Object_ID",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -How many documents does collection named 'Best' has?,"SELECT count(*) FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -What is the number of documents in the collection named 'Best'?,"SELECT count(*) FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -List the document id of all documents in collection named Best.,"SELECT T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -What is the number of document object ids in the collection named Best?,"SELECT T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -"Which collection have most number of documents? List collection name, id and number of documents.","SELECT T1.Collection_Name , T1.Collection_ID , count(*) FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = ""Best"" GROUP BY T1.Collection_ID ORDER BY count(*) DESC LIMIT 1;",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -"For ever collection named 'Best', what is the name and id of the one with the most documents, and how many documents does it have?","SELECT T1.Collection_Name , T1.Collection_ID , count(*) FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = ""Best"" GROUP BY T1.Collection_ID ORDER BY count(*) DESC LIMIT 1;",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -List id of documents that in document subset Best for 2000 and collection named Best.,"SELECT DISTINCT T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID JOIN Documents_in_Collections AS T3 ON T1.Document_Object_ID = T3.Document_Object_ID JOIN Collections AS T4 ON T3.Collection_ID = T4.Collection_ID WHERE T2.Document_Subset_Name = ""Best for 2000"" AND T4.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -What are the different document object ids in the subset named 'Best for 2000' and in the collection named 'Best'?,"SELECT DISTINCT T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID JOIN Documents_in_Collections AS T3 ON T1.Document_Object_ID = T3.Document_Object_ID JOIN Collections AS T4 ON T3.Collection_ID = T4.Collection_ID WHERE T2.Document_Subset_Name = ""Best for 2000"" AND T4.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -List id of documents that in collection named Best but not in document subset Best for 2000.,"SELECT DISTINCT T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = ""Best"" EXCEPT SELECT DISTINCT T3.Document_Object_ID FROM Document_Subset_Members AS T3 JOIN Document_Subsets AS T4 ON T3.Document_Subset_ID = T4.Document_Subset_ID WHERE T4.Document_Subset_Name = ""Best for 2000""",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -What are the different document object ids that are in the collection named Best but not in the subset named 'Best for 2000'?,"SELECT DISTINCT T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = ""Best"" EXCEPT SELECT DISTINCT T3.Document_Object_ID FROM Document_Subset_Members AS T3 JOIN Document_Subsets AS T4 ON T3.Document_Subset_ID = T4.Document_Subset_ID WHERE T4.Document_Subset_Name = ""Best for 2000""",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -List id of documents that in document subset Best for 2000 or in collection named Best.,"SELECT DISTINCT T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID JOIN Documents_in_Collections AS T3 ON T1.Document_Object_ID = T3.Document_Object_ID JOIN Collections AS T4 ON T3.Collection_ID = T4.Collection_ID WHERE T2.Document_Subset_Name = ""Best for 2000"" OR T4.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -What are the different document ids that are in the subset named 'Best for 2000' or in the collection named 'Best'?,"SELECT DISTINCT T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID JOIN Documents_in_Collections AS T3 ON T1.Document_Object_ID = T3.Document_Object_ID JOIN Collections AS T4 ON T3.Collection_ID = T4.Collection_ID WHERE T2.Document_Subset_Name = ""Best for 2000"" OR T4.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -List all name of collections that are related to collection named Best.,"SELECT DISTINCT T4.Collection_Name FROM Collection_Subset_Members AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Related_Collection_ID = T2.Collection_ID JOIN Collections AS T3 ON T1.Collection_ID = T3.Collection_ID JOIN Collections AS T4 ON T2.Collection_ID = T4.Collection_ID WHERE T3.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -What are the names of the collections that are related to the collection named Best?,"SELECT DISTINCT T4.Collection_Name FROM Collection_Subset_Members AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Related_Collection_ID = T2.Collection_ID JOIN Collections AS T3 ON T1.Collection_ID = T3.Collection_ID JOIN Collections AS T4 ON T2.Collection_ID = T4.Collection_ID WHERE T3.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -How many collections that are related to collection named Best?,"SELECT count(DISTINCT T1.Related_Collection_ID) FROM Collection_Subset_Members AS T1 JOIN Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T2.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -How many different collections are related to the one named 'Best'?,"SELECT count(DISTINCT T1.Related_Collection_ID) FROM Collection_Subset_Members AS T1 JOIN Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T2.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -Which collection subset does collection name Best in? List collection subset name.,"SELECT DISTINCT T1.Collection_Subset_Name FROM Collection_Subsets AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Collection_Subset_ID = T2.Collection_Subset_ID JOIN Collections AS T3 ON T2.Collection_ID = T3.Collection_ID WHERE T3.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" -What are the collection subsets that the collection named 'Best' in?,"SELECT DISTINCT T1.Collection_Subset_Name FROM Collection_Subsets AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Collection_Subset_ID = T2.Collection_Subset_ID JOIN Collections AS T3 ON T2.Collection_ID = T3.Collection_ID WHERE T3.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}]" +List all document which is related to document owned by Ransom . List the document id .,select t1.document_object_id from document_subset_members as t1 join document_objects as t2 on t1.document_object_id = t2.document_object_id where t2.owner = 'ransom',cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}, {'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +What are the document object ids of the related to the document owned by Ransom ?,select t1.document_object_id from document_subset_members as t1 join document_objects as t2 on t1.document_object_id = t2.document_object_id where t2.owner = 'ransom',cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}, {'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +"List collection subset id, name and number of collections in each subset.","SELECT T2.Collection_Subset_ID , T1.Collection_Subset_Name , count(*) FROM Collection_Subsets AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Collection_Subset_ID = T2.Collection_Subset_ID GROUP BY T2.Collection_Subset_ID;",cre_Doc_and_collections,"[{'table_name': 'collection subsets', 'table_schema': [{'col_name': 'collection subset id'}, {'col_name': 'collection subset name'}, {'col_name': 'collecrtion subset details'}], 'foreign_key_columns': [], 'primary_keys': ['collection subset id']}, {'table_name': 'collection subset members', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'related collection id'}, {'col_name': 'collection subset id'}], 'foreign_key_columns': ['collection subset id', 'related collection id', 'collection id'], 'primary_keys': ['collection id']}]" +"What are the collection subset ids, names, and number of collections for each subset?","SELECT T2.Collection_Subset_ID , T1.Collection_Subset_Name , count(*) FROM Collection_Subsets AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Collection_Subset_ID = T2.Collection_Subset_ID GROUP BY T2.Collection_Subset_ID;",cre_Doc_and_collections,"[{'table_name': 'collection subsets', 'table_schema': [{'col_name': 'collection subset id'}, {'col_name': 'collection subset name'}, {'col_name': 'collecrtion subset details'}], 'foreign_key_columns': [], 'primary_keys': ['collection subset id']}, {'table_name': 'collection subset members', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'related collection id'}, {'col_name': 'collection subset id'}], 'foreign_key_columns': ['collection subset id', 'related collection id', 'collection id'], 'primary_keys': ['collection id']}]" +Which document has most of child? List the document id and the number of child.,"SELECT T2.Document_Object_ID , count(*) FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID GROUP BY T2.Document_Object_ID ORDER BY count(*) DESC LIMIT 1;",cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}]" +"For each document object id, how many children do they have?","SELECT T2.Document_Object_ID , count(*) FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID GROUP BY T2.Document_Object_ID ORDER BY count(*) DESC LIMIT 1;",cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}]" +Which document has least number of related documents? List the document id and the number of related documents.,"SELECT Document_Object_ID , count(*) FROM Document_Subset_Members GROUP BY Document_Object_ID ORDER BY count(*) ASC LIMIT 1;",cre_Doc_and_collections,"[{'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +What is the document object id with the least number of documents ?,"select document_object_id , count(*) from document_subset_members group by document_object_id order by count(*) asc limit 1;",cre_Doc_and_collections,"[{'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +Which document has between 2 and 4 number of documents ? List the document id and the number of related documents .,"select document_object_id , count(*) from document_subset_members group by document_object_id having count(*) between 2 and 4;",cre_Doc_and_collections,"[{'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +What are the ids of the dcouments that have between 2 and 4 related documents and how many related items are there?,"SELECT Document_Object_ID , count(*) FROM Document_Subset_Members GROUP BY Document_Object_ID HAVING count(*) BETWEEN 2 AND 4;",cre_Doc_and_collections,"[{'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +List all owner of documents that is related to documents owned by Braeden.,SELECT DISTINCT OWNER FROM Document_Subset_Members AS T1 JOIN Document_Objects AS T2 ON T1.Related_Document_Object_ID = T2.Document_Object_ID WHERE T2.Owner = 'Braeden';,cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}, {'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +What are the different owners of documents that are related to ones owned by Braeden?,SELECT DISTINCT OWNER FROM Document_Subset_Members AS T1 JOIN Document_Objects AS T2 ON T1.Related_Document_Object_ID = T2.Document_Object_ID WHERE T2.Owner = 'Braeden';,cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}, {'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +Which unique subset does document owned by Braeden belong to? List the subset name.,SELECT DISTINCT T1.Document_Subset_Name FROM Document_Subsets AS T1 JOIN Document_Subset_Members AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID JOIN Document_Objects AS T3 ON T2.Document_Object_ID = T3.Document_Object_ID WHERE T3.owner = 'Braeden',cre_Doc_and_collections,"[{'table_name': 'document subsets', 'table_schema': [{'col_name': 'document subset id'}, {'col_name': 'document subset name'}, {'col_name': 'document subset details'}], 'foreign_key_columns': [], 'primary_keys': ['document subset id']}, {'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}, {'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +What are the different subset names of all documents owned by Braeden?,SELECT DISTINCT T1.Document_Subset_Name FROM Document_Subsets AS T1 JOIN Document_Subset_Members AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID JOIN Document_Objects AS T3 ON T2.Document_Object_ID = T3.Document_Object_ID WHERE T3.owner = 'Braeden',cre_Doc_and_collections,"[{'table_name': 'document subsets', 'table_schema': [{'col_name': 'document subset id'}, {'col_name': 'document subset name'}, {'col_name': 'document subset details'}], 'foreign_key_columns': [], 'primary_keys': ['document subset id']}, {'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}, {'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +"List subset id, name and number of different documents in each subset.","SELECT T1.Document_Subset_ID , T2.Document_Subset_Name , count(DISTINCT T1.Document_Object_ID) FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID GROUP BY T1.Document_Subset_ID;",cre_Doc_and_collections,"[{'table_name': 'document subsets', 'table_schema': [{'col_name': 'document subset id'}, {'col_name': 'document subset name'}, {'col_name': 'document subset details'}], 'foreign_key_columns': [], 'primary_keys': ['document subset id']}, {'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +"What is the subset id, name, and number of different documents for each subset?","SELECT T1.Document_Subset_ID , T2.Document_Subset_Name , count(DISTINCT T1.Document_Object_ID) FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID GROUP BY T1.Document_Subset_ID;",cre_Doc_and_collections,"[{'table_name': 'document subsets', 'table_schema': [{'col_name': 'document subset id'}, {'col_name': 'document subset name'}, {'col_name': 'document subset details'}], 'foreign_key_columns': [], 'primary_keys': ['document subset id']}, {'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +"Which document subset has most of number of distinct documents ? List subset id , name and number of documents .","select t1.document_subset_id , t2.document_subset_name , count(distinct t1.document_object_id) from document_subset_members as t1 join document_subsets as t2 on t1.document_subset_id = t2.document_subset_id group by t1.document_subset_id order by count(*) desc limit 1;",cre_Doc_and_collections,"[{'table_name': 'document subsets', 'table_schema': [{'col_name': 'document subset id'}, {'col_name': 'document subset name'}, {'col_name': 'document subset details'}], 'foreign_key_columns': [], 'primary_keys': ['document subset id']}, {'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +"For the document subset with the most number of different documents , what are the ids and names of the subset , as well as the number of documents ?","select t1.document_subset_id , t2.document_subset_name , count(distinct t1.document_object_id) from document_subset_members as t1 join document_subsets as t2 on t1.document_subset_id = t2.document_subset_id group by t1.document_subset_id order by count(*) desc limit 1;",cre_Doc_and_collections,"[{'table_name': 'document subsets', 'table_schema': [{'col_name': 'document subset id'}, {'col_name': 'document subset name'}, {'col_name': 'document subset details'}], 'foreign_key_columns': [], 'primary_keys': ['document subset id']}, {'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +"For document subset named 'Best for 2000', List all document id that in this subset.","SELECT DISTINCT T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID WHERE T2.Document_Subset_Name = ""Best for 2000"";",cre_Doc_and_collections,"[{'table_name': 'document subsets', 'table_schema': [{'col_name': 'document subset id'}, {'col_name': 'document subset name'}, {'col_name': 'document subset details'}], 'foreign_key_columns': [], 'primary_keys': ['document subset id']}, {'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +"For the document subset named 'Best for 2000', what are the document ids in that subset?","SELECT DISTINCT T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID WHERE T2.Document_Subset_Name = ""Best for 2000"";",cre_Doc_and_collections,"[{'table_name': 'document subsets', 'table_schema': [{'col_name': 'document subset id'}, {'col_name': 'document subset name'}, {'col_name': 'document subset details'}], 'foreign_key_columns': [], 'primary_keys': ['document subset id']}, {'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +List all document subsets of documents that related to each document id. List the name of document subset and the document id.,"SELECT DISTINCT T3.Document_Subset_Name , T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subset_Members AS T2 ON T1.Related_Document_Object_ID = T2.Document_Object_ID JOIN Document_Subsets AS T3 ON T2.Document_Subset_ID = T3.Document_Subset_ID",cre_Doc_and_collections,"[{'table_name': 'document subsets', 'table_schema': [{'col_name': 'document subset id'}, {'col_name': 'document subset name'}, {'col_name': 'document subset details'}], 'foreign_key_columns': [], 'primary_keys': ['document subset id']}, {'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +"What are the different subsets of documents related to each document id , list the name of the document subset and id of the actual document ?","select distinct t3.document_subset_name , t1.document_object_id from document_subset_members as t1 join document_subset_members as t2 on t1.related_document_object_id = t2.document_object_id join document_subsets as t3 on t2.document_subset_id = t3.document_subset_id",cre_Doc_and_collections,"[{'table_name': 'document subsets', 'table_schema': [{'col_name': 'document subset id'}, {'col_name': 'document subset name'}, {'col_name': 'document subset details'}], 'foreign_key_columns': [], 'primary_keys': ['document subset id']}, {'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +List the Collection Name that document owned by 'Ransom ' belong to .,select t1.collection_name from collections as t1 join documents_in_collections as t2 on t1.collection_id = t2.collection_id join document_objects as t3 on t2.document_object_id = t3.document_object_id where t3.owner = 'ransom',cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}, {'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'documents in collections', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'collection id'}], 'foreign_key_columns': ['collection id', 'document object id'], 'primary_keys': ['document object id']}]" +What is the collection name of a document owned by 'Ransom'?,SELECT T1.Collection_Name FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID JOIN Document_Objects AS T3 ON T2.Document_object_id = T3.Document_object_id WHERE T3.owner = 'Ransom',cre_Doc_and_collections,"[{'table_name': 'document objects', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'parent document object id'}, {'col_name': 'owner'}, {'col_name': 'description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['document object id']}, {'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'documents in collections', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'collection id'}], 'foreign_key_columns': ['collection id', 'document object id'], 'primary_keys': ['document object id']}]" +How many collections does each document belong to? List the count and the document id.,"SELECT count(*) , T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID GROUP BY T2.Document_Object_ID",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'documents in collections', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'collection id'}], 'foreign_key_columns': ['collection id', 'document object id'], 'primary_keys': ['document object id']}]" +"For each document object id, how many collections does it belong to?","SELECT count(*) , T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID GROUP BY T2.Document_Object_ID",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'documents in collections', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'collection id'}], 'foreign_key_columns': ['collection id', 'document object id'], 'primary_keys': ['document object id']}]" +How many documents does collection named 'Best' has?,"SELECT count(*) FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'documents in collections', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'collection id'}], 'foreign_key_columns': ['collection id', 'document object id'], 'primary_keys': ['document object id']}]" +What is the number of documents in the collection named 'Best'?,"SELECT count(*) FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'documents in collections', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'collection id'}], 'foreign_key_columns': ['collection id', 'document object id'], 'primary_keys': ['document object id']}]" +List the document id of all documents in collection named Best.,"SELECT T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'documents in collections', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'collection id'}], 'foreign_key_columns': ['collection id', 'document object id'], 'primary_keys': ['document object id']}]" +What is the number of document object ids in the collection named Best?,"SELECT T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'documents in collections', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'collection id'}], 'foreign_key_columns': ['collection id', 'document object id'], 'primary_keys': ['document object id']}]" +"Which collection have most number of documents? List collection name, id and number of documents.","SELECT T1.Collection_Name , T1.Collection_ID , count(*) FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = ""Best"" GROUP BY T1.Collection_ID ORDER BY count(*) DESC LIMIT 1;",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'documents in collections', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'collection id'}], 'foreign_key_columns': ['collection id', 'document object id'], 'primary_keys': ['document object id']}]" +"For ever collection named 'Best', what is the name and id of the one with the most documents, and how many documents does it have?","SELECT T1.Collection_Name , T1.Collection_ID , count(*) FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = ""Best"" GROUP BY T1.Collection_ID ORDER BY count(*) DESC LIMIT 1;",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'documents in collections', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'collection id'}], 'foreign_key_columns': ['collection id', 'document object id'], 'primary_keys': ['document object id']}]" +List id of documents that in document subset Best for 2000 and collection named Best.,"SELECT DISTINCT T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID JOIN Documents_in_Collections AS T3 ON T1.Document_Object_ID = T3.Document_Object_ID JOIN Collections AS T4 ON T3.Collection_ID = T4.Collection_ID WHERE T2.Document_Subset_Name = ""Best for 2000"" AND T4.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'document subsets', 'table_schema': [{'col_name': 'document subset id'}, {'col_name': 'document subset name'}, {'col_name': 'document subset details'}], 'foreign_key_columns': [], 'primary_keys': ['document subset id']}, {'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'documents in collections', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'collection id'}], 'foreign_key_columns': ['collection id', 'document object id'], 'primary_keys': ['document object id']}, {'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +What are the different document object ids in the subset named 'Best for 2000' and in the collection named 'Best'?,"SELECT DISTINCT T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID JOIN Documents_in_Collections AS T3 ON T1.Document_Object_ID = T3.Document_Object_ID JOIN Collections AS T4 ON T3.Collection_ID = T4.Collection_ID WHERE T2.Document_Subset_Name = ""Best for 2000"" AND T4.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'document subsets', 'table_schema': [{'col_name': 'document subset id'}, {'col_name': 'document subset name'}, {'col_name': 'document subset details'}], 'foreign_key_columns': [], 'primary_keys': ['document subset id']}, {'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'documents in collections', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'collection id'}], 'foreign_key_columns': ['collection id', 'document object id'], 'primary_keys': ['document object id']}, {'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +List id of documents that in collection named Best but not in document subset Best for 2000.,"SELECT DISTINCT T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = ""Best"" EXCEPT SELECT DISTINCT T3.Document_Object_ID FROM Document_Subset_Members AS T3 JOIN Document_Subsets AS T4 ON T3.Document_Subset_ID = T4.Document_Subset_ID WHERE T4.Document_Subset_Name = ""Best for 2000""",cre_Doc_and_collections,"[{'table_name': 'document subsets', 'table_schema': [{'col_name': 'document subset id'}, {'col_name': 'document subset name'}, {'col_name': 'document subset details'}], 'foreign_key_columns': [], 'primary_keys': ['document subset id']}, {'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'documents in collections', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'collection id'}], 'foreign_key_columns': ['collection id', 'document object id'], 'primary_keys': ['document object id']}, {'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +What are the different document object ids that are in the collection named Best but not in the subset named 'Best for 2000'?,"SELECT DISTINCT T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = ""Best"" EXCEPT SELECT DISTINCT T3.Document_Object_ID FROM Document_Subset_Members AS T3 JOIN Document_Subsets AS T4 ON T3.Document_Subset_ID = T4.Document_Subset_ID WHERE T4.Document_Subset_Name = ""Best for 2000""",cre_Doc_and_collections,"[{'table_name': 'document subsets', 'table_schema': [{'col_name': 'document subset id'}, {'col_name': 'document subset name'}, {'col_name': 'document subset details'}], 'foreign_key_columns': [], 'primary_keys': ['document subset id']}, {'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'documents in collections', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'collection id'}], 'foreign_key_columns': ['collection id', 'document object id'], 'primary_keys': ['document object id']}, {'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +List id of documents that in document subset Best for 2000 or in collection named Best.,"SELECT DISTINCT T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID JOIN Documents_in_Collections AS T3 ON T1.Document_Object_ID = T3.Document_Object_ID JOIN Collections AS T4 ON T3.Collection_ID = T4.Collection_ID WHERE T2.Document_Subset_Name = ""Best for 2000"" OR T4.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'document subsets', 'table_schema': [{'col_name': 'document subset id'}, {'col_name': 'document subset name'}, {'col_name': 'document subset details'}], 'foreign_key_columns': [], 'primary_keys': ['document subset id']}, {'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'documents in collections', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'collection id'}], 'foreign_key_columns': ['collection id', 'document object id'], 'primary_keys': ['document object id']}, {'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +What are the different document ids that are in the subset named 'Best for 2000' or in the collection named 'Best'?,"SELECT DISTINCT T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID JOIN Documents_in_Collections AS T3 ON T1.Document_Object_ID = T3.Document_Object_ID JOIN Collections AS T4 ON T3.Collection_ID = T4.Collection_ID WHERE T2.Document_Subset_Name = ""Best for 2000"" OR T4.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'document subsets', 'table_schema': [{'col_name': 'document subset id'}, {'col_name': 'document subset name'}, {'col_name': 'document subset details'}], 'foreign_key_columns': [], 'primary_keys': ['document subset id']}, {'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'documents in collections', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'collection id'}], 'foreign_key_columns': ['collection id', 'document object id'], 'primary_keys': ['document object id']}, {'table_name': 'document subset members', 'table_schema': [{'col_name': 'document object id'}, {'col_name': 'related document object id'}, {'col_name': 'document subset id'}], 'foreign_key_columns': ['document subset id', 'related document object id', 'document object id'], 'primary_keys': ['document object id']}]" +List all name of collections that are related to collection named Best.,"SELECT DISTINCT T4.Collection_Name FROM Collection_Subset_Members AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Related_Collection_ID = T2.Collection_ID JOIN Collections AS T3 ON T1.Collection_ID = T3.Collection_ID JOIN Collections AS T4 ON T2.Collection_ID = T4.Collection_ID WHERE T3.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'collection subset members', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'related collection id'}, {'col_name': 'collection subset id'}], 'foreign_key_columns': ['collection subset id', 'related collection id', 'collection id'], 'primary_keys': ['collection id']}]" +What are the names of the collections that are related to the collection named Best?,"SELECT DISTINCT T4.Collection_Name FROM Collection_Subset_Members AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Related_Collection_ID = T2.Collection_ID JOIN Collections AS T3 ON T1.Collection_ID = T3.Collection_ID JOIN Collections AS T4 ON T2.Collection_ID = T4.Collection_ID WHERE T3.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'collection subset members', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'related collection id'}, {'col_name': 'collection subset id'}], 'foreign_key_columns': ['collection subset id', 'related collection id', 'collection id'], 'primary_keys': ['collection id']}]" +How many collections that are related to collection named Best?,"SELECT count(DISTINCT T1.Related_Collection_ID) FROM Collection_Subset_Members AS T1 JOIN Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T2.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'collection subset members', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'related collection id'}, {'col_name': 'collection subset id'}], 'foreign_key_columns': ['collection subset id', 'related collection id', 'collection id'], 'primary_keys': ['collection id']}]" +How many different collections are related to the one named 'Best'?,"SELECT count(DISTINCT T1.Related_Collection_ID) FROM Collection_Subset_Members AS T1 JOIN Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T2.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'collection subset members', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'related collection id'}, {'col_name': 'collection subset id'}], 'foreign_key_columns': ['collection subset id', 'related collection id', 'collection id'], 'primary_keys': ['collection id']}]" +Which collection subset does collection name Best in? List collection subset name.,"SELECT DISTINCT T1.Collection_Subset_Name FROM Collection_Subsets AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Collection_Subset_ID = T2.Collection_Subset_ID JOIN Collections AS T3 ON T2.Collection_ID = T3.Collection_ID WHERE T3.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collection subsets', 'table_schema': [{'col_name': 'collection subset id'}, {'col_name': 'collection subset name'}, {'col_name': 'collecrtion subset details'}], 'foreign_key_columns': [], 'primary_keys': ['collection subset id']}, {'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'collection subset members', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'related collection id'}, {'col_name': 'collection subset id'}], 'foreign_key_columns': ['collection subset id', 'related collection id', 'collection id'], 'primary_keys': ['collection id']}]" +What are the collection subsets that the collection named 'Best' in?,"SELECT DISTINCT T1.Collection_Subset_Name FROM Collection_Subsets AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Collection_Subset_ID = T2.Collection_Subset_ID JOIN Collections AS T3 ON T2.Collection_ID = T3.Collection_ID WHERE T3.Collection_Name = ""Best"";",cre_Doc_and_collections,"[{'table_name': 'collection subsets', 'table_schema': [{'col_name': 'collection subset id'}, {'col_name': 'collection subset name'}, {'col_name': 'collecrtion subset details'}], 'foreign_key_columns': [], 'primary_keys': ['collection subset id']}, {'table_name': 'collections', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'parent collection id'}, {'col_name': 'collection name'}, {'col_name': 'collection description'}], 'foreign_key_columns': [], 'primary_keys': ['collection id']}, {'table_name': 'collection subset members', 'table_schema': [{'col_name': 'collection id'}, {'col_name': 'related collection id'}, {'col_name': 'collection subset id'}], 'foreign_key_columns': ['collection subset id', 'related collection id', 'collection id'], 'primary_keys': ['collection id']}]" "How many songs contain ""Love"" in their names?","SELECT count(*) FROM songs WHERE name LIKE ""%Love%""",sing_contest,"[{'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" "List the name of the songs in ascending, lexicographical order.",SELECT name FROM songs ORDER BY name,sing_contest,"[{'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" List the names and languages of the songs .,"select name , language from songs",sing_contest,"[{'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What are the maximum and minimum voice sound quality score of the performances?,"SELECT max(voice_sound_quality) , min(voice_sound_quality) FROM performance_score",sing_contest,[] -"What are the voice sound quality score, rhythm tempo score and stage presence score performed by the participant named 'Freeway'?","SELECT T1.voice_sound_quality , T1.rhythm_tempo , T1.stage_presence FROM performance_score AS T1 JOIN participants AS T2 ON T1.participant_id = T2.id WHERE T2.name = 'Freeway'",sing_contest,"[{'table_name': 'participants', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'popularity'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" +What are the maximum and minimum voice sound quality score of the performances?,"SELECT max(voice_sound_quality) , min(voice_sound_quality) FROM performance_score",sing_contest,"[{'table_name': 'performance score', 'table_schema': [{'col_name': 'participant id'}, {'col_name': 'songs id'}, {'col_name': 'voice sound quality'}, {'col_name': 'rhythm tempo'}, {'col_name': 'stage presence'}], 'foreign_key_columns': ['songs id', 'participant id'], 'primary_keys': ['participant id']}]" +"What are the voice sound quality score, rhythm tempo score and stage presence score performed by the participant named 'Freeway'?","SELECT T1.voice_sound_quality , T1.rhythm_tempo , T1.stage_presence FROM performance_score AS T1 JOIN participants AS T2 ON T1.participant_id = T2.id WHERE T2.name = 'Freeway'",sing_contest,"[{'table_name': 'participants', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'popularity'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'performance score', 'table_schema': [{'col_name': 'participant id'}, {'col_name': 'songs id'}, {'col_name': 'voice sound quality'}, {'col_name': 'rhythm tempo'}, {'col_name': 'stage presence'}], 'foreign_key_columns': ['songs id', 'participant id'], 'primary_keys': ['participant id']}]" "What are the id, language and original artist of the songs whose name is not 'Love'?","SELECT id , LANGUAGE , original_artist FROM songs WHERE name != 'Love'",sing_contest,"[{'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" What are the names and original artists of the song whose English translation is 'All the streets of love'?,"SELECT name , original_artist FROM songs WHERE english_translation = 'All the streets of love'",sing_contest,"[{'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What are the distinct stage presence scores for all the songs that are in language 'English' ?,SELECT DISTINCT T2.stage_presence FROM songs AS T1 JOIN performance_score AS T2 ON T1.id = T2.songs_id WHERE T1.language = 'English',sing_contest,"[{'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What are the ids and names of the participants who have performed at least two songs?,"SELECT T1.id , T1.Name FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id GROUP BY T1.id HAVING count(*) >= 2",sing_contest,"[{'table_name': 'participants', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'popularity'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -"What are the ids, names and popularity of the participants, order by the number of songs they perform?","SELECT T1.id , T1.Name , T1.popularity FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id GROUP BY T1.id ORDER BY count(*)",sing_contest,"[{'table_name': 'participants', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'popularity'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What are the id and name of the participants who received score 5 for their sound quality or rhythm tempo?,"SELECT T1.id , T1.name FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id WHERE T2.voice_sound_quality = 5 OR T2.rhythm_tempo = 5",sing_contest,"[{'table_name': 'participants', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'popularity'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What are the voice sound quality scores received for the song named ' The Balkan Girls ' in English language ?,SELECT T1.voice_sound_quality FROM performance_score AS T1 JOIN songs AS T2 ON T1.songs_id = T2.id WHERE T2.name = ' The Balkan Girls ' AND T2.language = 'English',sing_contest,"[{'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What are the id and name of the song sung by the most participants?,"SELECT T1.id , T1.name FROM songs AS T1 JOIN performance_score AS T2 ON T1.id = T2.songs_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1",sing_contest,"[{'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -How many performances have a stage presence score less than 7 or higher than 9?,SELECT count(*) FROM performance_score WHERE stage_presence < 7 OR stage_presence > 9,sing_contest,[] -How many songs listed are not performed?,SELECT count(*) FROM songs WHERE id NOT IN ( SELECT songs_id FROM performance_score );,sing_contest,"[{'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What are the average rhythm scores for the songs in each different language?,"SELECT avg(T2.rhythm_tempo) , T1.language FROM songs AS T1 JOIN performance_score AS T2 ON T2.songs_id = T1.id GROUP BY T1.language",sing_contest,"[{'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What are the distinct names of the participants who have sung a song in 'English'?,SELECT DISTINCT T1.name FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id JOIN songs AS T3 ON T3.id = T2.songs_id WHERE T3.language = 'English',sing_contest,"[{'table_name': 'participants', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'popularity'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What are the name and popularity of participants who have sung a song both in 'Croatian' language and in 'English' language?,"SELECT T1.name , T1.popularity FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id JOIN songs AS T3 ON T3.id = T2.songs_id WHERE T3.language = 'Croatian' INTERSECT SELECT T1.name , T1.popularity FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id JOIN songs AS T3 ON T3.id = T2.songs_id WHERE T3.language = 'English'",sing_contest,"[{'table_name': 'participants', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'popularity'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" +What are the distinct stage presence scores for all the songs that are in language 'English' ?,SELECT DISTINCT T2.stage_presence FROM songs AS T1 JOIN performance_score AS T2 ON T1.id = T2.songs_id WHERE T1.language = 'English',sing_contest,"[{'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'performance score', 'table_schema': [{'col_name': 'participant id'}, {'col_name': 'songs id'}, {'col_name': 'voice sound quality'}, {'col_name': 'rhythm tempo'}, {'col_name': 'stage presence'}], 'foreign_key_columns': ['songs id', 'participant id'], 'primary_keys': ['participant id']}]" +What are the ids and names of the participants who have performed at least two songs?,"SELECT T1.id , T1.Name FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id GROUP BY T1.id HAVING count(*) >= 2",sing_contest,"[{'table_name': 'participants', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'popularity'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'performance score', 'table_schema': [{'col_name': 'participant id'}, {'col_name': 'songs id'}, {'col_name': 'voice sound quality'}, {'col_name': 'rhythm tempo'}, {'col_name': 'stage presence'}], 'foreign_key_columns': ['songs id', 'participant id'], 'primary_keys': ['participant id']}]" +"What are the ids, names and popularity of the participants, order by the number of songs they perform?","SELECT T1.id , T1.Name , T1.popularity FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id GROUP BY T1.id ORDER BY count(*)",sing_contest,"[{'table_name': 'participants', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'popularity'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'performance score', 'table_schema': [{'col_name': 'participant id'}, {'col_name': 'songs id'}, {'col_name': 'voice sound quality'}, {'col_name': 'rhythm tempo'}, {'col_name': 'stage presence'}], 'foreign_key_columns': ['songs id', 'participant id'], 'primary_keys': ['participant id']}]" +What are the id and name of the participants who received score 5 for their sound quality or rhythm tempo?,"SELECT T1.id , T1.name FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id WHERE T2.voice_sound_quality = 5 OR T2.rhythm_tempo = 5",sing_contest,"[{'table_name': 'participants', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'popularity'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'performance score', 'table_schema': [{'col_name': 'participant id'}, {'col_name': 'songs id'}, {'col_name': 'voice sound quality'}, {'col_name': 'rhythm tempo'}, {'col_name': 'stage presence'}], 'foreign_key_columns': ['songs id', 'participant id'], 'primary_keys': ['participant id']}]" +What are the voice sound quality scores received for the song named ' The Balkan Girls ' in English language ?,SELECT T1.voice_sound_quality FROM performance_score AS T1 JOIN songs AS T2 ON T1.songs_id = T2.id WHERE T2.name = ' The Balkan Girls ' AND T2.language = 'English',sing_contest,"[{'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'performance score', 'table_schema': [{'col_name': 'participant id'}, {'col_name': 'songs id'}, {'col_name': 'voice sound quality'}, {'col_name': 'rhythm tempo'}, {'col_name': 'stage presence'}], 'foreign_key_columns': ['songs id', 'participant id'], 'primary_keys': ['participant id']}]" +What are the id and name of the song sung by the most participants?,"SELECT T1.id , T1.name FROM songs AS T1 JOIN performance_score AS T2 ON T1.id = T2.songs_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1",sing_contest,"[{'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'performance score', 'table_schema': [{'col_name': 'participant id'}, {'col_name': 'songs id'}, {'col_name': 'voice sound quality'}, {'col_name': 'rhythm tempo'}, {'col_name': 'stage presence'}], 'foreign_key_columns': ['songs id', 'participant id'], 'primary_keys': ['participant id']}]" +How many performances have a stage presence score less than 7 or higher than 9?,SELECT count(*) FROM performance_score WHERE stage_presence < 7 OR stage_presence > 9,sing_contest,"[{'table_name': 'performance score', 'table_schema': [{'col_name': 'participant id'}, {'col_name': 'songs id'}, {'col_name': 'voice sound quality'}, {'col_name': 'rhythm tempo'}, {'col_name': 'stage presence'}], 'foreign_key_columns': ['songs id', 'participant id'], 'primary_keys': ['participant id']}]" +How many songs listed are not performed?,SELECT count(*) FROM songs WHERE id NOT IN ( SELECT songs_id FROM performance_score );,sing_contest,"[{'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'performance score', 'table_schema': [{'col_name': 'participant id'}, {'col_name': 'songs id'}, {'col_name': 'voice sound quality'}, {'col_name': 'rhythm tempo'}, {'col_name': 'stage presence'}], 'foreign_key_columns': ['songs id', 'participant id'], 'primary_keys': ['participant id']}]" +What are the average rhythm scores for the songs in each different language?,"SELECT avg(T2.rhythm_tempo) , T1.language FROM songs AS T1 JOIN performance_score AS T2 ON T2.songs_id = T1.id GROUP BY T1.language",sing_contest,"[{'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'performance score', 'table_schema': [{'col_name': 'participant id'}, {'col_name': 'songs id'}, {'col_name': 'voice sound quality'}, {'col_name': 'rhythm tempo'}, {'col_name': 'stage presence'}], 'foreign_key_columns': ['songs id', 'participant id'], 'primary_keys': ['participant id']}]" +What are the distinct names of the participants who have sung a song in 'English'?,SELECT DISTINCT T1.name FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id JOIN songs AS T3 ON T3.id = T2.songs_id WHERE T3.language = 'English',sing_contest,"[{'table_name': 'participants', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'popularity'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'performance score', 'table_schema': [{'col_name': 'participant id'}, {'col_name': 'songs id'}, {'col_name': 'voice sound quality'}, {'col_name': 'rhythm tempo'}, {'col_name': 'stage presence'}], 'foreign_key_columns': ['songs id', 'participant id'], 'primary_keys': ['participant id']}]" +What are the name and popularity of participants who have sung a song both in 'Croatian' language and in 'English' language?,"SELECT T1.name , T1.popularity FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id JOIN songs AS T3 ON T3.id = T2.songs_id WHERE T3.language = 'Croatian' INTERSECT SELECT T1.name , T1.popularity FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id JOIN songs AS T3 ON T3.id = T2.songs_id WHERE T3.language = 'English'",sing_contest,"[{'table_name': 'participants', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'popularity'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'performance score', 'table_schema': [{'col_name': 'participant id'}, {'col_name': 'songs id'}, {'col_name': 'voice sound quality'}, {'col_name': 'rhythm tempo'}, {'col_name': 'stage presence'}], 'foreign_key_columns': ['songs id', 'participant id'], 'primary_keys': ['participant id']}]" "Which song names have the substring ""Is""?","SELECT name FROM songs WHERE name LIKE ""%Is%""",sing_contest,"[{'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -"Find the original artists who sing songs with rhythm tempo above 5 , and list results in descending order of voice sound quality .",select t2.original_artist from performance_score as t1 join songs as t2 on t2.id = t1.songs_id where t1.rhythm_tempo > 5 order by t1.voice_sound_quality desc,sing_contest,"[{'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" +"Find the original artists who sing songs with rhythm tempo above 5 , and list results in descending order of voice sound quality .",select t2.original_artist from performance_score as t1 join songs as t2 on t2.id = t1.songs_id where t1.rhythm_tempo > 5 order by t1.voice_sound_quality desc,sing_contest,"[{'table_name': 'songs', 'table_schema': [{'col_name': 'id'}, {'col_name': 'language'}, {'col_name': 'original artist'}, {'col_name': 'name'}, {'col_name': 'english translation'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'performance score', 'table_schema': [{'col_name': 'participant id'}, {'col_name': 'songs id'}, {'col_name': 'voice sound quality'}, {'col_name': 'rhythm tempo'}, {'col_name': 'stage presence'}], 'foreign_key_columns': ['songs id', 'participant id'], 'primary_keys': ['participant id']}]" How many cities do we have?,SELECT count(*) FROM City,address_1,"[{'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" Count the number of cities.,SELECT count(*) FROM City,address_1,"[{'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" List all different states .,select distinct state from city,address_1,"[{'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" @@ -810,34 +810,34 @@ Show ids for all female (sex is F) students living in state PA.,"SELECT StuID FR What are the student ids for female students in the state of PA?,"SELECT StuID FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code WHERE T1.state = ""PA"" AND T2.sex = 'F'",address_1,"[{'table_name': 'student', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'age'}, {'col_name': 'sex'}, {'col_name': 'major'}, {'col_name': 'advisor'}, {'col_name': 'city code'}], 'foreign_key_columns': ['city code'], 'primary_keys': ['student id']}, {'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" Show ids for all male students living outside of USA.,"SELECT StuID FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code WHERE T2.sex = 'M' AND T1.country != ""USA""",address_1,"[{'table_name': 'student', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'age'}, {'col_name': 'sex'}, {'col_name': 'major'}, {'col_name': 'advisor'}, {'col_name': 'city code'}], 'foreign_key_columns': ['city code'], 'primary_keys': ['student id']}, {'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" What are the ids for male students not in the USA?,"SELECT StuID FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code WHERE T2.sex = 'M' AND T1.country != ""USA""",address_1,"[{'table_name': 'student', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'age'}, {'col_name': 'sex'}, {'col_name': 'major'}, {'col_name': 'advisor'}, {'col_name': 'city code'}], 'foreign_key_columns': ['city code'], 'primary_keys': ['student id']}, {'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" -What is the distance between BAL and CHI?,"SELECT distance FROM Direct_distance WHERE city1_code = ""BAL"" AND city2_code = ""CHI""",address_1,[] -Give the distance between BAL and CHI?,"SELECT distance FROM Direct_distance WHERE city1_code = ""BAL"" AND city2_code = ""CHI""",address_1,[] -Show me the distance between Boston and Newark.,"SELECT distance FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code JOIN City AS T3 ON T1.city2_code = T3.city_code WHERE T2.city_name = ""Boston"" AND T3.city_name = ""Newark""",address_1,"[{'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" -What is the distance between Boston and Newark?,"SELECT distance FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code JOIN City AS T3 ON T1.city2_code = T3.city_code WHERE T2.city_name = ""Boston"" AND T3.city_name = ""Newark""",address_1,"[{'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" -"What is the average, minimum, maximum distance between two cities?","SELECT avg(distance) , min(distance) , max(distance) FROM Direct_distance",address_1,[] -"Give the average, minimum, and maximum distances between two cities.","SELECT avg(distance) , min(distance) , max(distance) FROM Direct_distance",address_1,[] -Show me the city code of two cities with maximum distance.,"SELECT city1_code , city2_code FROM Direct_distance ORDER BY distance DESC LIMIT 1",address_1,[] -What are the city codes of the cities with the maximum distance?,"SELECT city1_code , city2_code FROM Direct_distance ORDER BY distance DESC LIMIT 1",address_1,[] -Show me the city code of two cities with a distance greater than the average.,"SELECT city1_code , city2_code FROM Direct_distance WHERE distance > (SELECT avg(distance) FROM Direct_distance)",address_1,[] -What are the city codes of cities with distance greater than average?,"SELECT city1_code , city2_code FROM Direct_distance WHERE distance > (SELECT avg(distance) FROM Direct_distance)",address_1,[] -Show me the city code of two cities with a distance less than 1000.,"SELECT city1_code , city2_code FROM Direct_distance WHERE distance < 1000",address_1,[] -What are the city codes corresponding to cities with distances less than 1000?,"SELECT city1_code , city2_code FROM Direct_distance WHERE distance < 1000",address_1,[] -What is the total distance between city BAL and all other cities.,"SELECT sum(distance) FROM Direct_distance WHERE city1_code = ""BAL""",address_1,[] -What is the sum of distances between BAL and other cities?,"SELECT sum(distance) FROM Direct_distance WHERE city1_code = ""BAL""",address_1,[] -What is the average distance between Boston and all other cities.,"SELECT avg(distance) FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code WHERE T2.city_name = ""Boston""",address_1,"[{'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" -Give the average distance between Boston and other cities.,"SELECT avg(distance) FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code WHERE T2.city_name = ""Boston""",address_1,"[{'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" -What is the name of the city closest to Chicago?,"SELECT T3.city_name FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code JOIN City AS T3 ON T1.city2_code = T3.city_code WHERE T2.city_name = ""Chicago"" ORDER BY distance LIMIT 1",address_1,"[{'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" -Give the name of the nearest city to Chicago.,"SELECT T3.city_name FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code JOIN City AS T3 ON T1.city2_code = T3.city_code WHERE T2.city_name = ""Chicago"" ORDER BY distance LIMIT 1",address_1,"[{'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" -What is the name of the city furthest to Boston?,"SELECT T3.city_name FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code JOIN City AS T3 ON T1.city2_code = T3.city_code WHERE T2.city_name = ""Boston"" ORDER BY distance DESC LIMIT 1",address_1,"[{'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" -Give the city name of the city with greatest distance from Boston.,"SELECT T3.city_name FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code JOIN City AS T3 ON T1.city2_code = T3.city_code WHERE T2.city_name = ""Boston"" ORDER BY distance DESC LIMIT 1",address_1,"[{'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" -Show all city codes and the total distance to all other cities.,"SELECT city1_code , sum(distance) FROM Direct_distance GROUP BY city1_code",address_1,[] -"For each city, what is the the city code and sum of distances from each?","SELECT city1_code , sum(distance) FROM Direct_distance GROUP BY city1_code",address_1,[] -Show all city names and the average distance to all other cities.,"SELECT T2.city_name , avg(distance) FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code GROUP BY T1.city1_code",address_1,"[{'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" -What are the city name and average distances from each city?,"SELECT T2.city_name , avg(distance) FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code GROUP BY T1.city1_code",address_1,"[{'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" -How far do Linda (first name) Smith (last name) and Tracy (first name) Kim (last name) live?,"SELECT distance FROM Direct_distance AS T1 JOIN Student AS T2 ON T1.city1_code = T2.city_code JOIN Student AS T3 ON T1.city2_code = T3.city_code WHERE T2.Fname = ""Linda"" AND T2.Lname = ""Smith"" AND T3.Fname = ""Tracy"" AND T3.Lname = ""Kim""",address_1,"[{'table_name': 'student', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'age'}, {'col_name': 'sex'}, {'col_name': 'major'}, {'col_name': 'advisor'}, {'col_name': 'city code'}], 'foreign_key_columns': ['city code'], 'primary_keys': ['student id']}]" -What is the distance between the cities where Linda Smith and Tracy Kim live?,"SELECT distance FROM Direct_distance AS T1 JOIN Student AS T2 ON T1.city1_code = T2.city_code JOIN Student AS T3 ON T1.city2_code = T3.city_code WHERE T2.Fname = ""Linda"" AND T2.Lname = ""Smith"" AND T3.Fname = ""Tracy"" AND T3.Lname = ""Kim""",address_1,"[{'table_name': 'student', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'age'}, {'col_name': 'sex'}, {'col_name': 'major'}, {'col_name': 'advisor'}, {'col_name': 'city code'}], 'foreign_key_columns': ['city code'], 'primary_keys': ['student id']}]" -What is the first name and last name of the student living furthest to Linda Smith?,"SELECT T3.Fname , T3.Lname FROM Direct_distance AS T1 JOIN Student AS T2 ON T1.city1_code = T2.city_code JOIN Student AS T3 ON T1.city2_code = T3.city_code WHERE T2.Fname = ""Linda"" AND T2.Lname = ""Smith"" ORDER BY distance DESC LIMIT 1",address_1,"[{'table_name': 'student', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'age'}, {'col_name': 'sex'}, {'col_name': 'major'}, {'col_name': 'advisor'}, {'col_name': 'city code'}], 'foreign_key_columns': ['city code'], 'primary_keys': ['student id']}]" -What is the full name of the student who lives furthest from Linda Smith?,"SELECT T3.Fname , T3.Lname FROM Direct_distance AS T1 JOIN Student AS T2 ON T1.city1_code = T2.city_code JOIN Student AS T3 ON T1.city2_code = T3.city_code WHERE T2.Fname = ""Linda"" AND T2.Lname = ""Smith"" ORDER BY distance DESC LIMIT 1",address_1,"[{'table_name': 'student', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'age'}, {'col_name': 'sex'}, {'col_name': 'major'}, {'col_name': 'advisor'}, {'col_name': 'city code'}], 'foreign_key_columns': ['city code'], 'primary_keys': ['student id']}]" +What is the distance between BAL and CHI?,"SELECT distance FROM Direct_distance WHERE city1_code = ""BAL"" AND city2_code = ""CHI""",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}]" +Give the distance between BAL and CHI?,"SELECT distance FROM Direct_distance WHERE city1_code = ""BAL"" AND city2_code = ""CHI""",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}]" +Show me the distance between Boston and Newark.,"SELECT distance FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code JOIN City AS T3 ON T1.city2_code = T3.city_code WHERE T2.city_name = ""Boston"" AND T3.city_name = ""Newark""",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}, {'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" +What is the distance between Boston and Newark?,"SELECT distance FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code JOIN City AS T3 ON T1.city2_code = T3.city_code WHERE T2.city_name = ""Boston"" AND T3.city_name = ""Newark""",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}, {'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" +"What is the average, minimum, maximum distance between two cities?","SELECT avg(distance) , min(distance) , max(distance) FROM Direct_distance",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}]" +"Give the average, minimum, and maximum distances between two cities.","SELECT avg(distance) , min(distance) , max(distance) FROM Direct_distance",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}]" +Show me the city code of two cities with maximum distance.,"SELECT city1_code , city2_code FROM Direct_distance ORDER BY distance DESC LIMIT 1",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}]" +What are the city codes of the cities with the maximum distance?,"SELECT city1_code , city2_code FROM Direct_distance ORDER BY distance DESC LIMIT 1",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}]" +Show me the city code of two cities with a distance greater than the average.,"SELECT city1_code , city2_code FROM Direct_distance WHERE distance > (SELECT avg(distance) FROM Direct_distance)",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}]" +What are the city codes of cities with distance greater than average?,"SELECT city1_code , city2_code FROM Direct_distance WHERE distance > (SELECT avg(distance) FROM Direct_distance)",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}]" +Show me the city code of two cities with a distance less than 1000.,"SELECT city1_code , city2_code FROM Direct_distance WHERE distance < 1000",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}]" +What are the city codes corresponding to cities with distances less than 1000?,"SELECT city1_code , city2_code FROM Direct_distance WHERE distance < 1000",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}]" +What is the total distance between city BAL and all other cities.,"SELECT sum(distance) FROM Direct_distance WHERE city1_code = ""BAL""",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}]" +What is the sum of distances between BAL and other cities?,"SELECT sum(distance) FROM Direct_distance WHERE city1_code = ""BAL""",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}]" +What is the average distance between Boston and all other cities.,"SELECT avg(distance) FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code WHERE T2.city_name = ""Boston""",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}, {'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" +Give the average distance between Boston and other cities.,"SELECT avg(distance) FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code WHERE T2.city_name = ""Boston""",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}, {'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" +What is the name of the city closest to Chicago?,"SELECT T3.city_name FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code JOIN City AS T3 ON T1.city2_code = T3.city_code WHERE T2.city_name = ""Chicago"" ORDER BY distance LIMIT 1",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}, {'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" +Give the name of the nearest city to Chicago.,"SELECT T3.city_name FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code JOIN City AS T3 ON T1.city2_code = T3.city_code WHERE T2.city_name = ""Chicago"" ORDER BY distance LIMIT 1",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}, {'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" +What is the name of the city furthest to Boston?,"SELECT T3.city_name FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code JOIN City AS T3 ON T1.city2_code = T3.city_code WHERE T2.city_name = ""Boston"" ORDER BY distance DESC LIMIT 1",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}, {'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" +Give the city name of the city with greatest distance from Boston.,"SELECT T3.city_name FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code JOIN City AS T3 ON T1.city2_code = T3.city_code WHERE T2.city_name = ""Boston"" ORDER BY distance DESC LIMIT 1",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}, {'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" +Show all city codes and the total distance to all other cities.,"SELECT city1_code , sum(distance) FROM Direct_distance GROUP BY city1_code",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}]" +"For each city, what is the the city code and sum of distances from each?","SELECT city1_code , sum(distance) FROM Direct_distance GROUP BY city1_code",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}]" +Show all city names and the average distance to all other cities.,"SELECT T2.city_name , avg(distance) FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code GROUP BY T1.city1_code",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}, {'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" +What are the city name and average distances from each city?,"SELECT T2.city_name , avg(distance) FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code GROUP BY T1.city1_code",address_1,"[{'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}, {'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" +How far do Linda (first name) Smith (last name) and Tracy (first name) Kim (last name) live?,"SELECT distance FROM Direct_distance AS T1 JOIN Student AS T2 ON T1.city1_code = T2.city_code JOIN Student AS T3 ON T1.city2_code = T3.city_code WHERE T2.Fname = ""Linda"" AND T2.Lname = ""Smith"" AND T3.Fname = ""Tracy"" AND T3.Lname = ""Kim""",address_1,"[{'table_name': 'student', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'age'}, {'col_name': 'sex'}, {'col_name': 'major'}, {'col_name': 'advisor'}, {'col_name': 'city code'}], 'foreign_key_columns': ['city code'], 'primary_keys': ['student id']}, {'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}]" +What is the distance between the cities where Linda Smith and Tracy Kim live?,"SELECT distance FROM Direct_distance AS T1 JOIN Student AS T2 ON T1.city1_code = T2.city_code JOIN Student AS T3 ON T1.city2_code = T3.city_code WHERE T2.Fname = ""Linda"" AND T2.Lname = ""Smith"" AND T3.Fname = ""Tracy"" AND T3.Lname = ""Kim""",address_1,"[{'table_name': 'student', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'age'}, {'col_name': 'sex'}, {'col_name': 'major'}, {'col_name': 'advisor'}, {'col_name': 'city code'}], 'foreign_key_columns': ['city code'], 'primary_keys': ['student id']}, {'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}]" +What is the first name and last name of the student living furthest to Linda Smith?,"SELECT T3.Fname , T3.Lname FROM Direct_distance AS T1 JOIN Student AS T2 ON T1.city1_code = T2.city_code JOIN Student AS T3 ON T1.city2_code = T3.city_code WHERE T2.Fname = ""Linda"" AND T2.Lname = ""Smith"" ORDER BY distance DESC LIMIT 1",address_1,"[{'table_name': 'student', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'age'}, {'col_name': 'sex'}, {'col_name': 'major'}, {'col_name': 'advisor'}, {'col_name': 'city code'}], 'foreign_key_columns': ['city code'], 'primary_keys': ['student id']}, {'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}]" +What is the full name of the student who lives furthest from Linda Smith?,"SELECT T3.Fname , T3.Lname FROM Direct_distance AS T1 JOIN Student AS T2 ON T1.city1_code = T2.city_code JOIN Student AS T3 ON T1.city2_code = T3.city_code WHERE T2.Fname = ""Linda"" AND T2.Lname = ""Smith"" ORDER BY distance DESC LIMIT 1",address_1,"[{'table_name': 'student', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'age'}, {'col_name': 'sex'}, {'col_name': 'major'}, {'col_name': 'advisor'}, {'col_name': 'city code'}], 'foreign_key_columns': ['city code'], 'primary_keys': ['student id']}, {'table_name': 'direct distance', 'table_schema': [{'col_name': 'city1 code'}, {'col_name': 'city2 code'}, {'col_name': 'distance'}], 'foreign_key_columns': ['city2 code', 'city1 code'], 'primary_keys': []}]" Which state does the student whose first name is Linda live in?,"SELECT state FROM Student AS T1 JOIN City AS T2 ON T1.city_code = T2.city_code WHERE T1.Fname = ""Linda""",address_1,"[{'table_name': 'student', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'age'}, {'col_name': 'sex'}, {'col_name': 'major'}, {'col_name': 'advisor'}, {'col_name': 'city code'}], 'foreign_key_columns': ['city code'], 'primary_keys': ['student id']}, {'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" Give the state that the student with first name Linda lives in.,"SELECT state FROM Student AS T1 JOIN City AS T2 ON T1.city_code = T2.city_code WHERE T1.Fname = ""Linda""",address_1,"[{'table_name': 'student', 'table_schema': [{'col_name': 'student id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'age'}, {'col_name': 'sex'}, {'col_name': 'major'}, {'col_name': 'advisor'}, {'col_name': 'city code'}], 'foreign_key_columns': ['city code'], 'primary_keys': ['student id']}, {'table_name': 'city', 'table_schema': [{'col_name': 'city code'}, {'col_name': 'city name'}, {'col_name': 'state'}, {'col_name': 'country'}, {'col_name': 'latitude'}, {'col_name': 'longitude'}], 'foreign_key_columns': [], 'primary_keys': ['city code']}]" Return all details of sailors who are older than 30.,SELECT * FROM Sailors WHERE age > 30,boat_1,"[{'table_name': 'sailors', 'table_schema': [{'col_name': 'sailor id'}, {'col_name': 'name'}, {'col_name': 'rating'}, {'col_name': 'age'}], 'foreign_key_columns': [], 'primary_keys': ['sailor id']}]" @@ -970,32 +970,32 @@ How many affiliations do we have?,SELECT count(*) FROM Affiliation,aan_1,"[{'tab Count the number of affiliations.,SELECT count(*) FROM Affiliation,aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}]" How many papers do we have in NAACL 2000?,"SELECT count(*) FROM Paper WHERE venue = ""NAACL"" AND YEAR = 2000",aan_1,"[{'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" Count the number of papers in NAACL 2000.,"SELECT count(*) FROM Paper WHERE venue = ""NAACL"" AND YEAR = 2000",aan_1,"[{'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -How many papers are published in year 2009 by Columbia University?,"SELECT count(DISTINCT T1.paper_id) FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T3.name LIKE ""Columbia University"" AND T1.year = 2009",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -Count the number of papers published by Columbia University in 2009.,"SELECT count(DISTINCT T1.paper_id) FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T3.name LIKE ""Columbia University"" AND T1.year = 2009",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +How many papers are published in year 2009 by Columbia University?,"SELECT count(DISTINCT T1.paper_id) FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T3.name LIKE ""Columbia University"" AND T1.year = 2009",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +Count the number of papers published by Columbia University in 2009.,"SELECT count(DISTINCT T1.paper_id) FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T3.name LIKE ""Columbia University"" AND T1.year = 2009",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" List names and addresses for all affiliations.,"SELECT DISTINCT name , address FROM Affiliation",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}]" What are the names and addresses for all affiliations?,"SELECT DISTINCT name , address FROM Affiliation",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}]" List all venues and years for papers ordered by year.,"SELECT DISTINCT venue , YEAR FROM paper ORDER BY YEAR",aan_1,"[{'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" "What are the distinct venues for papers, ordered by year?","SELECT DISTINCT venue , YEAR FROM paper ORDER BY YEAR",aan_1,"[{'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -Find the titles and paper IDs for papers written by Harvard University.,"SELECT DISTINCT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T3.name = ""Harvard University""",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -What are the titles and paper ids for papers written in affiliation with Harvard University?,"SELECT DISTINCT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T3.name = ""Harvard University""",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -Find all papers with titles and paper IDs written by Mckeown.,"SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T3.author_id = T2.author_id WHERE T3.name LIKE ""%Mckeown%""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -What are the titles and paper ids for papers written by Mckeown?,"SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T3.author_id = T2.author_id WHERE T3.name LIKE ""%Mckeown%""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -Find all papers with titles and paper IDs collaborated by Stanford University and Columbia University.,"SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T3.name LIKE ""Stanford University"" INTERSECT SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T3.name LIKE ""Columbia University""",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -What are the titles and paper ids for papers which were affiliated with both Stanford and Columbia University?,"SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T3.name LIKE ""Stanford University"" INTERSECT SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T3.name LIKE ""Columbia University""",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -"Find all papers with titles and paper IDs co-authored by Mckeown, Kathleen and Rambow, Owen.","SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id WHERE T3.name LIKE ""%Mckeown , Kathleen%"" INTERSECT SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id WHERE T3.name LIKE ""%Rambow , Owen%""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -"What are the titles and paper ids co-authored by Mckeown, Kathleen and Rambow, Owen?","SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id WHERE T3.name LIKE ""%Mckeown , Kathleen%"" INTERSECT SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id WHERE T3.name LIKE ""%Rambow , Owen%""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -Find the titles and paper IDs for papers which have Mckeown but not Rambow in author list.,"SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id WHERE T3.name LIKE ""%Mckeown%"" EXCEPT SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id WHERE T3.name LIKE ""%Rambow%""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -"What are the titles and paper ids which have Mckeown as an author, but not Rambow?","SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id WHERE T3.name LIKE ""%Mckeown%"" EXCEPT SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id WHERE T3.name LIKE ""%Rambow%""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -"Find the titles and paper IDs for papers which have Mckeown, Kathleen or Rambow, Owen in author list.","SELECT DISTINCT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id WHERE T3.name LIKE ""%Mckeown , Kathleen%"" OR T3.name LIKE ""%Rambow , Owen%""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -"What are the titles and paper ids for papers that have Mckeown, Kathleen or Rambow, Owen in their author list?","SELECT DISTINCT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id WHERE T3.name LIKE ""%Mckeown , Kathleen%"" OR T3.name LIKE ""%Rambow , Owen%""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -List the names of all authors and their number of papers in descending order by number of papers.,"SELECT T1.name , count(*) FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id = T2.author_id GROUP BY T1.author_id ORDER BY count(*) DESC",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}]" -"How many papers did each author publish, ordered by number of papers?","SELECT T1.name , count(*) FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id = T2.author_id GROUP BY T1.author_id ORDER BY count(*) DESC",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}]" -List all affiliations with ascending ordered number of papers.,SELECT T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id = T2.affiliation_id GROUP BY T1.affiliation_id ORDER BY count(*) DESC,aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}]" -"What are the names of all affiliations, ordered by number of papers?",SELECT T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id = T2.affiliation_id GROUP BY T1.affiliation_id ORDER BY count(*) DESC,aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}]" -List names of all authors who have more than 50 papers.,SELECT T1.name FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id = T2.author_id GROUP BY T1.author_id HAVING count(*) > 50,aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}]" -What are the names of all authors who have more than 50 papers?,SELECT T1.name FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id = T2.author_id GROUP BY T1.author_id HAVING count(*) > 50,aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}]" -List names of all authors who have only 1 paper.,SELECT T1.name FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id = T2.author_id GROUP BY T1.author_id HAVING count(*) = 1,aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}]" -What are the names of authors who have exactly 1 paper?,SELECT T1.name FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id = T2.author_id GROUP BY T1.author_id HAVING count(*) = 1,aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}]" +Find the titles and paper IDs for papers written by Harvard University.,"SELECT DISTINCT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T3.name = ""Harvard University""",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +What are the titles and paper ids for papers written in affiliation with Harvard University?,"SELECT DISTINCT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T3.name = ""Harvard University""",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +Find all papers with titles and paper IDs written by Mckeown.,"SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T3.author_id = T2.author_id WHERE T3.name LIKE ""%Mckeown%""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +What are the titles and paper ids for papers written by Mckeown?,"SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T3.author_id = T2.author_id WHERE T3.name LIKE ""%Mckeown%""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +Find all papers with titles and paper IDs collaborated by Stanford University and Columbia University.,"SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T3.name LIKE ""Stanford University"" INTERSECT SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T3.name LIKE ""Columbia University""",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +What are the titles and paper ids for papers which were affiliated with both Stanford and Columbia University?,"SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T3.name LIKE ""Stanford University"" INTERSECT SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T3.name LIKE ""Columbia University""",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +"Find all papers with titles and paper IDs co-authored by Mckeown, Kathleen and Rambow, Owen.","SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id WHERE T3.name LIKE ""%Mckeown , Kathleen%"" INTERSECT SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id WHERE T3.name LIKE ""%Rambow , Owen%""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +"What are the titles and paper ids co-authored by Mckeown, Kathleen and Rambow, Owen?","SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id WHERE T3.name LIKE ""%Mckeown , Kathleen%"" INTERSECT SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id WHERE T3.name LIKE ""%Rambow , Owen%""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +Find the titles and paper IDs for papers which have Mckeown but not Rambow in author list.,"SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id WHERE T3.name LIKE ""%Mckeown%"" EXCEPT SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id WHERE T3.name LIKE ""%Rambow%""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +"What are the titles and paper ids which have Mckeown as an author, but not Rambow?","SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id WHERE T3.name LIKE ""%Mckeown%"" EXCEPT SELECT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id WHERE T3.name LIKE ""%Rambow%""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +"Find the titles and paper IDs for papers which have Mckeown, Kathleen or Rambow, Owen in author list.","SELECT DISTINCT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id WHERE T3.name LIKE ""%Mckeown , Kathleen%"" OR T3.name LIKE ""%Rambow , Owen%""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +"What are the titles and paper ids for papers that have Mckeown, Kathleen or Rambow, Owen in their author list?","SELECT DISTINCT T1.title , T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id WHERE T3.name LIKE ""%Mckeown , Kathleen%"" OR T3.name LIKE ""%Rambow , Owen%""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +List the names of all authors and their number of papers in descending order by number of papers.,"SELECT T1.name , count(*) FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id = T2.author_id GROUP BY T1.author_id ORDER BY count(*) DESC",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}]" +"How many papers did each author publish, ordered by number of papers?","SELECT T1.name , count(*) FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id = T2.author_id GROUP BY T1.author_id ORDER BY count(*) DESC",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}]" +List all affiliations with ascending ordered number of papers.,SELECT T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id = T2.affiliation_id GROUP BY T1.affiliation_id ORDER BY count(*) DESC,aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}]" +"What are the names of all affiliations, ordered by number of papers?",SELECT T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id = T2.affiliation_id GROUP BY T1.affiliation_id ORDER BY count(*) DESC,aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}]" +List names of all authors who have more than 50 papers.,SELECT T1.name FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id = T2.author_id GROUP BY T1.author_id HAVING count(*) > 50,aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}]" +What are the names of all authors who have more than 50 papers?,SELECT T1.name FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id = T2.author_id GROUP BY T1.author_id HAVING count(*) > 50,aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}]" +List names of all authors who have only 1 paper.,SELECT T1.name FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id = T2.author_id GROUP BY T1.author_id HAVING count(*) = 1,aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}]" +What are the names of authors who have exactly 1 paper?,SELECT T1.name FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id = T2.author_id GROUP BY T1.author_id HAVING count(*) = 1,aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}]" What is the venue and year with the most number of publications?,"SELECT venue , YEAR FROM paper GROUP BY venue , YEAR ORDER BY count(*) DESC LIMIT 1",aan_1,"[{'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" What was the venue and year with the most publications?,"SELECT venue , YEAR FROM paper GROUP BY venue , YEAR ORDER BY count(*) DESC LIMIT 1",aan_1,"[{'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" What is the venue with the least number of publications?,SELECT venue FROM paper GROUP BY venue ORDER BY count(*) LIMIT 1,aan_1,"[{'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" @@ -1010,48 +1010,48 @@ Give the title of the paper which cites most number of papers?,SELECT T2.title F What is the title of the paper which cites the most other papers?,SELECT T2.title FROM Citation AS T1 JOIN Paper AS T2 ON T2.paper_id = T1.paper_id GROUP BY T1.paper_id ORDER BY count(*) DESC LIMIT 1,aan_1,"[{'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" List top 10 most cited papers and their numbers of citations.,"SELECT paper_id , count(*) FROM Citation GROUP BY cited_paper_id ORDER BY count(*) DESC LIMIT 10",aan_1,"[{'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}]" "What are the 10 most cited papers, and how many citations did each have?","SELECT paper_id , count(*) FROM Citation GROUP BY cited_paper_id ORDER BY count(*) DESC LIMIT 10",aan_1,"[{'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}]" -"How many citations does Mckeown , Kathleen have ?","select count(*) from citation as t1 join author_list as t2 on t1.cited_paper_id = t2.paper_id join author as t3 on t2.author_id = t3.author_id where t3.name = ""mckeown , kathleen""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}]" -"Count the number of citations Mckeown , Kathleen has .","select count(*) from citation as t1 join author_list as t2 on t1.cited_paper_id = t2.paper_id join author as t3 on t2.author_id = t3.author_id where t3.name = ""mckeown , kathleen""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}]" -"How many papers does Mckeown , Kathleen cite ?","select count(*) from citation as t1 join author_list as t2 on t1.paper_id = t2.paper_id join author as t3 on t2.author_id = t3.author_id where t3.name = ""mckeown , kathleen""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}]" -"Count the number of papers Mckeown , Kathleen has cited .","select count(*) from citation as t1 join author_list as t2 on t1.paper_id = t2.paper_id join author as t3 on t2.author_id = t3.author_id where t3.name = ""mckeown , kathleen""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}]" -Find the name and number of citations of the author who has most citations among all authors?,"SELECT T3.name , count(*) FROM Citation AS T1 JOIN Author_list AS T2 ON T1.cited_paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id GROUP BY T2.author_id ORDER BY count(*) DESC LIMIT 1",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}]" -What is the name and number of citations of the author with the greatest number of citations among authors?,"SELECT T3.name , count(*) FROM Citation AS T1 JOIN Author_list AS T2 ON T1.cited_paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id GROUP BY T2.author_id ORDER BY count(*) DESC LIMIT 1",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}]" -"What are the venues and years where Mckeown , Kathleen had papers ?","select distinct t1.venue , t1.year from paper as t1 join author_list as t2 on t1.paper_id = t2.paper_id join author as t3 on t2.author_id = t3.author_id where t3.name = ""mckeown , kathleen""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -"Which venues and years did Mckeown , Kathleen have papers ?","select distinct t1.venue , t1.year from paper as t1 join author_list as t2 on t1.paper_id = t2.paper_id join author as t3 on t2.author_id = t3.author_id where t3.name = ""mckeown , kathleen""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -What are the venues and years where Columbia University had papers ?,"select distinct t1.venue , t1.year from paper as t1 join author_list as t2 on t1.paper_id = t2.paper_id join affiliation as t3 on t2.affiliation_id = t3.affiliation_id where t3.name = ""columbia university""",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -Which venues and years did Columbia University have papers ?,"select distinct t1.venue , t1.year from paper as t1 join author_list as t2 on t1.paper_id = t2.paper_id join affiliation as t3 on t2.affiliation_id = t3.affiliation_id where t3.name = ""columbia university""",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -Which author had the most papers in the year 2009?,SELECT T3.name FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T3.author_id = T2.author_id WHERE T1.year = 2009 GROUP BY T2.author_id ORDER BY count(*) DESC LIMIT 1,aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -What is the name of the author with the most papers in 2009?,SELECT T3.name FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T3.author_id = T2.author_id WHERE T1.year = 2009 GROUP BY T2.author_id ORDER BY count(*) DESC LIMIT 1,aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -What are the names of the top 3 affiliations that have the most papers in year 2009?,SELECT T3.name FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T1.year = 2009 GROUP BY T2.affiliation_id ORDER BY count(*) DESC LIMIT 3,aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -Which 3 affiliations had the most papers in 2009?,SELECT T3.name FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T1.year = 2009 GROUP BY T2.affiliation_id ORDER BY count(*) DESC LIMIT 3,aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -How many papers does Columbia University have in or before 2009 ?,"select count(distinct t1.paper_id) from paper as t1 join author_list as t2 on t1.paper_id = t2.paper_id join affiliation as t3 on t2.affiliation_id = t3.affiliation_id where t1.year <= 2009 and t3.name = ""columbia university""",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -Count the number of papers Columbia University had during or prior to 2009 .,"select count(distinct t1.paper_id) from paper as t1 join author_list as t2 on t1.paper_id = t2.paper_id join affiliation as t3 on t2.affiliation_id = t3.affiliation_id where t1.year <= 2009 and t3.name = ""columbia university""",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -How many papers does Stanford University have between 2000 and 2009?,"SELECT count(DISTINCT T1.paper_id) FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T1.year >= 2000 AND T1.year <= 2009 AND T3.name LIKE ""Stanford University""",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -Count the number of papers Stanford University had between 2000 and 2009.,"SELECT count(DISTINCT T1.paper_id) FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T1.year >= 2000 AND T1.year <= 2009 AND T3.name LIKE ""Stanford University""",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -What is the title of the paper that has most number of authors?,SELECT T2.title FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id = T2.paper_id GROUP BY T2.paper_id ORDER BY count(*) DESC LIMIT 1,aan_1,"[{'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -Give the title of the paper with the most authors.,SELECT T2.title FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id = T2.paper_id GROUP BY T2.paper_id ORDER BY count(*) DESC LIMIT 1,aan_1,"[{'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -"How many collaborators has Mckeown , Kathleen had ?","select count (distinct t2.author_id) from author_list as t1 join author_list as t2 on t1.paper_id = t2.paper_id and t1.author_id != t2.author_id join author as t3 on t1.author_id = t3.author_id where t3.name = ""mckeown , kathleen""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}]" -"Count the number of collaborators that Mckeown , Kathleen has had .","select count (distinct t2.author_id) from author_list as t1 join author_list as t2 on t1.paper_id = t2.paper_id and t1.author_id != t2.author_id join author as t3 on t1.author_id = t3.author_id where t3.name = ""mckeown , kathleen""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}]" -"Who has the most papers co-authored with Mckeown , Kathleen ?","select t4.name from author_list as t1 join author_list as t2 on t1.paper_id = t2.paper_id and t1.author_id != t2.author_id join author as t3 on t1.author_id = t3.author_id join author as t4 on t2.author_id = t4.author_id where t3.name = ""mckeown , kathleen"" group by t2.author_id order by count(*) desc limit 1",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}]" -"What is the name of the author who has co-authored the most papers with Mckeown , Kathleen ?","select t4.name from author_list as t1 join author_list as t2 on t1.paper_id = t2.paper_id and t1.author_id != t2.author_id join author as t3 on t1.author_id = t3.author_id join author as t4 on t2.author_id = t4.author_id where t3.name = ""mckeown , kathleen"" group by t2.author_id order by count(*) desc limit 1",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}]" +"How many citations does Mckeown , Kathleen have ?","select count(*) from citation as t1 join author_list as t2 on t1.cited_paper_id = t2.paper_id join author as t3 on t2.author_id = t3.author_id where t3.name = ""mckeown , kathleen""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}]" +"Count the number of citations Mckeown , Kathleen has .","select count(*) from citation as t1 join author_list as t2 on t1.cited_paper_id = t2.paper_id join author as t3 on t2.author_id = t3.author_id where t3.name = ""mckeown , kathleen""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}]" +"How many papers does Mckeown , Kathleen cite ?","select count(*) from citation as t1 join author_list as t2 on t1.paper_id = t2.paper_id join author as t3 on t2.author_id = t3.author_id where t3.name = ""mckeown , kathleen""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}]" +"Count the number of papers Mckeown , Kathleen has cited .","select count(*) from citation as t1 join author_list as t2 on t1.paper_id = t2.paper_id join author as t3 on t2.author_id = t3.author_id where t3.name = ""mckeown , kathleen""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}]" +Find the name and number of citations of the author who has most citations among all authors?,"SELECT T3.name , count(*) FROM Citation AS T1 JOIN Author_list AS T2 ON T1.cited_paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id GROUP BY T2.author_id ORDER BY count(*) DESC LIMIT 1",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}]" +What is the name and number of citations of the author with the greatest number of citations among authors?,"SELECT T3.name , count(*) FROM Citation AS T1 JOIN Author_list AS T2 ON T1.cited_paper_id = T2.paper_id JOIN Author AS T3 ON T2.author_id = T3.author_id GROUP BY T2.author_id ORDER BY count(*) DESC LIMIT 1",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}]" +"What are the venues and years where Mckeown , Kathleen had papers ?","select distinct t1.venue , t1.year from paper as t1 join author_list as t2 on t1.paper_id = t2.paper_id join author as t3 on t2.author_id = t3.author_id where t3.name = ""mckeown , kathleen""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +"Which venues and years did Mckeown , Kathleen have papers ?","select distinct t1.venue , t1.year from paper as t1 join author_list as t2 on t1.paper_id = t2.paper_id join author as t3 on t2.author_id = t3.author_id where t3.name = ""mckeown , kathleen""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +What are the venues and years where Columbia University had papers ?,"select distinct t1.venue , t1.year from paper as t1 join author_list as t2 on t1.paper_id = t2.paper_id join affiliation as t3 on t2.affiliation_id = t3.affiliation_id where t3.name = ""columbia university""",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +Which venues and years did Columbia University have papers ?,"select distinct t1.venue , t1.year from paper as t1 join author_list as t2 on t1.paper_id = t2.paper_id join affiliation as t3 on t2.affiliation_id = t3.affiliation_id where t3.name = ""columbia university""",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +Which author had the most papers in the year 2009?,SELECT T3.name FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T3.author_id = T2.author_id WHERE T1.year = 2009 GROUP BY T2.author_id ORDER BY count(*) DESC LIMIT 1,aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +What is the name of the author with the most papers in 2009?,SELECT T3.name FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Author AS T3 ON T3.author_id = T2.author_id WHERE T1.year = 2009 GROUP BY T2.author_id ORDER BY count(*) DESC LIMIT 1,aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +What are the names of the top 3 affiliations that have the most papers in year 2009?,SELECT T3.name FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T1.year = 2009 GROUP BY T2.affiliation_id ORDER BY count(*) DESC LIMIT 3,aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +Which 3 affiliations had the most papers in 2009?,SELECT T3.name FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T1.year = 2009 GROUP BY T2.affiliation_id ORDER BY count(*) DESC LIMIT 3,aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +How many papers does Columbia University have in or before 2009 ?,"select count(distinct t1.paper_id) from paper as t1 join author_list as t2 on t1.paper_id = t2.paper_id join affiliation as t3 on t2.affiliation_id = t3.affiliation_id where t1.year <= 2009 and t3.name = ""columbia university""",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +Count the number of papers Columbia University had during or prior to 2009 .,"select count(distinct t1.paper_id) from paper as t1 join author_list as t2 on t1.paper_id = t2.paper_id join affiliation as t3 on t2.affiliation_id = t3.affiliation_id where t1.year <= 2009 and t3.name = ""columbia university""",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +How many papers does Stanford University have between 2000 and 2009?,"SELECT count(DISTINCT T1.paper_id) FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T1.year >= 2000 AND T1.year <= 2009 AND T3.name LIKE ""Stanford University""",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +Count the number of papers Stanford University had between 2000 and 2009.,"SELECT count(DISTINCT T1.paper_id) FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id = T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id = T3.affiliation_id WHERE T1.year >= 2000 AND T1.year <= 2009 AND T3.name LIKE ""Stanford University""",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +What is the title of the paper that has most number of authors?,SELECT T2.title FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id = T2.paper_id GROUP BY T2.paper_id ORDER BY count(*) DESC LIMIT 1,aan_1,"[{'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +Give the title of the paper with the most authors.,SELECT T2.title FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id = T2.paper_id GROUP BY T2.paper_id ORDER BY count(*) DESC LIMIT 1,aan_1,"[{'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +"How many collaborators has Mckeown , Kathleen had ?","select count (distinct t2.author_id) from author_list as t1 join author_list as t2 on t1.paper_id = t2.paper_id and t1.author_id != t2.author_id join author as t3 on t1.author_id = t3.author_id where t3.name = ""mckeown , kathleen""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}]" +"Count the number of collaborators that Mckeown , Kathleen has had .","select count (distinct t2.author_id) from author_list as t1 join author_list as t2 on t1.paper_id = t2.paper_id and t1.author_id != t2.author_id join author as t3 on t1.author_id = t3.author_id where t3.name = ""mckeown , kathleen""",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}]" +"Who has the most papers co-authored with Mckeown , Kathleen ?","select t4.name from author_list as t1 join author_list as t2 on t1.paper_id = t2.paper_id and t1.author_id != t2.author_id join author as t3 on t1.author_id = t3.author_id join author as t4 on t2.author_id = t4.author_id where t3.name = ""mckeown , kathleen"" group by t2.author_id order by count(*) desc limit 1",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}]" +"What is the name of the author who has co-authored the most papers with Mckeown , Kathleen ?","select t4.name from author_list as t1 join author_list as t2 on t1.paper_id = t2.paper_id and t1.author_id != t2.author_id join author as t3 on t1.author_id = t3.author_id join author as t4 on t2.author_id = t4.author_id where t3.name = ""mckeown , kathleen"" group by t2.author_id order by count(*) desc limit 1",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}]" Find the id of the papers whose title has the key word 'translation'.,"SELECT paper_id FROM Paper WHERE title LIKE ""%translation%""",aan_1,"[{'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" What are the ids for papers with titles containing 'translation'?,"SELECT paper_id FROM Paper WHERE title LIKE ""%translation%""",aan_1,"[{'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" Find the id and title of the papers that are never cited by others.,"SELECT paper_id , title FROM Paper WHERE paper_id NOT IN (SELECT cited_paper_id FROM Citation)",aan_1,"[{'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" What are the ids and titles for papers that have never been cited?,"SELECT paper_id , title FROM Paper WHERE paper_id NOT IN (SELECT cited_paper_id FROM Citation)",aan_1,"[{'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -Find the name of the affiliation whose address contains 'China' and publishes the greatest number of papers.,"SELECT T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id = T2.affiliation_id WHERE T1.address LIKE ""%China%"" GROUP BY T1.affiliation_id ORDER BY count(*) DESC LIMIT 1",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}]" -What is the name of the affiliation which publishes the greatest number of papers among those whose address contains 'China'.,"SELECT T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id = T2.affiliation_id WHERE T1.address LIKE ""%China%"" GROUP BY T1.affiliation_id ORDER BY count(*) DESC LIMIT 1",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}]" +Find the name of the affiliation whose address contains 'China' and publishes the greatest number of papers.,"SELECT T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id = T2.affiliation_id WHERE T1.address LIKE ""%China%"" GROUP BY T1.affiliation_id ORDER BY count(*) DESC LIMIT 1",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}]" +What is the name of the affiliation which publishes the greatest number of papers among those whose address contains 'China'.,"SELECT T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id = T2.affiliation_id WHERE T1.address LIKE ""%China%"" GROUP BY T1.affiliation_id ORDER BY count(*) DESC LIMIT 1",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}]" Find the number of papers published in different conferences each year.,"SELECT count(*) , venue , YEAR FROM Paper GROUP BY venue , YEAR",aan_1,"[{'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" How many papers are published in each venue in each year?,"SELECT count(*) , venue , YEAR FROM Paper GROUP BY venue , YEAR",aan_1,"[{'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -Find the total number of papers for each affiliation.,"SELECT count(DISTINCT T2.paper_id) , T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id = T2.affiliation_id GROUP BY T1.affiliation_id",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}]" -How many papers has each affiliation published?,"SELECT count(DISTINCT T2.paper_id) , T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id = T2.affiliation_id GROUP BY T1.affiliation_id",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}]" +Find the total number of papers for each affiliation.,"SELECT count(DISTINCT T2.paper_id) , T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id = T2.affiliation_id GROUP BY T1.affiliation_id",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}]" +How many papers has each affiliation published?,"SELECT count(DISTINCT T2.paper_id) , T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id = T2.affiliation_id GROUP BY T1.affiliation_id",aan_1,"[{'table_name': 'affiliation', 'table_schema': [{'col_name': 'affiliation id'}, {'col_name': 'name'}, {'col_name': 'address'}], 'foreign_key_columns': [], 'primary_keys': ['affiliation id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}]" Find the titles of papers that have more than 50 citations.,SELECT T2.title FROM Citation AS T1 JOIN Paper AS T2 ON T1.cited_paper_id = T2.paper_id GROUP BY T1.cited_paper_id HAVING count(*) > 50,aan_1,"[{'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" What are the titles for papers with more than 50 citations?,SELECT T2.title FROM Citation AS T1 JOIN Paper AS T2 ON T1.cited_paper_id = T2.paper_id GROUP BY T1.cited_paper_id HAVING count(*) > 50,aan_1,"[{'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -Find the number of authors who did not publish any paper that is cited more than 50 times.,SELECT count(*) FROM Author WHERE Author_id NOT IN ( SELECT T2.author_id FROM Citation AS T1 JOIN Author_list AS T2 ON T1.cited_paper_id = T2.paper_id GROUP BY T1.cited_paper_id HAVING count(DISTINCT T1.paper_id) > 50),aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}]" -How many authors have not published a paper with more than 50 citations?,SELECT count(*) FROM Author WHERE Author_id NOT IN ( SELECT T2.author_id FROM Citation AS T1 JOIN Author_list AS T2 ON T1.cited_paper_id = T2.paper_id GROUP BY T1.cited_paper_id HAVING count(DISTINCT T1.paper_id) > 50),aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}]" -Find the names of authors who published some paper on NAACL and ACL in the year 2009.,"SELECT name FROM Author WHERE author_id IN (SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id = T2.paper_id WHERE T2.venue = ""ACL"" AND T2.year = 2009 INTERSECT SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id = T2.paper_id WHERE T2.venue = ""NAACL"" AND T2.year = 2009)",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -What are the names of authors who published in both NAACL and ACL in 2009?,"SELECT name FROM Author WHERE author_id IN (SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id = T2.paper_id WHERE T2.venue = ""ACL"" AND T2.year = 2009 INTERSECT SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id = T2.paper_id WHERE T2.venue = ""NAACL"" AND T2.year = 2009)",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -Find the name of authors who have never published a paper in ACL.,"SELECT name FROM Author WHERE author_id NOT IN (SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id = T2.paper_id WHERE T2.venue = ""ACL"")",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" -What are the names of authors who have not published a paper in ACL?,"SELECT name FROM Author WHERE author_id NOT IN (SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id = T2.paper_id WHERE T2.venue = ""ACL"")",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +Find the number of authors who did not publish any paper that is cited more than 50 times.,SELECT count(*) FROM Author WHERE Author_id NOT IN ( SELECT T2.author_id FROM Citation AS T1 JOIN Author_list AS T2 ON T1.cited_paper_id = T2.paper_id GROUP BY T1.cited_paper_id HAVING count(DISTINCT T1.paper_id) > 50),aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}]" +How many authors have not published a paper with more than 50 citations?,SELECT count(*) FROM Author WHERE Author_id NOT IN ( SELECT T2.author_id FROM Citation AS T1 JOIN Author_list AS T2 ON T1.cited_paper_id = T2.paper_id GROUP BY T1.cited_paper_id HAVING count(DISTINCT T1.paper_id) > 50),aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'citation', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'cited paper id'}], 'foreign_key_columns': ['cited paper id', 'paper id'], 'primary_keys': ['paper id']}]" +Find the names of authors who published some paper on NAACL and ACL in the year 2009.,"SELECT name FROM Author WHERE author_id IN (SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id = T2.paper_id WHERE T2.venue = ""ACL"" AND T2.year = 2009 INTERSECT SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id = T2.paper_id WHERE T2.venue = ""NAACL"" AND T2.year = 2009)",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +What are the names of authors who published in both NAACL and ACL in 2009?,"SELECT name FROM Author WHERE author_id IN (SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id = T2.paper_id WHERE T2.venue = ""ACL"" AND T2.year = 2009 INTERSECT SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id = T2.paper_id WHERE T2.venue = ""NAACL"" AND T2.year = 2009)",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +Find the name of authors who have never published a paper in ACL.,"SELECT name FROM Author WHERE author_id NOT IN (SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id = T2.paper_id WHERE T2.venue = ""ACL"")",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" +What are the names of authors who have not published a paper in ACL?,"SELECT name FROM Author WHERE author_id NOT IN (SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id = T2.paper_id WHERE T2.venue = ""ACL"")",aan_1,"[{'table_name': 'author', 'table_schema': [{'col_name': 'author id'}, {'col_name': 'name'}, {'col_name': 'email'}], 'foreign_key_columns': [], 'primary_keys': ['author id']}, {'table_name': 'author list', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'author id'}, {'col_name': 'affiliation id'}], 'foreign_key_columns': ['affiliation id', 'author id', 'paper id'], 'primary_keys': ['paper id']}, {'table_name': 'paper', 'table_schema': [{'col_name': 'paper id'}, {'col_name': 'title'}, {'col_name': 'venue'}, {'col_name': 'year'}], 'foreign_key_columns': [], 'primary_keys': ['paper id']}]" How many conferences are there?,SELECT count(*) FROM conference,conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}]" What is the total number of conferences?,SELECT count(*) FROM conference,conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}]" List all distinct conference names.,SELECT DISTINCT conference_name FROM conference,conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}]" @@ -1080,104 +1080,104 @@ Show all staff name who are above the average age.,SELECT name FROM staff WHERE What are the names of all staff members who are older than average?,SELECT name FROM staff WHERE age > (SELECT avg(age) FROM staff),conference,"[{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}]" What is the maximum and minimum age of all staff from the United States?,"SELECT max(age) , min(age) FROM staff",conference,"[{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}]" What are the maximum and minimum ages for all staff?,"SELECT max(age) , min(age) FROM staff",conference,"[{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}]" -Show all conference names which the staff from Canada attends.,"SELECT T1.conference_name FROM conference AS T1 JOIN conference_participation AS T2 ON T1.conference_id = T2.conference_id JOIN staff AS T3 ON T2.staff_id = T3.staff_id WHERE T3.nationality = ""Canada""",conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}]" -What are the names of all the conferences that has staff from Canada attending?,"SELECT T1.conference_name FROM conference AS T1 JOIN conference_participation AS T2 ON T1.conference_id = T2.conference_id JOIN staff AS T3 ON T2.staff_id = T3.staff_id WHERE T3.nationality = ""Canada""",conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}]" -Show all staff names who have been both speaker and sponsor in some conference.,SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 ON T1.staff_id = T2.staff_id WHERE T2.role = 'Speaker' INTERSECT SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 ON T1.staff_id = T2.staff_id WHERE T2.role = 'Sponsor',conference,"[{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}]" -What are the names of the staff members who have been both a speaker and a sponsor at some conference?,SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 ON T1.staff_id = T2.staff_id WHERE T2.role = 'Speaker' INTERSECT SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 ON T1.staff_id = T2.staff_id WHERE T2.role = 'Sponsor',conference,"[{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}]" -Show all names who have been in both ACL and Naccl.,SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 JOIN Conference AS T3 ON T1.staff_id = T2.staff_id AND T2.conference_id = T3.conference_id WHERE T3.Conference_name = 'ACL' INTERSECT SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 JOIN conference AS T3 ON T1.staff_id = T2.staff_id AND T2.conference_id = T3.conference_id WHERE T3.Conference_name = 'Naccl',conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}]" -What are the names of everbody who has participated in both the ACL and NACCL conferences?,SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 JOIN Conference AS T3 ON T1.staff_id = T2.staff_id AND T2.conference_id = T3.conference_id WHERE T3.Conference_name = 'ACL' INTERSECT SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 JOIN conference AS T3 ON T1.staff_id = T2.staff_id AND T2.conference_id = T3.conference_id WHERE T3.Conference_name = 'Naccl',conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}]" -Show all staff names who attend a conference in 2003 or 2004.,SELECT DISTINCT T1.name FROM staff AS T1 JOIN conference_participation AS T2 JOIN Conference AS T3 ON T1.staff_id = T2.staff_id AND T2.conference_id = T3.conference_id WHERE T3.year = 2003 OR T3.year = 2004,conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}]" -What are the staff names who participated in conferences between 2003 or 2004?,SELECT DISTINCT T1.name FROM staff AS T1 JOIN conference_participation AS T2 JOIN Conference AS T3 ON T1.staff_id = T2.staff_id AND T2.conference_id = T3.conference_id WHERE T3.year = 2003 OR T3.year = 2004,conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}]" -Show the conference name and year and the number of participants for each conference.,"SELECT T1.conference_name , T1.year , count(*) FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id GROUP BY T2.conference_id",conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}]" -"For each conference id, what are their names, year, and number of participants?","SELECT T1.conference_name , T1.year , count(*) FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id GROUP BY T2.conference_id",conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}]" -Find the name of the conferences that have the top 2 most number of attendants.,SELECT T1.conference_name FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id GROUP BY T2.conference_id ORDER BY count(*) DESC LIMIT 2,conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}]" -What are the names of the conferences that have the top 2 most people attending?,SELECT T1.conference_name FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id GROUP BY T2.conference_id ORDER BY count(*) DESC LIMIT 2,conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}]" -Find the name and nationality of the people who did not participate in any ACL conference.,"SELECT name , nationality FROM staff WHERE staff_id NOT IN (SELECT T2.staff_id FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id WHERE T1.Conference_Name = ""ACL"")",conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}]" -What are the names and nationalities of the people who did not participate in any ACL conferences?,"SELECT name , nationality FROM staff WHERE staff_id NOT IN (SELECT T2.staff_id FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id WHERE T1.Conference_Name = ""ACL"")",conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}]" -Find the name and location of the universities that did not have any staff participated in any conference in 2004.,"SELECT T1.Institution_Name , T1.location FROM institution AS T1 JOIN staff AS T2 ON T1.institution_id = T2.institution_id WHERE T2.staff_id NOT IN (SELECT T4.staff_id FROM Conference AS T3 JOIN Conference_participation AS T4 ON T3.conference_id = T4.conference_id WHERE T3.year = 2004)",conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'institution', 'table_schema': [{'col_name': 'institution id'}, {'col_name': 'institution name'}, {'col_name': 'location'}, {'col_name': 'founded'}], 'foreign_key_columns': [], 'primary_keys': ['institution id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}]" -What are the names and locations of the universities that did not have any staff participating in any conferences in 2004?,"SELECT T1.Institution_Name , T1.location FROM institution AS T1 JOIN staff AS T2 ON T1.institution_id = T2.institution_id WHERE T2.staff_id NOT IN (SELECT T4.staff_id FROM Conference AS T3 JOIN Conference_participation AS T4 ON T3.conference_id = T4.conference_id WHERE T3.year = 2004)",conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'institution', 'table_schema': [{'col_name': 'institution id'}, {'col_name': 'institution name'}, {'col_name': 'location'}, {'col_name': 'founded'}], 'foreign_key_columns': [], 'primary_keys': ['institution id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}]" -What is the name of the oldest pilot?,SELECT pilot_name FROM PilotSkills ORDER BY age DESC LIMIT 1,pilot_1,[] -Return the name of the oldest pilot.,SELECT pilot_name FROM PilotSkills ORDER BY age DESC LIMIT 1,pilot_1,[] -"What are the names of pilots whose age is below the average age, ordered by age?",SELECT pilot_name FROM PilotSkills WHERE age < (SELECT avg(age) FROM PilotSkills) ORDER BY age,pilot_1,[] -"Return the names of pilots who are younger than average, ordered by age ascending.",SELECT pilot_name FROM PilotSkills WHERE age < (SELECT avg(age) FROM PilotSkills) ORDER BY age,pilot_1,[] -Find all information of on pilots whose age is less than 30.,SELECT * FROM PilotSkills WHERE age < 30,pilot_1,[] -What is all the information about pilots who are younger than 30 ?,select * from pilotskills where age < 30,pilot_1,[] -Find the names of all pilots who have a plane named Piper Cub and is under 35.,SELECT pilot_name FROM PilotSkills WHERE age < 35 AND plane_name = 'Piper Cub',pilot_1,[] -What are the names of pilots who are younger than 35 and have a plane named Piper Cub?,SELECT pilot_name FROM PilotSkills WHERE age < 35 AND plane_name = 'Piper Cub',pilot_1,[] +Show all conference names which the staff from Canada attends.,"SELECT T1.conference_name FROM conference AS T1 JOIN conference_participation AS T2 ON T1.conference_id = T2.conference_id JOIN staff AS T3 ON T2.staff_id = T3.staff_id WHERE T3.nationality = ""Canada""",conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'staff id'}, {'col_name': 'role'}], 'foreign_key_columns': ['conference id', 'staff id'], 'primary_keys': ['staff id']}]" +What are the names of all the conferences that has staff from Canada attending?,"SELECT T1.conference_name FROM conference AS T1 JOIN conference_participation AS T2 ON T1.conference_id = T2.conference_id JOIN staff AS T3 ON T2.staff_id = T3.staff_id WHERE T3.nationality = ""Canada""",conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'staff id'}, {'col_name': 'role'}], 'foreign_key_columns': ['conference id', 'staff id'], 'primary_keys': ['staff id']}]" +Show all staff names who have been both speaker and sponsor in some conference.,SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 ON T1.staff_id = T2.staff_id WHERE T2.role = 'Speaker' INTERSECT SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 ON T1.staff_id = T2.staff_id WHERE T2.role = 'Sponsor',conference,"[{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'staff id'}, {'col_name': 'role'}], 'foreign_key_columns': ['conference id', 'staff id'], 'primary_keys': ['staff id']}]" +What are the names of the staff members who have been both a speaker and a sponsor at some conference?,SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 ON T1.staff_id = T2.staff_id WHERE T2.role = 'Speaker' INTERSECT SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 ON T1.staff_id = T2.staff_id WHERE T2.role = 'Sponsor',conference,"[{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'staff id'}, {'col_name': 'role'}], 'foreign_key_columns': ['conference id', 'staff id'], 'primary_keys': ['staff id']}]" +Show all names who have been in both ACL and Naccl.,SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 JOIN Conference AS T3 ON T1.staff_id = T2.staff_id AND T2.conference_id = T3.conference_id WHERE T3.Conference_name = 'ACL' INTERSECT SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 JOIN conference AS T3 ON T1.staff_id = T2.staff_id AND T2.conference_id = T3.conference_id WHERE T3.Conference_name = 'Naccl',conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'staff id'}, {'col_name': 'role'}], 'foreign_key_columns': ['conference id', 'staff id'], 'primary_keys': ['staff id']}]" +What are the names of everbody who has participated in both the ACL and NACCL conferences?,SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 JOIN Conference AS T3 ON T1.staff_id = T2.staff_id AND T2.conference_id = T3.conference_id WHERE T3.Conference_name = 'ACL' INTERSECT SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 JOIN conference AS T3 ON T1.staff_id = T2.staff_id AND T2.conference_id = T3.conference_id WHERE T3.Conference_name = 'Naccl',conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'staff id'}, {'col_name': 'role'}], 'foreign_key_columns': ['conference id', 'staff id'], 'primary_keys': ['staff id']}]" +Show all staff names who attend a conference in 2003 or 2004.,SELECT DISTINCT T1.name FROM staff AS T1 JOIN conference_participation AS T2 JOIN Conference AS T3 ON T1.staff_id = T2.staff_id AND T2.conference_id = T3.conference_id WHERE T3.year = 2003 OR T3.year = 2004,conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'staff id'}, {'col_name': 'role'}], 'foreign_key_columns': ['conference id', 'staff id'], 'primary_keys': ['staff id']}]" +What are the staff names who participated in conferences between 2003 or 2004?,SELECT DISTINCT T1.name FROM staff AS T1 JOIN conference_participation AS T2 JOIN Conference AS T3 ON T1.staff_id = T2.staff_id AND T2.conference_id = T3.conference_id WHERE T3.year = 2003 OR T3.year = 2004,conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'staff id'}, {'col_name': 'role'}], 'foreign_key_columns': ['conference id', 'staff id'], 'primary_keys': ['staff id']}]" +Show the conference name and year and the number of participants for each conference.,"SELECT T1.conference_name , T1.year , count(*) FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id GROUP BY T2.conference_id",conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'staff id'}, {'col_name': 'role'}], 'foreign_key_columns': ['conference id', 'staff id'], 'primary_keys': ['staff id']}]" +"For each conference id, what are their names, year, and number of participants?","SELECT T1.conference_name , T1.year , count(*) FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id GROUP BY T2.conference_id",conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'staff id'}, {'col_name': 'role'}], 'foreign_key_columns': ['conference id', 'staff id'], 'primary_keys': ['staff id']}]" +Find the name of the conferences that have the top 2 most number of attendants.,SELECT T1.conference_name FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id GROUP BY T2.conference_id ORDER BY count(*) DESC LIMIT 2,conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'staff id'}, {'col_name': 'role'}], 'foreign_key_columns': ['conference id', 'staff id'], 'primary_keys': ['staff id']}]" +What are the names of the conferences that have the top 2 most people attending?,SELECT T1.conference_name FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id GROUP BY T2.conference_id ORDER BY count(*) DESC LIMIT 2,conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'staff id'}, {'col_name': 'role'}], 'foreign_key_columns': ['conference id', 'staff id'], 'primary_keys': ['staff id']}]" +Find the name and nationality of the people who did not participate in any ACL conference.,"SELECT name , nationality FROM staff WHERE staff_id NOT IN (SELECT T2.staff_id FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id WHERE T1.Conference_Name = ""ACL"")",conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'staff id'}, {'col_name': 'role'}], 'foreign_key_columns': ['conference id', 'staff id'], 'primary_keys': ['staff id']}]" +What are the names and nationalities of the people who did not participate in any ACL conferences?,"SELECT name , nationality FROM staff WHERE staff_id NOT IN (SELECT T2.staff_id FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id WHERE T1.Conference_Name = ""ACL"")",conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'staff id'}, {'col_name': 'role'}], 'foreign_key_columns': ['conference id', 'staff id'], 'primary_keys': ['staff id']}]" +Find the name and location of the universities that did not have any staff participated in any conference in 2004.,"SELECT T1.Institution_Name , T1.location FROM institution AS T1 JOIN staff AS T2 ON T1.institution_id = T2.institution_id WHERE T2.staff_id NOT IN (SELECT T4.staff_id FROM Conference AS T3 JOIN Conference_participation AS T4 ON T3.conference_id = T4.conference_id WHERE T3.year = 2004)",conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'institution', 'table_schema': [{'col_name': 'institution id'}, {'col_name': 'institution name'}, {'col_name': 'location'}, {'col_name': 'founded'}], 'foreign_key_columns': [], 'primary_keys': ['institution id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'staff id'}, {'col_name': 'role'}], 'foreign_key_columns': ['conference id', 'staff id'], 'primary_keys': ['staff id']}]" +What are the names and locations of the universities that did not have any staff participating in any conferences in 2004?,"SELECT T1.Institution_Name , T1.location FROM institution AS T1 JOIN staff AS T2 ON T1.institution_id = T2.institution_id WHERE T2.staff_id NOT IN (SELECT T4.staff_id FROM Conference AS T3 JOIN Conference_participation AS T4 ON T3.conference_id = T4.conference_id WHERE T3.year = 2004)",conference,"[{'table_name': 'conference', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'conference name'}, {'col_name': 'year'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['conference id']}, {'table_name': 'institution', 'table_schema': [{'col_name': 'institution id'}, {'col_name': 'institution name'}, {'col_name': 'location'}, {'col_name': 'founded'}], 'foreign_key_columns': [], 'primary_keys': ['institution id']}, {'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'nationality'}, {'col_name': 'institution id'}], 'foreign_key_columns': ['institution id'], 'primary_keys': ['staff id']}, {'table_name': 'conference participation', 'table_schema': [{'col_name': 'conference id'}, {'col_name': 'staff id'}, {'col_name': 'role'}], 'foreign_key_columns': ['conference id', 'staff id'], 'primary_keys': ['staff id']}]" +What is the name of the oldest pilot?,SELECT pilot_name FROM PilotSkills ORDER BY age DESC LIMIT 1,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Return the name of the oldest pilot.,SELECT pilot_name FROM PilotSkills ORDER BY age DESC LIMIT 1,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +"What are the names of pilots whose age is below the average age, ordered by age?",SELECT pilot_name FROM PilotSkills WHERE age < (SELECT avg(age) FROM PilotSkills) ORDER BY age,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +"Return the names of pilots who are younger than average, ordered by age ascending.",SELECT pilot_name FROM PilotSkills WHERE age < (SELECT avg(age) FROM PilotSkills) ORDER BY age,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Find all information of on pilots whose age is less than 30.,SELECT * FROM PilotSkills WHERE age < 30,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +What is all the information about pilots who are younger than 30 ?,select * from pilotskills where age < 30,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Find the names of all pilots who have a plane named Piper Cub and is under 35.,SELECT pilot_name FROM PilotSkills WHERE age < 35 AND plane_name = 'Piper Cub',pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +What are the names of pilots who are younger than 35 and have a plane named Piper Cub?,SELECT pilot_name FROM PilotSkills WHERE age < 35 AND plane_name = 'Piper Cub',pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" Where is the plane F-14 Fighter located?,SELECT LOCATION FROM hangar WHERE plane_name = 'F-14 Fighter',pilot_1,"[{'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" Return the location of the hangar in which F-14 Fighter is located.,SELECT LOCATION FROM hangar WHERE plane_name = 'F-14 Fighter',pilot_1,"[{'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" How many different places have some plane?,SELECT count(DISTINCT LOCATION) FROM hangar,pilot_1,"[{'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" Count the number of different locations of hangars.,SELECT count(DISTINCT LOCATION) FROM hangar,pilot_1,"[{'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" -Which plane does the pilot Jones with age 32 has?,SELECT plane_name FROM pilotskills WHERE pilot_name = 'Jones' AND age = 32,pilot_1,[] -What are the names of planes that the pilot Jones who is 32 has?,SELECT plane_name FROM pilotskills WHERE pilot_name = 'Jones' AND age = 32,pilot_1,[] -How many pilots who are older than 40?,SELECT count(*) FROM pilotskills WHERE age > 40,pilot_1,[] -Count the number of pilots with age greater than 40.,SELECT count(*) FROM pilotskills WHERE age > 40,pilot_1,[] -How many plane B-52 Bomber owned by the pilot who is under 35?,SELECT count(*) FROM pilotskills WHERE age < 35 AND plane_name = 'B-52 Bomber',pilot_1,[] -Count the number of B-52 Bombers owned by pilots under 35.,SELECT count(*) FROM pilotskills WHERE age < 35 AND plane_name = 'B-52 Bomber',pilot_1,[] -Who is the youngest pilot to fly the plane Piper Cub?,SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub' ORDER BY age LIMIT 1,pilot_1,[] -Return the name of the youngest pilot to fly Piper Cub.,SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub' ORDER BY age LIMIT 1,pilot_1,[] -What is the name of the most popular plane?,SELECT plane_name FROM pilotskills GROUP BY plane_name ORDER BY count(*) DESC LIMIT 1,pilot_1,[] -What is the name of the plane that is flown the most often?,SELECT plane_name FROM pilotskills GROUP BY plane_name ORDER BY count(*) DESC LIMIT 1,pilot_1,[] -What is the name of the least popular plane?,SELECT plane_name FROM pilotskills GROUP BY plane_name ORDER BY count(*) LIMIT 1,pilot_1,[] -What is the name of the plane that is flown the least often?,SELECT plane_name FROM pilotskills GROUP BY plane_name ORDER BY count(*) LIMIT 1,pilot_1,[] -How many pilots whose planes are in Chicago?,SELECT count(DISTINCT T1.pilot_name) FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T2.location = 'Chicago',pilot_1,"[{'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" -Count the number of pilots who have planes in Chicago.,SELECT count(DISTINCT T1.pilot_name) FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T2.location = 'Chicago',pilot_1,"[{'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" -What are the planes owned by pilot Smith with age 41?,SELECT plane_name FROM pilotskills WHERE pilot_name = 'Smith' AND age = 41,pilot_1,[] -Return the names of planes owned by the pilot whose name is Smith and is 41 years old.,SELECT plane_name FROM pilotskills WHERE pilot_name = 'Smith' AND age = 41,pilot_1,[] -How many distinct planes are owned across all pilots?,SELECT count(DISTINCT plane_name) FROM pilotskills,pilot_1,[] -Count the number of different plane names across all pilots.,SELECT count(DISTINCT plane_name) FROM pilotskills,pilot_1,[] -How many planes are owned by the pilot whose name is Smith?,SELECT count(plane_name) FROM pilotskills WHERE pilot_name = 'Smith',pilot_1,[] -Count the number of planes Smith owns.,SELECT count(plane_name) FROM pilotskills WHERE pilot_name = 'Smith',pilot_1,[] -How many planes are controlled by the pilots whose age is older than 40?,SELECT count(plane_name) FROM pilotskills WHERE age > 40,pilot_1,[] -Count the number of planes flown by pilots older than 40.,SELECT count(plane_name) FROM pilotskills WHERE age > 40,pilot_1,[] -Find the names of all pilots with age between 30 and 40 sorted by their ages in ascending order.,SELECT pilot_name FROM pilotskills WHERE age BETWEEN 30 AND 40 ORDER BY age,pilot_1,[] -"What are the names of pilots between the ages of 30 and 40, ordered by age ascending?",SELECT pilot_name FROM pilotskills WHERE age BETWEEN 30 AND 40 ORDER BY age,pilot_1,[] -List all pilot names sorted by their ages in the descending order.,SELECT pilot_name FROM pilotskills ORDER BY age DESC,pilot_1,[] -"What are the names of pilots, ordered by age descending?",SELECT pilot_name FROM pilotskills ORDER BY age DESC,pilot_1,[] +Which plane does the pilot Jones with age 32 has?,SELECT plane_name FROM pilotskills WHERE pilot_name = 'Jones' AND age = 32,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +What are the names of planes that the pilot Jones who is 32 has?,SELECT plane_name FROM pilotskills WHERE pilot_name = 'Jones' AND age = 32,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +How many pilots who are older than 40?,SELECT count(*) FROM pilotskills WHERE age > 40,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Count the number of pilots with age greater than 40.,SELECT count(*) FROM pilotskills WHERE age > 40,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +How many plane B-52 Bomber owned by the pilot who is under 35?,SELECT count(*) FROM pilotskills WHERE age < 35 AND plane_name = 'B-52 Bomber',pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Count the number of B-52 Bombers owned by pilots under 35.,SELECT count(*) FROM pilotskills WHERE age < 35 AND plane_name = 'B-52 Bomber',pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Who is the youngest pilot to fly the plane Piper Cub?,SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub' ORDER BY age LIMIT 1,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Return the name of the youngest pilot to fly Piper Cub.,SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub' ORDER BY age LIMIT 1,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +What is the name of the most popular plane?,SELECT plane_name FROM pilotskills GROUP BY plane_name ORDER BY count(*) DESC LIMIT 1,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +What is the name of the plane that is flown the most often?,SELECT plane_name FROM pilotskills GROUP BY plane_name ORDER BY count(*) DESC LIMIT 1,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +What is the name of the least popular plane?,SELECT plane_name FROM pilotskills GROUP BY plane_name ORDER BY count(*) LIMIT 1,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +What is the name of the plane that is flown the least often?,SELECT plane_name FROM pilotskills GROUP BY plane_name ORDER BY count(*) LIMIT 1,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +How many pilots whose planes are in Chicago?,SELECT count(DISTINCT T1.pilot_name) FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T2.location = 'Chicago',pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}, {'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" +Count the number of pilots who have planes in Chicago.,SELECT count(DISTINCT T1.pilot_name) FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T2.location = 'Chicago',pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}, {'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" +What are the planes owned by pilot Smith with age 41?,SELECT plane_name FROM pilotskills WHERE pilot_name = 'Smith' AND age = 41,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Return the names of planes owned by the pilot whose name is Smith and is 41 years old.,SELECT plane_name FROM pilotskills WHERE pilot_name = 'Smith' AND age = 41,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +How many distinct planes are owned across all pilots?,SELECT count(DISTINCT plane_name) FROM pilotskills,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Count the number of different plane names across all pilots.,SELECT count(DISTINCT plane_name) FROM pilotskills,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +How many planes are owned by the pilot whose name is Smith?,SELECT count(plane_name) FROM pilotskills WHERE pilot_name = 'Smith',pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Count the number of planes Smith owns.,SELECT count(plane_name) FROM pilotskills WHERE pilot_name = 'Smith',pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +How many planes are controlled by the pilots whose age is older than 40?,SELECT count(plane_name) FROM pilotskills WHERE age > 40,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Count the number of planes flown by pilots older than 40.,SELECT count(plane_name) FROM pilotskills WHERE age > 40,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Find the names of all pilots with age between 30 and 40 sorted by their ages in ascending order.,SELECT pilot_name FROM pilotskills WHERE age BETWEEN 30 AND 40 ORDER BY age,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +"What are the names of pilots between the ages of 30 and 40, ordered by age ascending?",SELECT pilot_name FROM pilotskills WHERE age BETWEEN 30 AND 40 ORDER BY age,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +List all pilot names sorted by their ages in the descending order.,SELECT pilot_name FROM pilotskills ORDER BY age DESC,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +"What are the names of pilots, ordered by age descending?",SELECT pilot_name FROM pilotskills ORDER BY age DESC,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" Find all locations of planes sorted by the plane name.,SELECT LOCATION FROM hangar ORDER BY plane_name,pilot_1,"[{'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" "What are the locations of the different planes, ordered by plane name?",SELECT LOCATION FROM hangar ORDER BY plane_name,pilot_1,"[{'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" -List all distinct types of planes owned by all pilots in alphabetic order?,SELECT DISTINCT plane_name FROM pilotskills ORDER BY plane_name,pilot_1,[] -"What are the different plane names, ordered alphabetically?",SELECT DISTINCT plane_name FROM pilotskills ORDER BY plane_name,pilot_1,[] -How many pilots who are older than 40 or younger than 30?,SELECT count(pilot_name) FROM pilotskills ORDER BY age > 40 OR age < 30,pilot_1,[] -Count the number of pilots with age greater than 40 or less than 30.,SELECT count(pilot_name) FROM pilotskills ORDER BY age > 40 OR age < 30,pilot_1,[] -"What are the names and ages of pilots who own plane Piper Cub and are older than 35, or have F-14 Fighter and are younger than 30?","SELECT pilot_name , age FROM pilotskills WHERE plane_name = 'Piper Cub' AND age > 35 UNION SELECT pilot_name , age FROM pilotskills WHERE plane_name = 'F-14 Fighter' AND age < 30",pilot_1,[] -"Return the names and ages of pilors who have flown Piper Cub and are older than 35, or have flown the F-14 Fighter and are younger than 30.","SELECT pilot_name , age FROM pilotskills WHERE plane_name = 'Piper Cub' AND age > 35 UNION SELECT pilot_name , age FROM pilotskills WHERE plane_name = 'F-14 Fighter' AND age < 30",pilot_1,[] -Find pilots who own plane Piper Cub but not B-52 Bomber.,SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub' EXCEPT SELECT pilot_name FROM pilotskills WHERE plane_name = 'B-52 Bomber',pilot_1,[] -What are the names of pilots who have flown Piper Cub but not the B-52 Bomber?,SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub' EXCEPT SELECT pilot_name FROM pilotskills WHERE plane_name = 'B-52 Bomber',pilot_1,[] -Find pilots who own planes Piper Cub and B-52 Bomber.,SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub' INTERSECT SELECT pilot_name FROM pilotskills WHERE plane_name = 'B-52 Bomber',pilot_1,[] -What are the names of pilots who own both Piper Cub and the B-52 Bomber?,SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub' INTERSECT SELECT pilot_name FROM pilotskills WHERE plane_name = 'B-52 Bomber',pilot_1,[] -What are the average and smallest ages of all pilots?,"SELECT avg(age) , min(age) FROM pilotskills",pilot_1,[] -Return the average and minimum ages across all pilots.,"SELECT avg(age) , min(age) FROM pilotskills",pilot_1,[] -What are the names of pilots who have planes in both Austin and Boston?,"SELECT T1.pilot_name FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T2.location = ""Austin"" INTERSECT SELECT T1.pilot_name FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T2.LOCATION = ""Boston""",pilot_1,"[{'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" -Give the names of pilots who have planes in Austin and Boston.,"SELECT T1.pilot_name FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T2.location = ""Austin"" INTERSECT SELECT T1.pilot_name FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T2.LOCATION = ""Boston""",pilot_1,"[{'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" -Find the pilots who have either plane Piper Cub or plane F-14 Fighter.,SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub' OR plane_name = 'F-14 Fighter',pilot_1,[] -What are the names of pilots who have either the Piper Cub or the F-14 Fighter?,SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub' OR plane_name = 'F-14 Fighter',pilot_1,[] -What is the average age of pilots for different types of planes?,"SELECT avg(age) , plane_name FROM pilotskills GROUP BY plane_name",pilot_1,[] -Return the average age of pilots for each plane name.,"SELECT avg(age) , plane_name FROM pilotskills GROUP BY plane_name",pilot_1,[] -Find the number of planes for each type.,"SELECT count(*) , plane_name FROM pilotskills GROUP BY plane_name",pilot_1,[] -Count the number of entries for each plane name.,"SELECT count(*) , plane_name FROM pilotskills GROUP BY plane_name",pilot_1,[] -"Find the name of the oldest pilot for each type of plane, and order the results by plane name.","SELECT pilot_name , plane_name , max(age) FROM pilotskills GROUP BY plane_name ORDER BY plane_name",pilot_1,[] -"What are the different plane names, and what are the names of the oldest pilot who has each, ordered by plane name?","SELECT pilot_name , plane_name , max(age) FROM pilotskills GROUP BY plane_name ORDER BY plane_name",pilot_1,[] -What are the names of oldest pilots for each type of plane?,"SELECT pilot_name , plane_name , max(age) FROM pilotskills GROUP BY plane_name",pilot_1,[] -"Return the names of the different planes, as well as the names of the oldest pilots who flew each.","SELECT pilot_name , plane_name , max(age) FROM pilotskills GROUP BY plane_name",pilot_1,[] -Find the max age for each group of pilots with the same name.,"SELECT max(age) , pilot_name FROM pilotskills GROUP BY pilot_name",pilot_1,[] -"What are the different pilot names, and what are the maximum ages of pilots for each?","SELECT max(age) , pilot_name FROM pilotskills GROUP BY pilot_name",pilot_1,[] -"For each city, find the number and average age of pilots who have a plane.","SELECT count(T1.pilot_name) , avg(T1.age) , T2.location FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name GROUP BY T2.location",pilot_1,"[{'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" -"What are the different hangar locations and how many pilots correspond to each. Also, what are their average ages?","SELECT count(T1.pilot_name) , avg(T1.age) , T2.location FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name GROUP BY T2.location",pilot_1,"[{'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" -Find the number of pilots for the plane types with average pilot age below 35.,"SELECT count(*) , plane_name FROM pilotskills GROUP BY plane_name HAVING avg(age) < 35",pilot_1,[] -"What are the different plane names of planes with an average pilot age of below 35, and how many pilots have flown each of them?","SELECT count(*) , plane_name FROM pilotskills GROUP BY plane_name HAVING avg(age) < 35",pilot_1,[] -Find the location of the plane that is owned by the youngest pilot.,SELECT T2.location FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T1.age = (SELECT min(age) FROM pilotskills),pilot_1,"[{'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" -What is the location of the plane that was flown by the pilot with the lowest age?,SELECT T2.location FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T1.age = (SELECT min(age) FROM pilotskills),pilot_1,"[{'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" -Find the name and age of pilots who have a plane in Austin.,"SELECT T1.pilot_name , T1.age FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T2.location = ""Austin""",pilot_1,"[{'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" -What are the names and ages of pilots who have planes located in Austin?,"SELECT T1.pilot_name , T1.age FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T2.location = ""Austin""",pilot_1,"[{'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" -List in alphabetic order the names of pilots whose age is greater than some pilots having plane Piper Cub.,SELECT pilot_name FROM pilotskills WHERE age > (SELECT min(age) FROM pilotskills WHERE plane_name = 'Piper Cub') ORDER BY pilot_name,pilot_1,[] -"Return the names of pilots who are older than any pilot who has flown Piper Cub, ordered alphabetically.",SELECT pilot_name FROM pilotskills WHERE age > (SELECT min(age) FROM pilotskills WHERE plane_name = 'Piper Cub') ORDER BY pilot_name,pilot_1,[] -Find the number of pilots whose age is younger than all pilots whose plane is F-14 Fighter.,SELECT count(*) FROM pilotskills WHERE age < (SELECT min(age) FROM pilotskills WHERE plane_name = 'F-14 Fighter'),pilot_1,[] -How many pilots are younger than all pilots who own the F-14 Fighter?,SELECT count(*) FROM pilotskills WHERE age < (SELECT min(age) FROM pilotskills WHERE plane_name = 'F-14 Fighter'),pilot_1,[] -Find all different planes whose names contain substring 'Bomber'.,SELECT DISTINCT plane_name FROM pilotskills WHERE plane_name LIKE '%Bomber%',pilot_1,[] -What are the different plane names that contain the word Bomber?,SELECT DISTINCT plane_name FROM pilotskills WHERE plane_name LIKE '%Bomber%',pilot_1,[] -Find the number of all pilots whose age is older than some pilot who has plane Piper Cub.,SELECT count(pilot_name) FROM pilotskills WHERE age > (SELECT min(age) FROM pilotskills WHERE plane_name = 'Piper Cub'),pilot_1,[] -How many pilots are older than the youngest pilot who has Piper Cub?,SELECT count(pilot_name) FROM pilotskills WHERE age > (SELECT min(age) FROM pilotskills WHERE plane_name = 'Piper Cub'),pilot_1,[] +List all distinct types of planes owned by all pilots in alphabetic order?,SELECT DISTINCT plane_name FROM pilotskills ORDER BY plane_name,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +"What are the different plane names, ordered alphabetically?",SELECT DISTINCT plane_name FROM pilotskills ORDER BY plane_name,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +How many pilots who are older than 40 or younger than 30?,SELECT count(pilot_name) FROM pilotskills ORDER BY age > 40 OR age < 30,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Count the number of pilots with age greater than 40 or less than 30.,SELECT count(pilot_name) FROM pilotskills ORDER BY age > 40 OR age < 30,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +"What are the names and ages of pilots who own plane Piper Cub and are older than 35, or have F-14 Fighter and are younger than 30?","SELECT pilot_name , age FROM pilotskills WHERE plane_name = 'Piper Cub' AND age > 35 UNION SELECT pilot_name , age FROM pilotskills WHERE plane_name = 'F-14 Fighter' AND age < 30",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +"Return the names and ages of pilors who have flown Piper Cub and are older than 35, or have flown the F-14 Fighter and are younger than 30.","SELECT pilot_name , age FROM pilotskills WHERE plane_name = 'Piper Cub' AND age > 35 UNION SELECT pilot_name , age FROM pilotskills WHERE plane_name = 'F-14 Fighter' AND age < 30",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Find pilots who own plane Piper Cub but not B-52 Bomber.,SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub' EXCEPT SELECT pilot_name FROM pilotskills WHERE plane_name = 'B-52 Bomber',pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +What are the names of pilots who have flown Piper Cub but not the B-52 Bomber?,SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub' EXCEPT SELECT pilot_name FROM pilotskills WHERE plane_name = 'B-52 Bomber',pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Find pilots who own planes Piper Cub and B-52 Bomber.,SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub' INTERSECT SELECT pilot_name FROM pilotskills WHERE plane_name = 'B-52 Bomber',pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +What are the names of pilots who own both Piper Cub and the B-52 Bomber?,SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub' INTERSECT SELECT pilot_name FROM pilotskills WHERE plane_name = 'B-52 Bomber',pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +What are the average and smallest ages of all pilots?,"SELECT avg(age) , min(age) FROM pilotskills",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Return the average and minimum ages across all pilots.,"SELECT avg(age) , min(age) FROM pilotskills",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +What are the names of pilots who have planes in both Austin and Boston?,"SELECT T1.pilot_name FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T2.location = ""Austin"" INTERSECT SELECT T1.pilot_name FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T2.LOCATION = ""Boston""",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}, {'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" +Give the names of pilots who have planes in Austin and Boston.,"SELECT T1.pilot_name FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T2.location = ""Austin"" INTERSECT SELECT T1.pilot_name FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T2.LOCATION = ""Boston""",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}, {'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" +Find the pilots who have either plane Piper Cub or plane F-14 Fighter.,SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub' OR plane_name = 'F-14 Fighter',pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +What are the names of pilots who have either the Piper Cub or the F-14 Fighter?,SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub' OR plane_name = 'F-14 Fighter',pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +What is the average age of pilots for different types of planes?,"SELECT avg(age) , plane_name FROM pilotskills GROUP BY plane_name",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Return the average age of pilots for each plane name.,"SELECT avg(age) , plane_name FROM pilotskills GROUP BY plane_name",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Find the number of planes for each type.,"SELECT count(*) , plane_name FROM pilotskills GROUP BY plane_name",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Count the number of entries for each plane name.,"SELECT count(*) , plane_name FROM pilotskills GROUP BY plane_name",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +"Find the name of the oldest pilot for each type of plane, and order the results by plane name.","SELECT pilot_name , plane_name , max(age) FROM pilotskills GROUP BY plane_name ORDER BY plane_name",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +"What are the different plane names, and what are the names of the oldest pilot who has each, ordered by plane name?","SELECT pilot_name , plane_name , max(age) FROM pilotskills GROUP BY plane_name ORDER BY plane_name",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +What are the names of oldest pilots for each type of plane?,"SELECT pilot_name , plane_name , max(age) FROM pilotskills GROUP BY plane_name",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +"Return the names of the different planes, as well as the names of the oldest pilots who flew each.","SELECT pilot_name , plane_name , max(age) FROM pilotskills GROUP BY plane_name",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Find the max age for each group of pilots with the same name.,"SELECT max(age) , pilot_name FROM pilotskills GROUP BY pilot_name",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +"What are the different pilot names, and what are the maximum ages of pilots for each?","SELECT max(age) , pilot_name FROM pilotskills GROUP BY pilot_name",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +"For each city, find the number and average age of pilots who have a plane.","SELECT count(T1.pilot_name) , avg(T1.age) , T2.location FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name GROUP BY T2.location",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}, {'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" +"What are the different hangar locations and how many pilots correspond to each. Also, what are their average ages?","SELECT count(T1.pilot_name) , avg(T1.age) , T2.location FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name GROUP BY T2.location",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}, {'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" +Find the number of pilots for the plane types with average pilot age below 35.,"SELECT count(*) , plane_name FROM pilotskills GROUP BY plane_name HAVING avg(age) < 35",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +"What are the different plane names of planes with an average pilot age of below 35, and how many pilots have flown each of them?","SELECT count(*) , plane_name FROM pilotskills GROUP BY plane_name HAVING avg(age) < 35",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Find the location of the plane that is owned by the youngest pilot.,SELECT T2.location FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T1.age = (SELECT min(age) FROM pilotskills),pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}, {'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" +What is the location of the plane that was flown by the pilot with the lowest age?,SELECT T2.location FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T1.age = (SELECT min(age) FROM pilotskills),pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}, {'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" +Find the name and age of pilots who have a plane in Austin.,"SELECT T1.pilot_name , T1.age FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T2.location = ""Austin""",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}, {'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" +What are the names and ages of pilots who have planes located in Austin?,"SELECT T1.pilot_name , T1.age FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T2.location = ""Austin""",pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}, {'table_name': 'hangar', 'table_schema': [{'col_name': 'plane name'}, {'col_name': 'location'}], 'foreign_key_columns': [], 'primary_keys': ['plane name']}]" +List in alphabetic order the names of pilots whose age is greater than some pilots having plane Piper Cub.,SELECT pilot_name FROM pilotskills WHERE age > (SELECT min(age) FROM pilotskills WHERE plane_name = 'Piper Cub') ORDER BY pilot_name,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +"Return the names of pilots who are older than any pilot who has flown Piper Cub, ordered alphabetically.",SELECT pilot_name FROM pilotskills WHERE age > (SELECT min(age) FROM pilotskills WHERE plane_name = 'Piper Cub') ORDER BY pilot_name,pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Find the number of pilots whose age is younger than all pilots whose plane is F-14 Fighter.,SELECT count(*) FROM pilotskills WHERE age < (SELECT min(age) FROM pilotskills WHERE plane_name = 'F-14 Fighter'),pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +How many pilots are younger than all pilots who own the F-14 Fighter?,SELECT count(*) FROM pilotskills WHERE age < (SELECT min(age) FROM pilotskills WHERE plane_name = 'F-14 Fighter'),pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Find all different planes whose names contain substring 'Bomber'.,SELECT DISTINCT plane_name FROM pilotskills WHERE plane_name LIKE '%Bomber%',pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +What are the different plane names that contain the word Bomber?,SELECT DISTINCT plane_name FROM pilotskills WHERE plane_name LIKE '%Bomber%',pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +Find the number of all pilots whose age is older than some pilot who has plane Piper Cub.,SELECT count(pilot_name) FROM pilotskills WHERE age > (SELECT min(age) FROM pilotskills WHERE plane_name = 'Piper Cub'),pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" +How many pilots are older than the youngest pilot who has Piper Cub?,SELECT count(pilot_name) FROM pilotskills WHERE age > (SELECT min(age) FROM pilotskills WHERE plane_name = 'Piper Cub'),pilot_1,"[{'table_name': 'pilot skills', 'table_schema': [{'col_name': 'pilot name'}, {'col_name': 'plane name'}, {'col_name': 'age'}], 'foreign_key_columns': ['plane name'], 'primary_keys': ['pilot name']}]" Find the name of the district which has the largest area.,SELECT name FROM district ORDER BY Area_km DESC LIMIT 1,district_spokesman,"[{'table_name': 'district', 'table_schema': [{'col_name': 'district id'}, {'col_name': 'name'}, {'col_name': 'area km'}, {'col_name': 'population'}, {'col_name': 'density km'}, {'col_name': 'government website'}], 'foreign_key_columns': [], 'primary_keys': ['district id']}]" Select the area and government website of the district with the smallest population.,"SELECT area_km , Government_website FROM district ORDER BY Population LIMIT 1",district_spokesman,"[{'table_name': 'district', 'table_schema': [{'col_name': 'district id'}, {'col_name': 'name'}, {'col_name': 'area km'}, {'col_name': 'population'}, {'col_name': 'density km'}, {'col_name': 'government website'}], 'foreign_key_columns': [], 'primary_keys': ['district id']}]" Find the names and populations of the districts whose area is greater than the average area.,"SELECT name , population FROM district WHERE area_km > (SELECT avg(area_km) FROM district)",district_spokesman,"[{'table_name': 'district', 'table_schema': [{'col_name': 'district id'}, {'col_name': 'name'}, {'col_name': 'area km'}, {'col_name': 'population'}, {'col_name': 'density km'}, {'col_name': 'government website'}], 'foreign_key_columns': [], 'primary_keys': ['district id']}]" @@ -1191,14 +1191,14 @@ Find the average points and average ages of all spokesmen whose rank position is What are the names and points of spokesmen who are younger than 40?,"SELECT name , points FROM spokesman WHERE age < 40",district_spokesman,"[{'table_name': 'spokesman', 'table_schema': [{'col_name': 'spokesman id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'speach title'}, {'col_name': 'rank position'}, {'col_name': 'points'}], 'foreign_key_columns': [], 'primary_keys': ['spokesman id']}]" Who is the oldest spokesman?,SELECT name FROM spokesman ORDER BY age DESC LIMIT 1,district_spokesman,"[{'table_name': 'spokesman', 'table_schema': [{'col_name': 'spokesman id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'speach title'}, {'col_name': 'rank position'}, {'col_name': 'points'}], 'foreign_key_columns': [], 'primary_keys': ['spokesman id']}]" Which spokesman has lower points than the average?,SELECT name FROM spokesman WHERE points < (SELECT avg(points) FROM spokesman),district_spokesman,"[{'table_name': 'spokesman', 'table_schema': [{'col_name': 'spokesman id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'speach title'}, {'col_name': 'rank position'}, {'col_name': 'points'}], 'foreign_key_columns': [], 'primary_keys': ['spokesman id']}]" -Find the name of the district which has greatest number of spokesmen.,SELECT t1.name FROM district AS t1 JOIN spokesman_district AS t2 ON t1.District_ID = t2.District_ID GROUP BY t2.District_ID ORDER BY count(*) DESC LIMIT 1,district_spokesman,"[{'table_name': 'district', 'table_schema': [{'col_name': 'district id'}, {'col_name': 'name'}, {'col_name': 'area km'}, {'col_name': 'population'}, {'col_name': 'density km'}, {'col_name': 'government website'}], 'foreign_key_columns': [], 'primary_keys': ['district id']}]" -Find the names of spokesmen who have served some district before 2004.,SELECT t1.name FROM spokesman AS t1 JOIN spokesman_district AS t2 ON t1.Spokesman_ID = t2.Spokesman_ID WHERE t2.start_year < 2004,district_spokesman,"[{'table_name': 'spokesman', 'table_schema': [{'col_name': 'spokesman id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'speach title'}, {'col_name': 'rank position'}, {'col_name': 'points'}], 'foreign_key_columns': [], 'primary_keys': ['spokesman id']}]" -"Find the number of spokesmen for each district, and the show district names as well.","SELECT t1.name , count(*) FROM district AS t1 JOIN spokesman_district AS t2 ON t1.District_ID = t2.District_ID GROUP BY t2.District_ID",district_spokesman,"[{'table_name': 'district', 'table_schema': [{'col_name': 'district id'}, {'col_name': 'name'}, {'col_name': 'area km'}, {'col_name': 'population'}, {'col_name': 'density km'}, {'col_name': 'government website'}], 'foreign_key_columns': [], 'primary_keys': ['district id']}]" -Find the names of the districts which have had both spokesman with rank position 1 and 2.,SELECT t3.name FROM spokesman AS t1 JOIN spokesman_district AS t2 ON t1.Spokesman_ID = t2.Spokesman_ID JOIN district AS t3 ON t3.district_id = t2.district_id WHERE t1.rank_position = 1 INTERSECT SELECT t3.name FROM spokesman AS t1 JOIN spokesman_district AS t2 ON t1.Spokesman_ID = t2.Spokesman_ID JOIN district AS t3 ON t3.district_id = t2.district_id WHERE t1.rank_position = 2,district_spokesman,"[{'table_name': 'district', 'table_schema': [{'col_name': 'district id'}, {'col_name': 'name'}, {'col_name': 'area km'}, {'col_name': 'population'}, {'col_name': 'density km'}, {'col_name': 'government website'}], 'foreign_key_columns': [], 'primary_keys': ['district id']}, {'table_name': 'spokesman', 'table_schema': [{'col_name': 'spokesman id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'speach title'}, {'col_name': 'rank position'}, {'col_name': 'points'}], 'foreign_key_columns': [], 'primary_keys': ['spokesman id']}]" -Find the names of districts which have more than one spokesman.,SELECT t1.name FROM district AS t1 JOIN spokesman_district AS t2 ON t1.District_ID = t2.District_ID GROUP BY t2.District_ID HAVING count(*) > 1,district_spokesman,"[{'table_name': 'district', 'table_schema': [{'col_name': 'district id'}, {'col_name': 'name'}, {'col_name': 'area km'}, {'col_name': 'population'}, {'col_name': 'density km'}, {'col_name': 'government website'}], 'foreign_key_columns': [], 'primary_keys': ['district id']}]" -Find the number of districts which have no spokesmen.,SELECT count(*) FROM district WHERE district_id NOT IN (SELECT district_id FROM spokesman_district),district_spokesman,"[{'table_name': 'district', 'table_schema': [{'col_name': 'district id'}, {'col_name': 'name'}, {'col_name': 'area km'}, {'col_name': 'population'}, {'col_name': 'density km'}, {'col_name': 'government website'}], 'foreign_key_columns': [], 'primary_keys': ['district id']}]" -Find the name of spokesmen who do not speak for any district.,SELECT name FROM spokesman WHERE Spokesman_ID NOT IN (SELECT Spokesman_ID FROM spokesman_district),district_spokesman,"[{'table_name': 'spokesman', 'table_schema': [{'col_name': 'spokesman id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'speach title'}, {'col_name': 'rank position'}, {'col_name': 'points'}], 'foreign_key_columns': [], 'primary_keys': ['spokesman id']}]" -Find the total and average population of the districts which have some spokesman.,"SELECT sum(population) , avg(population) FROM district WHERE district_id IN (SELECT district_id FROM spokesman_district)",district_spokesman,"[{'table_name': 'district', 'table_schema': [{'col_name': 'district id'}, {'col_name': 'name'}, {'col_name': 'area km'}, {'col_name': 'population'}, {'col_name': 'density km'}, {'col_name': 'government website'}], 'foreign_key_columns': [], 'primary_keys': ['district id']}]" +Find the name of the district which has greatest number of spokesmen.,SELECT t1.name FROM district AS t1 JOIN spokesman_district AS t2 ON t1.District_ID = t2.District_ID GROUP BY t2.District_ID ORDER BY count(*) DESC LIMIT 1,district_spokesman,"[{'table_name': 'district', 'table_schema': [{'col_name': 'district id'}, {'col_name': 'name'}, {'col_name': 'area km'}, {'col_name': 'population'}, {'col_name': 'density km'}, {'col_name': 'government website'}], 'foreign_key_columns': [], 'primary_keys': ['district id']}, {'table_name': 'spokesman district', 'table_schema': [{'col_name': 'spokesman id'}, {'col_name': 'district id'}, {'col_name': 'start year'}], 'foreign_key_columns': ['district id', 'spokesman id'], 'primary_keys': ['spokesman id']}]" +Find the names of spokesmen who have served some district before 2004.,SELECT t1.name FROM spokesman AS t1 JOIN spokesman_district AS t2 ON t1.Spokesman_ID = t2.Spokesman_ID WHERE t2.start_year < 2004,district_spokesman,"[{'table_name': 'spokesman', 'table_schema': [{'col_name': 'spokesman id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'speach title'}, {'col_name': 'rank position'}, {'col_name': 'points'}], 'foreign_key_columns': [], 'primary_keys': ['spokesman id']}, {'table_name': 'spokesman district', 'table_schema': [{'col_name': 'spokesman id'}, {'col_name': 'district id'}, {'col_name': 'start year'}], 'foreign_key_columns': ['district id', 'spokesman id'], 'primary_keys': ['spokesman id']}]" +"Find the number of spokesmen for each district, and the show district names as well.","SELECT t1.name , count(*) FROM district AS t1 JOIN spokesman_district AS t2 ON t1.District_ID = t2.District_ID GROUP BY t2.District_ID",district_spokesman,"[{'table_name': 'district', 'table_schema': [{'col_name': 'district id'}, {'col_name': 'name'}, {'col_name': 'area km'}, {'col_name': 'population'}, {'col_name': 'density km'}, {'col_name': 'government website'}], 'foreign_key_columns': [], 'primary_keys': ['district id']}, {'table_name': 'spokesman district', 'table_schema': [{'col_name': 'spokesman id'}, {'col_name': 'district id'}, {'col_name': 'start year'}], 'foreign_key_columns': ['district id', 'spokesman id'], 'primary_keys': ['spokesman id']}]" +Find the names of the districts which have had both spokesman with rank position 1 and 2.,SELECT t3.name FROM spokesman AS t1 JOIN spokesman_district AS t2 ON t1.Spokesman_ID = t2.Spokesman_ID JOIN district AS t3 ON t3.district_id = t2.district_id WHERE t1.rank_position = 1 INTERSECT SELECT t3.name FROM spokesman AS t1 JOIN spokesman_district AS t2 ON t1.Spokesman_ID = t2.Spokesman_ID JOIN district AS t3 ON t3.district_id = t2.district_id WHERE t1.rank_position = 2,district_spokesman,"[{'table_name': 'district', 'table_schema': [{'col_name': 'district id'}, {'col_name': 'name'}, {'col_name': 'area km'}, {'col_name': 'population'}, {'col_name': 'density km'}, {'col_name': 'government website'}], 'foreign_key_columns': [], 'primary_keys': ['district id']}, {'table_name': 'spokesman', 'table_schema': [{'col_name': 'spokesman id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'speach title'}, {'col_name': 'rank position'}, {'col_name': 'points'}], 'foreign_key_columns': [], 'primary_keys': ['spokesman id']}, {'table_name': 'spokesman district', 'table_schema': [{'col_name': 'spokesman id'}, {'col_name': 'district id'}, {'col_name': 'start year'}], 'foreign_key_columns': ['district id', 'spokesman id'], 'primary_keys': ['spokesman id']}]" +Find the names of districts which have more than one spokesman.,SELECT t1.name FROM district AS t1 JOIN spokesman_district AS t2 ON t1.District_ID = t2.District_ID GROUP BY t2.District_ID HAVING count(*) > 1,district_spokesman,"[{'table_name': 'district', 'table_schema': [{'col_name': 'district id'}, {'col_name': 'name'}, {'col_name': 'area km'}, {'col_name': 'population'}, {'col_name': 'density km'}, {'col_name': 'government website'}], 'foreign_key_columns': [], 'primary_keys': ['district id']}, {'table_name': 'spokesman district', 'table_schema': [{'col_name': 'spokesman id'}, {'col_name': 'district id'}, {'col_name': 'start year'}], 'foreign_key_columns': ['district id', 'spokesman id'], 'primary_keys': ['spokesman id']}]" +Find the number of districts which have no spokesmen.,SELECT count(*) FROM district WHERE district_id NOT IN (SELECT district_id FROM spokesman_district),district_spokesman,"[{'table_name': 'district', 'table_schema': [{'col_name': 'district id'}, {'col_name': 'name'}, {'col_name': 'area km'}, {'col_name': 'population'}, {'col_name': 'density km'}, {'col_name': 'government website'}], 'foreign_key_columns': [], 'primary_keys': ['district id']}, {'table_name': 'spokesman district', 'table_schema': [{'col_name': 'spokesman id'}, {'col_name': 'district id'}, {'col_name': 'start year'}], 'foreign_key_columns': ['district id', 'spokesman id'], 'primary_keys': ['spokesman id']}]" +Find the name of spokesmen who do not speak for any district.,SELECT name FROM spokesman WHERE Spokesman_ID NOT IN (SELECT Spokesman_ID FROM spokesman_district),district_spokesman,"[{'table_name': 'spokesman', 'table_schema': [{'col_name': 'spokesman id'}, {'col_name': 'name'}, {'col_name': 'age'}, {'col_name': 'speach title'}, {'col_name': 'rank position'}, {'col_name': 'points'}], 'foreign_key_columns': [], 'primary_keys': ['spokesman id']}, {'table_name': 'spokesman district', 'table_schema': [{'col_name': 'spokesman id'}, {'col_name': 'district id'}, {'col_name': 'start year'}], 'foreign_key_columns': ['district id', 'spokesman id'], 'primary_keys': ['spokesman id']}]" +Find the total and average population of the districts which have some spokesman.,"SELECT sum(population) , avg(population) FROM district WHERE district_id IN (SELECT district_id FROM spokesman_district)",district_spokesman,"[{'table_name': 'district', 'table_schema': [{'col_name': 'district id'}, {'col_name': 'name'}, {'col_name': 'area km'}, {'col_name': 'population'}, {'col_name': 'density km'}, {'col_name': 'government website'}], 'foreign_key_columns': [], 'primary_keys': ['district id']}, {'table_name': 'spokesman district', 'table_schema': [{'col_name': 'spokesman id'}, {'col_name': 'district id'}, {'col_name': 'start year'}], 'foreign_key_columns': ['district id', 'spokesman id'], 'primary_keys': ['spokesman id']}]" What is the title of the sculpture that was created in the most recent year ?,select title from sculptures order by year desc limit 1,art_1,"[{'table_name': 'sculptures', 'table_schema': [{'col_name': 'sculpture id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'medium'}, {'col_name': 'location'}, {'col_name': 'sculptor id'}], 'foreign_key_columns': ['sculptor id'], 'primary_keys': ['sculpture id']}]" What is the name of the scuplture that was created most recently ?,select title from sculptures order by year desc limit 1,art_1,"[{'table_name': 'sculptures', 'table_schema': [{'col_name': 'sculpture id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'medium'}, {'col_name': 'location'}, {'col_name': 'sculptor id'}], 'foreign_key_columns': ['sculptor id'], 'primary_keys': ['sculpture id']}]" What is the title and location of the oldest painting ?,"select title , location from paintings order by year limit 1",art_1,"[{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'primary_keys': ['painting id']}]" @@ -1369,76 +1369,76 @@ What is the average justice scores among countries?,SELECT avg(justice_score) FR Give the average justice scores across all countries.,SELECT avg(justice_score) FROM countries,country_language,"[{'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" "What are the maximum and minimum health scores among countries that are not ""Norway"".","SELECT max(health_score) , min(health_score) FROM countries WHERE name != ""Norway""",country_language,"[{'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" Return the maximum and minimum health scores across all countries other than Norway.,"SELECT max(health_score) , min(health_score) FROM countries WHERE name != ""Norway""",country_language,"[{'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -How many different official languages are there?,SELECT count(DISTINCT language_id) FROM official_languages,country_language,[] -Count the number of different official languages.,SELECT count(DISTINCT language_id) FROM official_languages,country_language,[] +How many different official languages are there?,SELECT count(DISTINCT language_id) FROM official_languages,country_language,"[{'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +Count the number of different official languages.,SELECT count(DISTINCT language_id) FROM official_languages,country_language,"[{'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" List names of countries in descending order of education_score.,SELECT name FROM countries ORDER BY education_score DESC,country_language,"[{'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" "What are the names of the countries, ordered descending by education score?",SELECT name FROM countries ORDER BY education_score DESC,country_language,"[{'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" List the name of the country with the biggest score in politics.,SELECT name FROM countries ORDER BY politics_score DESC LIMIT 1,country_language,"[{'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" What is the name of the country with the highest politics score?,SELECT name FROM countries ORDER BY politics_score DESC LIMIT 1,country_language,"[{'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -Show the names of countries and their official languages.,"SELECT T1.name , T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id",country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -"What are the names of the countries, as well as the names of their official langauges?","SELECT T1.name , T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id",country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -Show the official languages and the number of countries speaking each language.,"SELECT T2.name , COUNT(*) FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.name",country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -"What are the names of the different official languages, as well as the number of countries that speak each?","SELECT T2.name , COUNT(*) FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.name",country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -Show the official language spoken by the most number of countries.,SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1,country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What is the official language that is most common?,SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1,country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -Show the official languages spoken by at least two countries.,SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.id HAVING COUNT(*) >= 2,country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -Which official languages are spoken in two or more countries?,SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.id HAVING COUNT(*) >= 2,country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -"Show the average overall scores of countries whose official language is ""English"".","SELECT avg(T1.overall_score) FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id WHERE T3.name = ""English""",country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What is the average overall score across countries with English as their official language?,"SELECT avg(T1.overall_score) FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id WHERE T3.name = ""English""",country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -Show the three official languages that are most commonly spoken.,SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 3,country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What are the names of the three official languages spoken in the most countries?,SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 3,country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -Show the official languages sorted in descending order by the average overall scores among countries speaking them.,SELECT T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id GROUP BY T3.id ORDER BY avg(T1.overall_score) DESC,country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -"What are the names of the official languages, sorted descending by the average overall scores across the countries that correspond to each?",SELECT T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id GROUP BY T3.id ORDER BY avg(T1.overall_score) DESC,country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -Show the name of the country that has the greatest number of official languages.,SELECT T1.Name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1,country_language,"[{'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -Which country has the greatest number of official languages?,SELECT T1.Name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1,country_language,"[{'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -List the names of languages that are not the official language of any countries.,SELECT name FROM languages WHERE id NOT IN (SELECT language_id FROM official_languages),country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What are the names of languages that are not the official language of any country?,SELECT name FROM languages WHERE id NOT IN (SELECT language_id FROM official_languages),country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -List the names of countries that do not have any official language.,SELECT name FROM countries WHERE id NOT IN (SELECT country_id FROM official_languages),country_language,"[{'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What are the names of countries that do not have an official language?,SELECT name FROM countries WHERE id NOT IN (SELECT country_id FROM official_languages),country_language,"[{'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -Show the names of languages that are the official language for both countries with overall score greater than 95 and countries with overall score less than than 90.,SELECT T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id WHERE T1.overall_score > 95 INTERSECT SELECT T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id WHERE T1.overall_score < 90,country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -"What are the names of languages that are the official language not only for countries that have an overall score of above 95, but also for countries that have an overall score below 90?",SELECT T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id WHERE T1.overall_score > 95 INTERSECT SELECT T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id WHERE T1.overall_score < 90,country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" +Show the names of countries and their official languages.,"SELECT T1.name , T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id",country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +"What are the names of the countries, as well as the names of their official langauges?","SELECT T1.name , T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id",country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +Show the official languages and the number of countries speaking each language.,"SELECT T2.name , COUNT(*) FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.name",country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +"What are the names of the different official languages, as well as the number of countries that speak each?","SELECT T2.name , COUNT(*) FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.name",country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +Show the official language spoken by the most number of countries.,SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1,country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +What is the official language that is most common?,SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1,country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +Show the official languages spoken by at least two countries.,SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.id HAVING COUNT(*) >= 2,country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +Which official languages are spoken in two or more countries?,SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.id HAVING COUNT(*) >= 2,country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +"Show the average overall scores of countries whose official language is ""English"".","SELECT avg(T1.overall_score) FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id WHERE T3.name = ""English""",country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +What is the average overall score across countries with English as their official language?,"SELECT avg(T1.overall_score) FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id WHERE T3.name = ""English""",country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +Show the three official languages that are most commonly spoken.,SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 3,country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +What are the names of the three official languages spoken in the most countries?,SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 3,country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +Show the official languages sorted in descending order by the average overall scores among countries speaking them.,SELECT T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id GROUP BY T3.id ORDER BY avg(T1.overall_score) DESC,country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +"What are the names of the official languages, sorted descending by the average overall scores across the countries that correspond to each?",SELECT T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id GROUP BY T3.id ORDER BY avg(T1.overall_score) DESC,country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +Show the name of the country that has the greatest number of official languages.,SELECT T1.Name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1,country_language,"[{'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +Which country has the greatest number of official languages?,SELECT T1.Name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1,country_language,"[{'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +List the names of languages that are not the official language of any countries.,SELECT name FROM languages WHERE id NOT IN (SELECT language_id FROM official_languages),country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +What are the names of languages that are not the official language of any country?,SELECT name FROM languages WHERE id NOT IN (SELECT language_id FROM official_languages),country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +List the names of countries that do not have any official language.,SELECT name FROM countries WHERE id NOT IN (SELECT country_id FROM official_languages),country_language,"[{'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +What are the names of countries that do not have an official language?,SELECT name FROM countries WHERE id NOT IN (SELECT country_id FROM official_languages),country_language,"[{'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +Show the names of languages that are the official language for both countries with overall score greater than 95 and countries with overall score less than than 90.,SELECT T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id WHERE T1.overall_score > 95 INTERSECT SELECT T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id WHERE T1.overall_score < 90,country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" +"What are the names of languages that are the official language not only for countries that have an overall score of above 95, but also for countries that have an overall score below 90?",SELECT T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id WHERE T1.overall_score > 95 INTERSECT SELECT T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id WHERE T1.overall_score < 90,country_language,"[{'table_name': 'languages', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'countries', 'table_schema': [{'col_name': 'id'}, {'col_name': 'name'}, {'col_name': 'overall score'}, {'col_name': 'justice score'}, {'col_name': 'health score'}, {'col_name': 'education score'}, {'col_name': 'economics score'}, {'col_name': 'politics score'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'official languages', 'table_schema': [{'col_name': 'language id'}, {'col_name': 'country id'}], 'foreign_key_columns': ['country id', 'language id'], 'primary_keys': ['language id']}]" Which countries and cities are included in addresses?,"SELECT country , town_city FROM Addresses;",real_estate_rentals,"[{'table_name': 'addresses', 'table_schema': [{'col_name': 'address id'}, {'col_name': 'line 1 number building'}, {'col_name': 'line 2 number street'}, {'col_name': 'line 3 area locality'}, {'col_name': 'town city'}, {'col_name': 'zip postcode'}, {'col_name': 'county state province'}, {'col_name': 'country'}, {'col_name': 'other address details'}], 'foreign_key_columns': [], 'primary_keys': ['address id']}]" What are the countries and cities for each address?,"SELECT country , town_city FROM Addresses;",real_estate_rentals,"[{'table_name': 'addresses', 'table_schema': [{'col_name': 'address id'}, {'col_name': 'line 1 number building'}, {'col_name': 'line 2 number street'}, {'col_name': 'line 3 area locality'}, {'col_name': 'town city'}, {'col_name': 'zip postcode'}, {'col_name': 'county state province'}, {'col_name': 'country'}, {'col_name': 'other address details'}], 'foreign_key_columns': [], 'primary_keys': ['address id']}]" In which states are each of the the properties located?,SELECT DISTINCT T1.county_state_province FROM Addresses AS T1 JOIN Properties AS T2 ON T1.address_id = T2.property_address_id;,real_estate_rentals,"[{'table_name': 'addresses', 'table_schema': [{'col_name': 'address id'}, {'col_name': 'line 1 number building'}, {'col_name': 'line 2 number street'}, {'col_name': 'line 3 area locality'}, {'col_name': 'town city'}, {'col_name': 'zip postcode'}, {'col_name': 'county state province'}, {'col_name': 'country'}, {'col_name': 'other address details'}], 'foreign_key_columns': [], 'primary_keys': ['address id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" Give the states or provinces corresponding to each property.,SELECT DISTINCT T1.county_state_province FROM Addresses AS T1 JOIN Properties AS T2 ON T1.address_id = T2.property_address_id;,real_estate_rentals,"[{'table_name': 'addresses', 'table_schema': [{'col_name': 'address id'}, {'col_name': 'line 1 number building'}, {'col_name': 'line 2 number street'}, {'col_name': 'line 3 area locality'}, {'col_name': 'town city'}, {'col_name': 'zip postcode'}, {'col_name': 'county state province'}, {'col_name': 'country'}, {'col_name': 'other address details'}], 'foreign_key_columns': [], 'primary_keys': ['address id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" How is the feature rooftop described?,SELECT feature_description FROM Features WHERE feature_name = 'rooftop';,real_estate_rentals,"[{'table_name': 'features', 'table_schema': [{'col_name': 'feature id'}, {'col_name': 'feature name'}, {'col_name': 'feature description'}], 'foreign_key_columns': [], 'primary_keys': ['feature id']}]" Return the description of the feature 'rooftop'.,SELECT feature_description FROM Features WHERE feature_name = 'rooftop';,real_estate_rentals,"[{'table_name': 'features', 'table_schema': [{'col_name': 'feature id'}, {'col_name': 'feature name'}, {'col_name': 'feature description'}], 'foreign_key_columns': [], 'primary_keys': ['feature id']}]" -What are the feature name and description of the most commonly seen feature across properties?,"SELECT T1.feature_name , T1.feature_description FROM Features AS T1 JOIN Property_Features AS T2 ON T1.feature_id = T2.feature_id GROUP BY T1.feature_name ORDER BY count(*) DESC LIMIT 1;",real_estate_rentals,"[{'table_name': 'features', 'table_schema': [{'col_name': 'feature id'}, {'col_name': 'feature name'}, {'col_name': 'feature description'}], 'foreign_key_columns': [], 'primary_keys': ['feature id']}]" -Give the feature name and description for the most common feature across all properties.,"SELECT T1.feature_name , T1.feature_description FROM Features AS T1 JOIN Property_Features AS T2 ON T1.feature_id = T2.feature_id GROUP BY T1.feature_name ORDER BY count(*) DESC LIMIT 1;",real_estate_rentals,"[{'table_name': 'features', 'table_schema': [{'col_name': 'feature id'}, {'col_name': 'feature name'}, {'col_name': 'feature description'}], 'foreign_key_columns': [], 'primary_keys': ['feature id']}]" +What are the feature name and description of the most commonly seen feature across properties?,"SELECT T1.feature_name , T1.feature_description FROM Features AS T1 JOIN Property_Features AS T2 ON T1.feature_id = T2.feature_id GROUP BY T1.feature_name ORDER BY count(*) DESC LIMIT 1;",real_estate_rentals,"[{'table_name': 'features', 'table_schema': [{'col_name': 'feature id'}, {'col_name': 'feature name'}, {'col_name': 'feature description'}], 'foreign_key_columns': [], 'primary_keys': ['feature id']}, {'table_name': 'property features', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'feature id'}, {'col_name': 'feature value'}, {'col_name': 'property feature description'}], 'foreign_key_columns': ['property id', 'feature id'], 'primary_keys': []}]" +Give the feature name and description for the most common feature across all properties.,"SELECT T1.feature_name , T1.feature_description FROM Features AS T1 JOIN Property_Features AS T2 ON T1.feature_id = T2.feature_id GROUP BY T1.feature_name ORDER BY count(*) DESC LIMIT 1;",real_estate_rentals,"[{'table_name': 'features', 'table_schema': [{'col_name': 'feature id'}, {'col_name': 'feature name'}, {'col_name': 'feature description'}], 'foreign_key_columns': [], 'primary_keys': ['feature id']}, {'table_name': 'property features', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'feature id'}, {'col_name': 'feature value'}, {'col_name': 'property feature description'}], 'foreign_key_columns': ['property id', 'feature id'], 'primary_keys': []}]" What is the minimum number of rooms in a property?,SELECT min(room_count) FROM Properties;,real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" What is the lowest room count across all the properties?,SELECT min(room_count) FROM Properties;,real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" How many properties have 1 parking lot or 1 garage?,SELECT count(*) FROM Properties WHERE parking_lots = 1 OR garage_yn = 1;,real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" Count the number of properties that have 1 parking lot or 1 garage.,SELECT count(*) FROM Properties WHERE parking_lots = 1 OR garage_yn = 1;,real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" -"For users whose description contain the string 'Mother', which age categories are they in?","SELECT T2.age_category_code FROM Ref_User_Categories AS T1 JOIN Users AS T2 ON T1.user_category_code = T2.user_category_code WHERE T1.User_category_description LIKE ""%Mother"";",real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}]" -What are the age categories for users whose description contains the string Mother?,"SELECT T2.age_category_code FROM Ref_User_Categories AS T1 JOIN Users AS T2 ON T1.user_category_code = T2.user_category_code WHERE T1.User_category_description LIKE ""%Mother"";",real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}]" +"For users whose description contain the string 'Mother', which age categories are they in?","SELECT T2.age_category_code FROM Ref_User_Categories AS T1 JOIN Users AS T2 ON T1.user_category_code = T2.user_category_code WHERE T1.User_category_description LIKE ""%Mother"";",real_estate_rentals,"[{'table_name': 'ref user categories', 'table_schema': [{'col_name': 'user category code'}, {'col_name': 'user category description'}], 'foreign_key_columns': [], 'primary_keys': ['user category code']}, {'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}]" +What are the age categories for users whose description contains the string Mother?,"SELECT T2.age_category_code FROM Ref_User_Categories AS T1 JOIN Users AS T2 ON T1.user_category_code = T2.user_category_code WHERE T1.User_category_description LIKE ""%Mother"";",real_estate_rentals,"[{'table_name': 'ref user categories', 'table_schema': [{'col_name': 'user category code'}, {'col_name': 'user category description'}], 'foreign_key_columns': [], 'primary_keys': ['user category code']}, {'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}]" What is the first name of the user who owns the greatest number of properties?,SELECT T1.first_name FROM Users AS T1 JOIN Properties AS T2 ON T2.owner_user_id = T1.User_id GROUP BY T1.User_id ORDER BY count(*) DESC LIMIT 1;,real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" Return the first name of the user who owns the most properties.,SELECT T1.first_name FROM Users AS T1 JOIN Properties AS T2 ON T2.owner_user_id = T1.User_id GROUP BY T1.User_id ORDER BY count(*) DESC LIMIT 1;,real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" -List the average room count of the properties with gardens.,SELECT avg(T3.room_count) FROM Property_Features AS T1 JOIN Features AS T2 ON T1.feature_id = T2.feature_id JOIN Properties AS T3 ON T1.property_id = T3.property_id WHERE T2.feature_name = 'garden';,real_estate_rentals,"[{'table_name': 'features', 'table_schema': [{'col_name': 'feature id'}, {'col_name': 'feature name'}, {'col_name': 'feature description'}], 'foreign_key_columns': [], 'primary_keys': ['feature id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" -"On average, how many rooms do properties with garden features have?",SELECT avg(T3.room_count) FROM Property_Features AS T1 JOIN Features AS T2 ON T1.feature_id = T2.feature_id JOIN Properties AS T3 ON T1.property_id = T3.property_id WHERE T2.feature_name = 'garden';,real_estate_rentals,"[{'table_name': 'features', 'table_schema': [{'col_name': 'feature id'}, {'col_name': 'feature name'}, {'col_name': 'feature description'}], 'foreign_key_columns': [], 'primary_keys': ['feature id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" -In which cities are there any properties equipped with a swimming pool?,SELECT T2.town_city FROM Properties AS T1 JOIN Addresses AS T2 ON T1.property_address_id = T2.address_id JOIN Property_Features AS T3 ON T1.property_id = T3.property_id JOIN Features AS T4 ON T4.feature_id = T3.feature_id WHERE T4.feature_name = 'swimming pool';,real_estate_rentals,"[{'table_name': 'addresses', 'table_schema': [{'col_name': 'address id'}, {'col_name': 'line 1 number building'}, {'col_name': 'line 2 number street'}, {'col_name': 'line 3 area locality'}, {'col_name': 'town city'}, {'col_name': 'zip postcode'}, {'col_name': 'county state province'}, {'col_name': 'country'}, {'col_name': 'other address details'}], 'foreign_key_columns': [], 'primary_keys': ['address id']}, {'table_name': 'features', 'table_schema': [{'col_name': 'feature id'}, {'col_name': 'feature name'}, {'col_name': 'feature description'}], 'foreign_key_columns': [], 'primary_keys': ['feature id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" -Return the cities in which there exist properties that have swimming pools.,SELECT T2.town_city FROM Properties AS T1 JOIN Addresses AS T2 ON T1.property_address_id = T2.address_id JOIN Property_Features AS T3 ON T1.property_id = T3.property_id JOIN Features AS T4 ON T4.feature_id = T3.feature_id WHERE T4.feature_name = 'swimming pool';,real_estate_rentals,"[{'table_name': 'addresses', 'table_schema': [{'col_name': 'address id'}, {'col_name': 'line 1 number building'}, {'col_name': 'line 2 number street'}, {'col_name': 'line 3 area locality'}, {'col_name': 'town city'}, {'col_name': 'zip postcode'}, {'col_name': 'county state province'}, {'col_name': 'country'}, {'col_name': 'other address details'}], 'foreign_key_columns': [], 'primary_keys': ['address id']}, {'table_name': 'features', 'table_schema': [{'col_name': 'feature id'}, {'col_name': 'feature name'}, {'col_name': 'feature description'}], 'foreign_key_columns': [], 'primary_keys': ['feature id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" +List the average room count of the properties with gardens.,SELECT avg(T3.room_count) FROM Property_Features AS T1 JOIN Features AS T2 ON T1.feature_id = T2.feature_id JOIN Properties AS T3 ON T1.property_id = T3.property_id WHERE T2.feature_name = 'garden';,real_estate_rentals,"[{'table_name': 'features', 'table_schema': [{'col_name': 'feature id'}, {'col_name': 'feature name'}, {'col_name': 'feature description'}], 'foreign_key_columns': [], 'primary_keys': ['feature id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}, {'table_name': 'property features', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'feature id'}, {'col_name': 'feature value'}, {'col_name': 'property feature description'}], 'foreign_key_columns': ['property id', 'feature id'], 'primary_keys': []}]" +"On average, how many rooms do properties with garden features have?",SELECT avg(T3.room_count) FROM Property_Features AS T1 JOIN Features AS T2 ON T1.feature_id = T2.feature_id JOIN Properties AS T3 ON T1.property_id = T3.property_id WHERE T2.feature_name = 'garden';,real_estate_rentals,"[{'table_name': 'features', 'table_schema': [{'col_name': 'feature id'}, {'col_name': 'feature name'}, {'col_name': 'feature description'}], 'foreign_key_columns': [], 'primary_keys': ['feature id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}, {'table_name': 'property features', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'feature id'}, {'col_name': 'feature value'}, {'col_name': 'property feature description'}], 'foreign_key_columns': ['property id', 'feature id'], 'primary_keys': []}]" +In which cities are there any properties equipped with a swimming pool?,SELECT T2.town_city FROM Properties AS T1 JOIN Addresses AS T2 ON T1.property_address_id = T2.address_id JOIN Property_Features AS T3 ON T1.property_id = T3.property_id JOIN Features AS T4 ON T4.feature_id = T3.feature_id WHERE T4.feature_name = 'swimming pool';,real_estate_rentals,"[{'table_name': 'addresses', 'table_schema': [{'col_name': 'address id'}, {'col_name': 'line 1 number building'}, {'col_name': 'line 2 number street'}, {'col_name': 'line 3 area locality'}, {'col_name': 'town city'}, {'col_name': 'zip postcode'}, {'col_name': 'county state province'}, {'col_name': 'country'}, {'col_name': 'other address details'}], 'foreign_key_columns': [], 'primary_keys': ['address id']}, {'table_name': 'features', 'table_schema': [{'col_name': 'feature id'}, {'col_name': 'feature name'}, {'col_name': 'feature description'}], 'foreign_key_columns': [], 'primary_keys': ['feature id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}, {'table_name': 'property features', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'feature id'}, {'col_name': 'feature value'}, {'col_name': 'property feature description'}], 'foreign_key_columns': ['property id', 'feature id'], 'primary_keys': []}]" +Return the cities in which there exist properties that have swimming pools.,SELECT T2.town_city FROM Properties AS T1 JOIN Addresses AS T2 ON T1.property_address_id = T2.address_id JOIN Property_Features AS T3 ON T1.property_id = T3.property_id JOIN Features AS T4 ON T4.feature_id = T3.feature_id WHERE T4.feature_name = 'swimming pool';,real_estate_rentals,"[{'table_name': 'addresses', 'table_schema': [{'col_name': 'address id'}, {'col_name': 'line 1 number building'}, {'col_name': 'line 2 number street'}, {'col_name': 'line 3 area locality'}, {'col_name': 'town city'}, {'col_name': 'zip postcode'}, {'col_name': 'county state province'}, {'col_name': 'country'}, {'col_name': 'other address details'}], 'foreign_key_columns': [], 'primary_keys': ['address id']}, {'table_name': 'features', 'table_schema': [{'col_name': 'feature id'}, {'col_name': 'feature name'}, {'col_name': 'feature description'}], 'foreign_key_columns': [], 'primary_keys': ['feature id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}, {'table_name': 'property features', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'feature id'}, {'col_name': 'feature value'}, {'col_name': 'property feature description'}], 'foreign_key_columns': ['property id', 'feature id'], 'primary_keys': []}]" Which property had the lowest price requested by the vendor? List the id and the price.,"SELECT property_id , vendor_requested_price FROM Properties ORDER BY vendor_requested_price LIMIT 1;",real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" "What is the id of the property that had the lowest requested price from the vendor, and what was that price?","SELECT property_id , vendor_requested_price FROM Properties ORDER BY vendor_requested_price LIMIT 1;",real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" "On average, how many rooms does a property have?",SELECT avg(room_count) FROM Properties;,real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" What is the average number of rooms in a property?,SELECT avg(room_count) FROM Properties;,real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" How many kinds of room sizes are listed?,SELECT count(DISTINCT room_size) FROM Rooms;,real_estate_rentals,"[{'table_name': 'rooms', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'room number'}, {'col_name': 'room type code'}, {'col_name': 'room size'}, {'col_name': 'other room details'}], 'foreign_key_columns': ['room type code', 'property id'], 'primary_keys': []}]" Return the number of different room sizes.,SELECT count(DISTINCT room_size) FROM Rooms;,real_estate_rentals,"[{'table_name': 'rooms', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'room number'}, {'col_name': 'room type code'}, {'col_name': 'room size'}, {'col_name': 'other room details'}], 'foreign_key_columns': ['room type code', 'property id'], 'primary_keys': []}]" -"What are the ids of users who have searched at least twice, and what did they search?","SELECT search_seq , user_id FROM User_Searches GROUP BY user_id HAVING count(*) >= 2;",real_estate_rentals,[] -"Return the ids of users who have performed two or more searches, as well as their search sequence.","SELECT search_seq , user_id FROM User_Searches GROUP BY user_id HAVING count(*) >= 2;",real_estate_rentals,[] -When was the time of the latest search by a user?,SELECT max(search_datetime) FROM User_Searches;,real_estate_rentals,[] -What was the time of the most recent search?,SELECT max(search_datetime) FROM User_Searches;,real_estate_rentals,[] -What are all the user searches time and content? Sort the result descending by content.,"SELECT search_datetime , search_string FROM User_Searches ORDER BY search_string DESC;",real_estate_rentals,[] -"Return the search strings and corresonding time stamps for all user searches, sorted by search string descending.","SELECT search_datetime , search_string FROM User_Searches ORDER BY search_string DESC;",real_estate_rentals,[] +"What are the ids of users who have searched at least twice, and what did they search?","SELECT search_seq , user_id FROM User_Searches GROUP BY user_id HAVING count(*) >= 2;",real_estate_rentals,"[{'table_name': 'user searches', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'search seq'}, {'col_name': 'search datetime'}, {'col_name': 'search string'}], 'foreign_key_columns': ['user id'], 'primary_keys': []}]" +"Return the ids of users who have performed two or more searches, as well as their search sequence.","SELECT search_seq , user_id FROM User_Searches GROUP BY user_id HAVING count(*) >= 2;",real_estate_rentals,"[{'table_name': 'user searches', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'search seq'}, {'col_name': 'search datetime'}, {'col_name': 'search string'}], 'foreign_key_columns': ['user id'], 'primary_keys': []}]" +When was the time of the latest search by a user?,SELECT max(search_datetime) FROM User_Searches;,real_estate_rentals,"[{'table_name': 'user searches', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'search seq'}, {'col_name': 'search datetime'}, {'col_name': 'search string'}], 'foreign_key_columns': ['user id'], 'primary_keys': []}]" +What was the time of the most recent search?,SELECT max(search_datetime) FROM User_Searches;,real_estate_rentals,"[{'table_name': 'user searches', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'search seq'}, {'col_name': 'search datetime'}, {'col_name': 'search string'}], 'foreign_key_columns': ['user id'], 'primary_keys': []}]" +What are all the user searches time and content? Sort the result descending by content.,"SELECT search_datetime , search_string FROM User_Searches ORDER BY search_string DESC;",real_estate_rentals,"[{'table_name': 'user searches', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'search seq'}, {'col_name': 'search datetime'}, {'col_name': 'search string'}], 'foreign_key_columns': ['user id'], 'primary_keys': []}]" +"Return the search strings and corresonding time stamps for all user searches, sorted by search string descending.","SELECT search_datetime , search_string FROM User_Searches ORDER BY search_string DESC;",real_estate_rentals,"[{'table_name': 'user searches', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'search seq'}, {'col_name': 'search datetime'}, {'col_name': 'search string'}], 'foreign_key_columns': ['user id'], 'primary_keys': []}]" What are the zip codes of properties which do not belong to users who own at most 2 properties?,SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Properties AS T2 ON T1.address_id = T2.property_address_id WHERE T2.owner_user_id NOT IN ( SELECT owner_user_id FROM Properties GROUP BY owner_user_id HAVING count(*) <= 2 );,real_estate_rentals,"[{'table_name': 'addresses', 'table_schema': [{'col_name': 'address id'}, {'col_name': 'line 1 number building'}, {'col_name': 'line 2 number street'}, {'col_name': 'line 3 area locality'}, {'col_name': 'town city'}, {'col_name': 'zip postcode'}, {'col_name': 'county state province'}, {'col_name': 'country'}, {'col_name': 'other address details'}], 'foreign_key_columns': [], 'primary_keys': ['address id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" Return the zip codes for properties not belonging to users who own two or fewer properties.,SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Properties AS T2 ON T1.address_id = T2.property_address_id WHERE T2.owner_user_id NOT IN ( SELECT owner_user_id FROM Properties GROUP BY owner_user_id HAVING count(*) <= 2 );,real_estate_rentals,"[{'table_name': 'addresses', 'table_schema': [{'col_name': 'address id'}, {'col_name': 'line 1 number building'}, {'col_name': 'line 2 number street'}, {'col_name': 'line 3 area locality'}, {'col_name': 'town city'}, {'col_name': 'zip postcode'}, {'col_name': 'county state province'}, {'col_name': 'country'}, {'col_name': 'other address details'}], 'foreign_key_columns': [], 'primary_keys': ['address id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" -What are the users making only one search? List both category and user id.,"SELECT T1.user_category_code , T1.user_id FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id = T2.user_id GROUP BY T1.user_id HAVING count(*) = 1;",real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}]" -"What are the ids of users who have only made one search, and what are their category codes?","SELECT T1.user_category_code , T1.user_id FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id = T2.user_id GROUP BY T1.user_id HAVING count(*) = 1;",real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}]" -What is the age range category of the user who made the first search?,SELECT T1.age_category_code FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id = T2.user_id ORDER BY T2.search_datetime LIMIT 1;,real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}]" -Return the age category for the user who made the earliest search.,SELECT T1.age_category_code FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id = T2.user_id ORDER BY T2.search_datetime LIMIT 1;,real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}]" +What are the users making only one search? List both category and user id.,"SELECT T1.user_category_code , T1.user_id FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id = T2.user_id GROUP BY T1.user_id HAVING count(*) = 1;",real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}, {'table_name': 'user searches', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'search seq'}, {'col_name': 'search datetime'}, {'col_name': 'search string'}], 'foreign_key_columns': ['user id'], 'primary_keys': []}]" +"What are the ids of users who have only made one search, and what are their category codes?","SELECT T1.user_category_code , T1.user_id FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id = T2.user_id GROUP BY T1.user_id HAVING count(*) = 1;",real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}, {'table_name': 'user searches', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'search seq'}, {'col_name': 'search datetime'}, {'col_name': 'search string'}], 'foreign_key_columns': ['user id'], 'primary_keys': []}]" +What is the age range category of the user who made the first search?,SELECT T1.age_category_code FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id = T2.user_id ORDER BY T2.search_datetime LIMIT 1;,real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}, {'table_name': 'user searches', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'search seq'}, {'col_name': 'search datetime'}, {'col_name': 'search string'}], 'foreign_key_columns': ['user id'], 'primary_keys': []}]" +Return the age category for the user who made the earliest search.,SELECT T1.age_category_code FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id = T2.user_id ORDER BY T2.search_datetime LIMIT 1;,real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}, {'table_name': 'user searches', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'search seq'}, {'col_name': 'search datetime'}, {'col_name': 'search string'}], 'foreign_key_columns': ['user id'], 'primary_keys': []}]" Find the login names of all senior citizen users ordered by their first names.,SELECT login_name FROM Users WHERE user_category_code = 'Senior Citizen' ORDER BY first_name,real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}]" "What are the login names of all senior citizens, sorted by first name?",SELECT login_name FROM Users WHERE user_category_code = 'Senior Citizen' ORDER BY first_name,real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}]" -How many searches do buyers make in total?,SELECT count(*) FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id = T2.user_id WHERE T1.is_buyer = 1;,real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}]" -Count the number of searches made by buyers.,SELECT count(*) FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id = T2.user_id WHERE T1.is_buyer = 1;,real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}]" +How many searches do buyers make in total?,SELECT count(*) FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id = T2.user_id WHERE T1.is_buyer = 1;,real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}, {'table_name': 'user searches', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'search seq'}, {'col_name': 'search datetime'}, {'col_name': 'search string'}], 'foreign_key_columns': ['user id'], 'primary_keys': []}]" +Count the number of searches made by buyers.,SELECT count(*) FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id = T2.user_id WHERE T1.is_buyer = 1;,real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}, {'table_name': 'user searches', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'search seq'}, {'col_name': 'search datetime'}, {'col_name': 'search string'}], 'foreign_key_columns': ['user id'], 'primary_keys': []}]" When did the user with login name ratione register?,SELECT date_registered FROM Users WHERE login_name = 'ratione';,real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}]" What was the registration date for the user whose login name is ratione?,SELECT date_registered FROM Users WHERE login_name = 'ratione';,real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}]" "List the first name, middle name and last name, and log in name of all the seller users, whose seller value is 1.","SELECT first_name , middle_name , last_name , login_name FROM Users WHERE is_seller = 1;",real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}]" @@ -1447,45 +1447,45 @@ What was the registration date for the user whose login name is ratione?,SELECT "What are the buildings, streets, and cities corresponding to the addresses of senior citizens?","SELECT T1.line_1_number_building , T1.line_2_number_street , T1.town_city FROM Addresses AS T1 JOIN Users AS T2 ON T1.address_id = T2.user_address_id WHERE T2.user_category_code = 'Senior Citizen';",real_estate_rentals,"[{'table_name': 'addresses', 'table_schema': [{'col_name': 'address id'}, {'col_name': 'line 1 number building'}, {'col_name': 'line 2 number street'}, {'col_name': 'line 3 area locality'}, {'col_name': 'town city'}, {'col_name': 'zip postcode'}, {'col_name': 'county state province'}, {'col_name': 'country'}, {'col_name': 'other address details'}], 'foreign_key_columns': [], 'primary_keys': ['address id']}, {'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}]" How many properties are there with at least 2 features?,SELECT count(*) FROM Properties GROUP BY property_id HAVING count(*) >= 2;,real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" Count the number of properties with at least two features.,SELECT count(*) FROM Properties GROUP BY property_id HAVING count(*) >= 2;,real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" -How many photos does each property have?,"SELECT count(*) , property_id FROM Property_Photos GROUP BY property_id;",real_estate_rentals,[] -Count the number of property photos each property has by id.,"SELECT count(*) , property_id FROM Property_Photos GROUP BY property_id;",real_estate_rentals,[] -How many photos does each owner has of his or her properties? List user id and number of photos.,"SELECT T1.owner_user_id , count(*) FROM Properties AS T1 JOIN Property_Photos AS T2 ON T1.property_id = T2.property_id GROUP BY T1.owner_user_id;",real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" -"What are the user ids of property owners who have property photos, and how many do each of them have?","SELECT T1.owner_user_id , count(*) FROM Properties AS T1 JOIN Property_Photos AS T2 ON T1.property_id = T2.property_id GROUP BY T1.owner_user_id;",real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" +How many photos does each property have?,"SELECT count(*) , property_id FROM Property_Photos GROUP BY property_id;",real_estate_rentals,"[{'table_name': 'property photos', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'photo seq'}, {'col_name': 'photo title'}, {'col_name': 'photo description'}, {'col_name': 'photo filename'}], 'foreign_key_columns': ['property id'], 'primary_keys': []}]" +Count the number of property photos each property has by id.,"SELECT count(*) , property_id FROM Property_Photos GROUP BY property_id;",real_estate_rentals,"[{'table_name': 'property photos', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'photo seq'}, {'col_name': 'photo title'}, {'col_name': 'photo description'}, {'col_name': 'photo filename'}], 'foreign_key_columns': ['property id'], 'primary_keys': []}]" +How many photos does each owner has of his or her properties? List user id and number of photos.,"SELECT T1.owner_user_id , count(*) FROM Properties AS T1 JOIN Property_Photos AS T2 ON T1.property_id = T2.property_id GROUP BY T1.owner_user_id;",real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}, {'table_name': 'property photos', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'photo seq'}, {'col_name': 'photo title'}, {'col_name': 'photo description'}, {'col_name': 'photo filename'}], 'foreign_key_columns': ['property id'], 'primary_keys': []}]" +"What are the user ids of property owners who have property photos, and how many do each of them have?","SELECT T1.owner_user_id , count(*) FROM Properties AS T1 JOIN Property_Photos AS T2 ON T1.property_id = T2.property_id GROUP BY T1.owner_user_id;",real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}, {'table_name': 'property photos', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'photo seq'}, {'col_name': 'photo title'}, {'col_name': 'photo description'}, {'col_name': 'photo filename'}], 'foreign_key_columns': ['property id'], 'primary_keys': []}]" What is the total max price of the properties owned by single mothers or students?,SELECT sum(T1.price_max) FROM Properties AS T1 JOIN Users AS T2 ON T1.owner_user_id = T2.user_id WHERE T2.user_category_code = 'Single Mother' OR T2.user_category_code = 'Student';,real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" Give the total max price corresponding to any properties owned by single mothers or students.,SELECT sum(T1.price_max) FROM Properties AS T1 JOIN Users AS T2 ON T1.owner_user_id = T2.user_id WHERE T2.user_category_code = 'Single Mother' OR T2.user_category_code = 'Student';,real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" -"What are the date stamps and property names for each item of property history, ordered by date stamp?","SELECT T1.datestamp , T2.property_name FROM User_Property_History AS T1 JOIN Properties AS T2 ON T1.property_id = T2.property_id ORDER BY datestamp;",real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" -"Return the date stamp and property name for each property history event, sorted by date stamp.","SELECT T1.datestamp , T2.property_name FROM User_Property_History AS T1 JOIN Properties AS T2 ON T1.property_id = T2.property_id ORDER BY datestamp;",real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" -What is the description of the most common property type? List the description and code.,"SELECT T1.property_type_description , T1.property_type_code FROM Ref_Property_Types AS T1 JOIN Properties AS T2 ON T1.property_type_code = T2.property_type_code GROUP BY T1.property_type_code ORDER BY count(*) DESC LIMIT 1;",real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" -"What is the most common property type, and what is its description.","SELECT T1.property_type_description , T1.property_type_code FROM Ref_Property_Types AS T1 JOIN Properties AS T2 ON T1.property_type_code = T2.property_type_code GROUP BY T1.property_type_code ORDER BY count(*) DESC LIMIT 1;",real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" -What is the detailed description of the age category code 'Over 60'?,SELECT age_category_description FROM Ref_Age_Categories WHERE age_category_code = 'Over 60';,real_estate_rentals,[] -Give the category description of the age category 'Over 60'.,SELECT age_category_description FROM Ref_Age_Categories WHERE age_category_code = 'Over 60';,real_estate_rentals,[] +"What are the date stamps and property names for each item of property history, ordered by date stamp?","SELECT T1.datestamp , T2.property_name FROM User_Property_History AS T1 JOIN Properties AS T2 ON T1.property_id = T2.property_id ORDER BY datestamp;",real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}, {'table_name': 'user property history', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'property id'}, {'col_name': 'datestamp'}], 'foreign_key_columns': ['property id', 'user id'], 'primary_keys': []}]" +"Return the date stamp and property name for each property history event, sorted by date stamp.","SELECT T1.datestamp , T2.property_name FROM User_Property_History AS T1 JOIN Properties AS T2 ON T1.property_id = T2.property_id ORDER BY datestamp;",real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}, {'table_name': 'user property history', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'property id'}, {'col_name': 'datestamp'}], 'foreign_key_columns': ['property id', 'user id'], 'primary_keys': []}]" +What is the description of the most common property type? List the description and code.,"SELECT T1.property_type_description , T1.property_type_code FROM Ref_Property_Types AS T1 JOIN Properties AS T2 ON T1.property_type_code = T2.property_type_code GROUP BY T1.property_type_code ORDER BY count(*) DESC LIMIT 1;",real_estate_rentals,"[{'table_name': 'ref property types', 'table_schema': [{'col_name': 'property type code'}, {'col_name': 'property type description'}], 'foreign_key_columns': [], 'primary_keys': ['property type code']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" +"What is the most common property type, and what is its description.","SELECT T1.property_type_description , T1.property_type_code FROM Ref_Property_Types AS T1 JOIN Properties AS T2 ON T1.property_type_code = T2.property_type_code GROUP BY T1.property_type_code ORDER BY count(*) DESC LIMIT 1;",real_estate_rentals,"[{'table_name': 'ref property types', 'table_schema': [{'col_name': 'property type code'}, {'col_name': 'property type description'}], 'foreign_key_columns': [], 'primary_keys': ['property type code']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" +What is the detailed description of the age category code 'Over 60'?,SELECT age_category_description FROM Ref_Age_Categories WHERE age_category_code = 'Over 60';,real_estate_rentals,"[{'table_name': 'ref age categories', 'table_schema': [{'col_name': 'age category code'}, {'col_name': 'age category description'}], 'foreign_key_columns': [], 'primary_keys': ['age category code']}]" +Give the category description of the age category 'Over 60'.,SELECT age_category_description FROM Ref_Age_Categories WHERE age_category_code = 'Over 60';,real_estate_rentals,"[{'table_name': 'ref age categories', 'table_schema': [{'col_name': 'age category code'}, {'col_name': 'age category description'}], 'foreign_key_columns': [], 'primary_keys': ['age category code']}]" "What are the different room sizes, and how many of each are there?","SELECT room_size , count(*) FROM Rooms GROUP BY room_size",real_estate_rentals,"[{'table_name': 'rooms', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'room number'}, {'col_name': 'room type code'}, {'col_name': 'room size'}, {'col_name': 'other room details'}], 'foreign_key_columns': ['room type code', 'property id'], 'primary_keys': []}]" Return the number of rooms with each different room size.,"SELECT room_size , count(*) FROM Rooms GROUP BY room_size",real_estate_rentals,"[{'table_name': 'rooms', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'room number'}, {'col_name': 'room type code'}, {'col_name': 'room size'}, {'col_name': 'other room details'}], 'foreign_key_columns': ['room type code', 'property id'], 'primary_keys': []}]" In which country does the user with first name Robbie live?,SELECT T1.country FROM Addresses AS T1 JOIN Users AS T2 ON T1.address_id = T2.user_address_id WHERE T2.first_name = 'Robbie';,real_estate_rentals,"[{'table_name': 'addresses', 'table_schema': [{'col_name': 'address id'}, {'col_name': 'line 1 number building'}, {'col_name': 'line 2 number street'}, {'col_name': 'line 3 area locality'}, {'col_name': 'town city'}, {'col_name': 'zip postcode'}, {'col_name': 'county state province'}, {'col_name': 'country'}, {'col_name': 'other address details'}], 'foreign_key_columns': [], 'primary_keys': ['address id']}, {'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}]" Return the country in which the user with first name Robbie lives.,SELECT T1.country FROM Addresses AS T1 JOIN Users AS T2 ON T1.address_id = T2.user_address_id WHERE T2.first_name = 'Robbie';,real_estate_rentals,"[{'table_name': 'addresses', 'table_schema': [{'col_name': 'address id'}, {'col_name': 'line 1 number building'}, {'col_name': 'line 2 number street'}, {'col_name': 'line 3 area locality'}, {'col_name': 'town city'}, {'col_name': 'zip postcode'}, {'col_name': 'county state province'}, {'col_name': 'country'}, {'col_name': 'other address details'}], 'foreign_key_columns': [], 'primary_keys': ['address id']}, {'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}]" "What are the first, middle and last names of users who own the property they live in?","SELECT first_name , middle_name , last_name FROM Properties AS T1 JOIN Users AS T2 ON T1.owner_user_id = T2.user_id WHERE T1.property_address_id = T2.user_address_id;",real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" Return the full names of users who live in properties that they own.,"SELECT first_name , middle_name , last_name FROM Properties AS T1 JOIN Users AS T2 ON T1.owner_user_id = T2.user_id WHERE T1.property_address_id = T2.user_address_id;",real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" -List the search content of the users who do not own a single property.,SELECT search_string FROM User_Searches EXCEPT SELECT T1.search_string FROM User_Searches AS T1 JOIN Properties AS T2 ON T1.user_id = T2.owner_user_id;,real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" -What search strings were entered by users who do not own any properties?,SELECT search_string FROM User_Searches EXCEPT SELECT T1.search_string FROM User_Searches AS T1 JOIN Properties AS T2 ON T1.user_id = T2.owner_user_id;,real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" -List the last names and ids of users who have at least 2 properties and searched at most twice.,"SELECT T1.last_name , T1.user_id FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id = T2.user_id GROUP BY T1.user_id HAVING count(*) <= 2 INTERSECT SELECT T3.last_name , T3.user_id FROM Users AS T3 JOIN Properties AS T4 ON T3.user_id = T4.owner_user_id GROUP BY T3.user_id HAVING count(*) >= 2;",real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" -"What are the last names and ids of users who have searched two or fewer times, and own two or more properties?","SELECT T1.last_name , T1.user_id FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id = T2.user_id GROUP BY T1.user_id HAVING count(*) <= 2 INTERSECT SELECT T3.last_name , T3.user_id FROM Users AS T3 JOIN Properties AS T4 ON T3.user_id = T4.owner_user_id GROUP BY T3.user_id HAVING count(*) >= 2;",real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}]" +List the search content of the users who do not own a single property.,SELECT search_string FROM User_Searches EXCEPT SELECT T1.search_string FROM User_Searches AS T1 JOIN Properties AS T2 ON T1.user_id = T2.owner_user_id;,real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}, {'table_name': 'user searches', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'search seq'}, {'col_name': 'search datetime'}, {'col_name': 'search string'}], 'foreign_key_columns': ['user id'], 'primary_keys': []}]" +What search strings were entered by users who do not own any properties?,SELECT search_string FROM User_Searches EXCEPT SELECT T1.search_string FROM User_Searches AS T1 JOIN Properties AS T2 ON T1.user_id = T2.owner_user_id;,real_estate_rentals,"[{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}, {'table_name': 'user searches', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'search seq'}, {'col_name': 'search datetime'}, {'col_name': 'search string'}], 'foreign_key_columns': ['user id'], 'primary_keys': []}]" +List the last names and ids of users who have at least 2 properties and searched at most twice.,"SELECT T1.last_name , T1.user_id FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id = T2.user_id GROUP BY T1.user_id HAVING count(*) <= 2 INTERSECT SELECT T3.last_name , T3.user_id FROM Users AS T3 JOIN Properties AS T4 ON T3.user_id = T4.owner_user_id GROUP BY T3.user_id HAVING count(*) >= 2;",real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}, {'table_name': 'user searches', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'search seq'}, {'col_name': 'search datetime'}, {'col_name': 'search string'}], 'foreign_key_columns': ['user id'], 'primary_keys': []}]" +"What are the last names and ids of users who have searched two or fewer times, and own two or more properties?","SELECT T1.last_name , T1.user_id FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id = T2.user_id GROUP BY T1.user_id HAVING count(*) <= 2 INTERSECT SELECT T3.last_name , T3.user_id FROM Users AS T3 JOIN Properties AS T4 ON T3.user_id = T4.owner_user_id GROUP BY T3.user_id HAVING count(*) >= 2;",real_estate_rentals,"[{'table_name': 'users', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'age category code'}, {'col_name': 'user category code'}, {'col_name': 'user address id'}, {'col_name': 'is buyer'}, {'col_name': 'is seller'}, {'col_name': 'login name'}, {'col_name': 'password'}, {'col_name': 'date registered'}, {'col_name': 'first name'}, {'col_name': 'middle name'}, {'col_name': 'last name'}, {'col_name': 'other user details'}], 'foreign_key_columns': [], 'primary_keys': ['user id']}, {'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property address id'}, {'col_name': 'owner user id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date off market'}, {'col_name': 'property name'}, {'col_name': 'property description'}, {'col_name': 'garage yn'}, {'col_name': 'parking lots'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'price min'}, {'col_name': 'price max'}, {'col_name': 'other property details'}], 'foreign_key_columns': ['property type code', 'property address id', 'owner user id'], 'primary_keys': ['property id']}, {'table_name': 'user searches', 'table_schema': [{'col_name': 'user id'}, {'col_name': 'search seq'}, {'col_name': 'search datetime'}, {'col_name': 'search string'}], 'foreign_key_columns': ['user id'], 'primary_keys': []}]" How many bikes are heavier than 780 grams?,SELECT count(*) FROM bike WHERE weight > 780,bike_racing,"[{'table_name': 'bike', 'table_schema': [{'col_name': 'id'}, {'col_name': 'product name'}, {'col_name': 'weight'}, {'col_name': 'price'}, {'col_name': 'material'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" List the product names and weights of the bikes in ascending order of price.,"SELECT product_name , weight FROM bike ORDER BY price ASC",bike_racing,"[{'table_name': 'bike', 'table_schema': [{'col_name': 'id'}, {'col_name': 'product name'}, {'col_name': 'weight'}, {'col_name': 'price'}, {'col_name': 'material'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" "List the heat, name, and nation for all the cyclists.","SELECT heat , name , nation FROM cyclist",bike_racing,"[{'table_name': 'cyclist', 'table_schema': [{'col_name': 'id'}, {'col_name': 'heat'}, {'col_name': 'name'}, {'col_name': 'nation'}, {'col_name': 'result'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" What are the maximum and minimum weight of all bikes?,"SELECT max(weight) , min(weight) FROM bike",bike_racing,"[{'table_name': 'bike', 'table_schema': [{'col_name': 'id'}, {'col_name': 'product name'}, {'col_name': 'weight'}, {'col_name': 'price'}, {'col_name': 'material'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" What is the average price of the bikes made of material 'Carbon CC'?,SELECT avg(price) FROM bike WHERE material = 'Carbon CC',bike_racing,"[{'table_name': 'bike', 'table_schema': [{'col_name': 'id'}, {'col_name': 'product name'}, {'col_name': 'weight'}, {'col_name': 'price'}, {'col_name': 'material'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" What are the name and result of the cyclists not from 'Russia' ?,"SELECT name , RESULT FROM cyclist WHERE nation != 'Russia'",bike_racing,"[{'table_name': 'cyclist', 'table_schema': [{'col_name': 'id'}, {'col_name': 'heat'}, {'col_name': 'name'}, {'col_name': 'nation'}, {'col_name': 'result'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What are the distinct ids and product names of the bikes that are purchased after year 2015?,"SELECT DISTINCT T1.id , T1.product_name FROM bike AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id = T2.bike_id WHERE T2.purchase_year > 2015",bike_racing,"[{'table_name': 'bike', 'table_schema': [{'col_name': 'id'}, {'col_name': 'product name'}, {'col_name': 'weight'}, {'col_name': 'price'}, {'col_name': 'material'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What are the ids and names of racing bikes that are purchased by at least 4 cyclists?,"SELECT T1.id , T1.product_name FROM bike AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id = T2.bike_id GROUP BY T1.id HAVING count(*) >= 4",bike_racing,"[{'table_name': 'bike', 'table_schema': [{'col_name': 'id'}, {'col_name': 'product name'}, {'col_name': 'weight'}, {'col_name': 'price'}, {'col_name': 'material'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What are the id and name of the cyclist who owns the most bikes?,"SELECT T1.id , T1.name FROM cyclist AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id = T2.cyclist_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1",bike_racing,"[{'table_name': 'cyclist', 'table_schema': [{'col_name': 'id'}, {'col_name': 'heat'}, {'col_name': 'name'}, {'col_name': 'nation'}, {'col_name': 'result'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What are the distinct product names of bikes owned by cyclists from 'Russia' or cyclists from 'Great Britain'?,SELECT DISTINCT T3.product_name FROM cyclist AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id = T2.cyclist_id JOIN bike AS T3 ON T2.bike_id = T3.id WHERE T1.nation = 'Russia' OR T1.nation = 'Great Britain',bike_racing,"[{'table_name': 'bike', 'table_schema': [{'col_name': 'id'}, {'col_name': 'product name'}, {'col_name': 'weight'}, {'col_name': 'price'}, {'col_name': 'material'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'cyclist', 'table_schema': [{'col_name': 'id'}, {'col_name': 'heat'}, {'col_name': 'name'}, {'col_name': 'nation'}, {'col_name': 'result'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" +What are the distinct ids and product names of the bikes that are purchased after year 2015?,"SELECT DISTINCT T1.id , T1.product_name FROM bike AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id = T2.bike_id WHERE T2.purchase_year > 2015",bike_racing,"[{'table_name': 'bike', 'table_schema': [{'col_name': 'id'}, {'col_name': 'product name'}, {'col_name': 'weight'}, {'col_name': 'price'}, {'col_name': 'material'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'cyclists own bikes', 'table_schema': [{'col_name': 'cyclist id'}, {'col_name': 'bike id'}, {'col_name': 'purchase year'}], 'foreign_key_columns': ['bike id', 'cyclist id'], 'primary_keys': ['cyclist id']}]" +What are the ids and names of racing bikes that are purchased by at least 4 cyclists?,"SELECT T1.id , T1.product_name FROM bike AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id = T2.bike_id GROUP BY T1.id HAVING count(*) >= 4",bike_racing,"[{'table_name': 'bike', 'table_schema': [{'col_name': 'id'}, {'col_name': 'product name'}, {'col_name': 'weight'}, {'col_name': 'price'}, {'col_name': 'material'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'cyclists own bikes', 'table_schema': [{'col_name': 'cyclist id'}, {'col_name': 'bike id'}, {'col_name': 'purchase year'}], 'foreign_key_columns': ['bike id', 'cyclist id'], 'primary_keys': ['cyclist id']}]" +What are the id and name of the cyclist who owns the most bikes?,"SELECT T1.id , T1.name FROM cyclist AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id = T2.cyclist_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1",bike_racing,"[{'table_name': 'cyclist', 'table_schema': [{'col_name': 'id'}, {'col_name': 'heat'}, {'col_name': 'name'}, {'col_name': 'nation'}, {'col_name': 'result'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'cyclists own bikes', 'table_schema': [{'col_name': 'cyclist id'}, {'col_name': 'bike id'}, {'col_name': 'purchase year'}], 'foreign_key_columns': ['bike id', 'cyclist id'], 'primary_keys': ['cyclist id']}]" +What are the distinct product names of bikes owned by cyclists from 'Russia' or cyclists from 'Great Britain'?,SELECT DISTINCT T3.product_name FROM cyclist AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id = T2.cyclist_id JOIN bike AS T3 ON T2.bike_id = T3.id WHERE T1.nation = 'Russia' OR T1.nation = 'Great Britain',bike_racing,"[{'table_name': 'bike', 'table_schema': [{'col_name': 'id'}, {'col_name': 'product name'}, {'col_name': 'weight'}, {'col_name': 'price'}, {'col_name': 'material'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'cyclist', 'table_schema': [{'col_name': 'id'}, {'col_name': 'heat'}, {'col_name': 'name'}, {'col_name': 'nation'}, {'col_name': 'result'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'cyclists own bikes', 'table_schema': [{'col_name': 'cyclist id'}, {'col_name': 'bike id'}, {'col_name': 'purchase year'}], 'foreign_key_columns': ['bike id', 'cyclist id'], 'primary_keys': ['cyclist id']}]" How many different levels of heat are there for the cyclists?,SELECT count(DISTINCT heat) FROM cyclist,bike_racing,"[{'table_name': 'cyclist', 'table_schema': [{'col_name': 'id'}, {'col_name': 'heat'}, {'col_name': 'name'}, {'col_name': 'nation'}, {'col_name': 'result'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -How many cyclists did not purchase any bike after year 2015?,SELECT count(*) FROM cyclist WHERE id NOT IN ( SELECT cyclist_id FROM cyclists_own_bikes WHERE purchase_year > 2015 ),bike_racing,"[{'table_name': 'cyclist', 'table_schema': [{'col_name': 'id'}, {'col_name': 'heat'}, {'col_name': 'name'}, {'col_name': 'nation'}, {'col_name': 'result'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -What are the names of distinct racing bikes that are purchased by the cyclists with better results than '4:21.558' ?,SELECT DISTINCT T3.product_name FROM cyclist AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id = T2.cyclist_id JOIN bike AS T3 ON T2.bike_id = T3.id WHERE T1.result < '4:21.558',bike_racing,"[{'table_name': 'bike', 'table_schema': [{'col_name': 'id'}, {'col_name': 'product name'}, {'col_name': 'weight'}, {'col_name': 'price'}, {'col_name': 'material'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'cyclist', 'table_schema': [{'col_name': 'id'}, {'col_name': 'heat'}, {'col_name': 'name'}, {'col_name': 'nation'}, {'col_name': 'result'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -List the name and price of the bike that is owned by both the cyclists named 'Bradley Wiggins' and the cyclist named 'Antonio Tauler'.,"SELECT T3.product_name , T3.price FROM cyclist AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id = T2.cyclist_id JOIN bike AS T3 ON T2.bike_id = T3.id WHERE T1.name = 'Bradley Wiggins' INTERSECT SELECT T3.product_name , T3.price FROM cyclist AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id = T2.cyclist_id JOIN bike AS T3 ON T2.bike_id = T3.id WHERE T1.name = 'Antonio Tauler'",bike_racing,"[{'table_name': 'bike', 'table_schema': [{'col_name': 'id'}, {'col_name': 'product name'}, {'col_name': 'weight'}, {'col_name': 'price'}, {'col_name': 'material'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'cyclist', 'table_schema': [{'col_name': 'id'}, {'col_name': 'heat'}, {'col_name': 'name'}, {'col_name': 'nation'}, {'col_name': 'result'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -"Show the name, nation and result for the cyclists who did not purchase any racing bike.","SELECT name , nation , RESULT FROM cyclist EXCEPT SELECT T1.name , T1.nation , T1.result FROM cyclist AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id = T2.cyclist_id",bike_racing,"[{'table_name': 'cyclist', 'table_schema': [{'col_name': 'id'}, {'col_name': 'heat'}, {'col_name': 'name'}, {'col_name': 'nation'}, {'col_name': 'result'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" +How many cyclists did not purchase any bike after year 2015?,SELECT count(*) FROM cyclist WHERE id NOT IN ( SELECT cyclist_id FROM cyclists_own_bikes WHERE purchase_year > 2015 ),bike_racing,"[{'table_name': 'cyclist', 'table_schema': [{'col_name': 'id'}, {'col_name': 'heat'}, {'col_name': 'name'}, {'col_name': 'nation'}, {'col_name': 'result'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'cyclists own bikes', 'table_schema': [{'col_name': 'cyclist id'}, {'col_name': 'bike id'}, {'col_name': 'purchase year'}], 'foreign_key_columns': ['bike id', 'cyclist id'], 'primary_keys': ['cyclist id']}]" +What are the names of distinct racing bikes that are purchased by the cyclists with better results than '4:21.558' ?,SELECT DISTINCT T3.product_name FROM cyclist AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id = T2.cyclist_id JOIN bike AS T3 ON T2.bike_id = T3.id WHERE T1.result < '4:21.558',bike_racing,"[{'table_name': 'bike', 'table_schema': [{'col_name': 'id'}, {'col_name': 'product name'}, {'col_name': 'weight'}, {'col_name': 'price'}, {'col_name': 'material'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'cyclist', 'table_schema': [{'col_name': 'id'}, {'col_name': 'heat'}, {'col_name': 'name'}, {'col_name': 'nation'}, {'col_name': 'result'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'cyclists own bikes', 'table_schema': [{'col_name': 'cyclist id'}, {'col_name': 'bike id'}, {'col_name': 'purchase year'}], 'foreign_key_columns': ['bike id', 'cyclist id'], 'primary_keys': ['cyclist id']}]" +List the name and price of the bike that is owned by both the cyclists named 'Bradley Wiggins' and the cyclist named 'Antonio Tauler'.,"SELECT T3.product_name , T3.price FROM cyclist AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id = T2.cyclist_id JOIN bike AS T3 ON T2.bike_id = T3.id WHERE T1.name = 'Bradley Wiggins' INTERSECT SELECT T3.product_name , T3.price FROM cyclist AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id = T2.cyclist_id JOIN bike AS T3 ON T2.bike_id = T3.id WHERE T1.name = 'Antonio Tauler'",bike_racing,"[{'table_name': 'bike', 'table_schema': [{'col_name': 'id'}, {'col_name': 'product name'}, {'col_name': 'weight'}, {'col_name': 'price'}, {'col_name': 'material'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'cyclist', 'table_schema': [{'col_name': 'id'}, {'col_name': 'heat'}, {'col_name': 'name'}, {'col_name': 'nation'}, {'col_name': 'result'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'cyclists own bikes', 'table_schema': [{'col_name': 'cyclist id'}, {'col_name': 'bike id'}, {'col_name': 'purchase year'}], 'foreign_key_columns': ['bike id', 'cyclist id'], 'primary_keys': ['cyclist id']}]" +"Show the name, nation and result for the cyclists who did not purchase any racing bike.","SELECT name , nation , RESULT FROM cyclist EXCEPT SELECT T1.name , T1.nation , T1.result FROM cyclist AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id = T2.cyclist_id",bike_racing,"[{'table_name': 'cyclist', 'table_schema': [{'col_name': 'id'}, {'col_name': 'heat'}, {'col_name': 'name'}, {'col_name': 'nation'}, {'col_name': 'result'}], 'foreign_key_columns': [], 'primary_keys': ['id']}, {'table_name': 'cyclists own bikes', 'table_schema': [{'col_name': 'cyclist id'}, {'col_name': 'bike id'}, {'col_name': 'purchase year'}], 'foreign_key_columns': ['bike id', 'cyclist id'], 'primary_keys': ['cyclist id']}]" What are the names of the bikes that have substring 'fiber' in their material?,"SELECT product_name FROM bike WHERE material LIKE ""%fiber%""",bike_racing,"[{'table_name': 'bike', 'table_schema': [{'col_name': 'id'}, {'col_name': 'product name'}, {'col_name': 'weight'}, {'col_name': 'price'}, {'col_name': 'material'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" -How many bikes does each cyclist own? Order by cyclist id.,"SELECT cyclist_id , count(*) FROM cyclists_own_bikes GROUP BY cyclist_id ORDER BY cyclist_id",bike_racing,[] +How many bikes does each cyclist own? Order by cyclist id.,"SELECT cyclist_id , count(*) FROM cyclists_own_bikes GROUP BY cyclist_id ORDER BY cyclist_id",bike_racing,"[{'table_name': 'cyclists own bikes', 'table_schema': [{'col_name': 'cyclist id'}, {'col_name': 'bike id'}, {'col_name': 'purchase year'}], 'foreign_key_columns': ['bike id', 'cyclist id'], 'primary_keys': ['cyclist id']}]" What is the most expensive cake and its flavor?,"SELECT id , flavor FROM goods WHERE food = ""Cake"" ORDER BY price DESC LIMIT 1",bakery_1,"[{'table_name': 'goods', 'table_schema': [{'col_name': 'id'}, {'col_name': 'flavor'}, {'col_name': 'food'}, {'col_name': 'price'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" Give the id and flavor of the most expensive cake.,"SELECT id , flavor FROM goods WHERE food = ""Cake"" ORDER BY price DESC LIMIT 1",bakery_1,"[{'table_name': 'goods', 'table_schema': [{'col_name': 'id'}, {'col_name': 'flavor'}, {'col_name': 'food'}, {'col_name': 'price'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" What is the cheapest cookie and its flavor?,"SELECT id , flavor FROM goods WHERE food = ""Cookie"" ORDER BY price LIMIT 1",bakery_1,"[{'table_name': 'goods', 'table_schema': [{'col_name': 'id'}, {'col_name': 'flavor'}, {'col_name': 'food'}, {'col_name': 'price'}], 'foreign_key_columns': [], 'primary_keys': ['id']}]" @@ -1628,18 +1628,18 @@ List the make that are associated with most drivers.,SELECT Make FROM driver GRO Which make does the most drivers have?,SELECT Make FROM driver GROUP BY Make ORDER BY COUNT(*) DESC LIMIT 1,car_racing,"[{'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'driver'}, {'col_name': 'country'}, {'col_name': 'age'}, {'col_name': 'car #'}, {'col_name': 'make'}, {'col_name': 'points'}, {'col_name': 'laps'}, {'col_name': 'winnings'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" List the driver makes that are associated with at least three drivers.,SELECT Make FROM driver GROUP BY Make HAVING COUNT(*) >= 3,car_racing,"[{'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'driver'}, {'col_name': 'country'}, {'col_name': 'age'}, {'col_name': 'car #'}, {'col_name': 'make'}, {'col_name': 'points'}, {'col_name': 'laps'}, {'col_name': 'winnings'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" Which make is associated with 3 or more drivers?,SELECT Make FROM driver GROUP BY Make HAVING COUNT(*) >= 3,car_racing,"[{'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'driver'}, {'col_name': 'country'}, {'col_name': 'age'}, {'col_name': 'car #'}, {'col_name': 'make'}, {'col_name': 'points'}, {'col_name': 'laps'}, {'col_name': 'winnings'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" -List the names of teams that do not have any drivers.,SELECT Team FROM team WHERE Team_ID NOT IN (SELECT Team_ID FROM team_driver),car_racing,"[{'table_name': 'team', 'table_schema': [{'col_name': 'team id'}, {'col_name': 'team'}, {'col_name': 'make'}, {'col_name': 'manager'}, {'col_name': 'sponsor'}, {'col_name': 'car owner'}], 'foreign_key_columns': [], 'primary_keys': ['team id']}]" -Which team does not have drivers?,SELECT Team FROM team WHERE Team_ID NOT IN (SELECT Team_ID FROM team_driver),car_racing,"[{'table_name': 'team', 'table_schema': [{'col_name': 'team id'}, {'col_name': 'team'}, {'col_name': 'make'}, {'col_name': 'manager'}, {'col_name': 'sponsor'}, {'col_name': 'car owner'}], 'foreign_key_columns': [], 'primary_keys': ['team id']}]" +List the names of teams that do not have any drivers.,SELECT Team FROM team WHERE Team_ID NOT IN (SELECT Team_ID FROM team_driver),car_racing,"[{'table_name': 'team', 'table_schema': [{'col_name': 'team id'}, {'col_name': 'team'}, {'col_name': 'make'}, {'col_name': 'manager'}, {'col_name': 'sponsor'}, {'col_name': 'car owner'}], 'foreign_key_columns': [], 'primary_keys': ['team id']}, {'table_name': 'team driver', 'table_schema': [{'col_name': 'team id'}, {'col_name': 'driver id'}], 'foreign_key_columns': ['driver id', 'team id'], 'primary_keys': ['team id']}]" +Which team does not have drivers?,SELECT Team FROM team WHERE Team_ID NOT IN (SELECT Team_ID FROM team_driver),car_racing,"[{'table_name': 'team', 'table_schema': [{'col_name': 'team id'}, {'col_name': 'team'}, {'col_name': 'make'}, {'col_name': 'manager'}, {'col_name': 'sponsor'}, {'col_name': 'car owner'}], 'foreign_key_columns': [], 'primary_keys': ['team id']}, {'table_name': 'team driver', 'table_schema': [{'col_name': 'team id'}, {'col_name': 'driver id'}], 'foreign_key_columns': ['driver id', 'team id'], 'primary_keys': ['team id']}]" "Which country has both drivers with make ""Dodge"" and drivers with make ""Chevrolet""?","SELECT t2.country FROM driver AS t1 JOIN country AS t2 ON t1.country = t2.country_id WHERE t1.Make = ""Dodge"" INTERSECT SELECT t2.country FROM driver AS t1 JOIN country AS t2 ON t1.country = t2.country_id WHERE t1.Make = ""Chevrolet""",car_racing,"[{'table_name': 'country', 'table_schema': [{'col_name': 'country id'}, {'col_name': 'country'}, {'col_name': 'capital'}, {'col_name': 'official native language'}, {'col_name': 'regoin'}], 'foreign_key_columns': [], 'primary_keys': ['country id']}, {'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'driver'}, {'col_name': 'country'}, {'col_name': 'age'}, {'col_name': 'car #'}, {'col_name': 'make'}, {'col_name': 'points'}, {'col_name': 'laps'}, {'col_name': 'winnings'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" "Find the countries in which there are both drivers with make ""Dodge"" and drivers with make ""Chevrolet"".","SELECT t2.country FROM driver AS t1 JOIN country AS t2 ON t1.country = t2.country_id WHERE t1.Make = ""Dodge"" INTERSECT SELECT t2.country FROM driver AS t1 JOIN country AS t2 ON t1.country = t2.country_id WHERE t1.Make = ""Chevrolet""",car_racing,"[{'table_name': 'country', 'table_schema': [{'col_name': 'country id'}, {'col_name': 'country'}, {'col_name': 'capital'}, {'col_name': 'official native language'}, {'col_name': 'regoin'}], 'foreign_key_columns': [], 'primary_keys': ['country id']}, {'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'driver'}, {'col_name': 'country'}, {'col_name': 'age'}, {'col_name': 'car #'}, {'col_name': 'make'}, {'col_name': 'points'}, {'col_name': 'laps'}, {'col_name': 'winnings'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" Show total and average points of all drivers.,"SELECT sum(Points) , avg(Points) FROM driver",car_racing,"[{'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'driver'}, {'col_name': 'country'}, {'col_name': 'age'}, {'col_name': 'car #'}, {'col_name': 'make'}, {'col_name': 'points'}, {'col_name': 'laps'}, {'col_name': 'winnings'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" What are the total and average points of drivers?,"SELECT sum(Points) , avg(Points) FROM driver",car_racing,"[{'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'driver'}, {'col_name': 'country'}, {'col_name': 'age'}, {'col_name': 'car #'}, {'col_name': 'make'}, {'col_name': 'points'}, {'col_name': 'laps'}, {'col_name': 'winnings'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" Find the countries where no driver come from.,SELECT country FROM country WHERE country_id NOT IN (SELECT country FROM driver),car_racing,"[{'table_name': 'country', 'table_schema': [{'col_name': 'country id'}, {'col_name': 'country'}, {'col_name': 'capital'}, {'col_name': 'official native language'}, {'col_name': 'regoin'}], 'foreign_key_columns': [], 'primary_keys': ['country id']}, {'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'driver'}, {'col_name': 'country'}, {'col_name': 'age'}, {'col_name': 'car #'}, {'col_name': 'make'}, {'col_name': 'points'}, {'col_name': 'laps'}, {'col_name': 'winnings'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" Which countries do not have any drivers?,SELECT country FROM country WHERE country_id NOT IN (SELECT country FROM driver),car_racing,"[{'table_name': 'country', 'table_schema': [{'col_name': 'country id'}, {'col_name': 'country'}, {'col_name': 'capital'}, {'col_name': 'official native language'}, {'col_name': 'regoin'}], 'foreign_key_columns': [], 'primary_keys': ['country id']}, {'table_name': 'driver', 'table_schema': [{'col_name': 'driver id'}, {'col_name': 'driver'}, {'col_name': 'country'}, {'col_name': 'age'}, {'col_name': 'car #'}, {'col_name': 'make'}, {'col_name': 'points'}, {'col_name': 'laps'}, {'col_name': 'winnings'}], 'foreign_key_columns': [], 'primary_keys': ['driver id']}]" -What are the manager and sponsor of the team that has the most drivers?,"SELECT t1.manager , t1.sponsor FROM team AS t1 JOIN team_driver AS t2 ON t1.team_id = t2.team_id GROUP BY t2.team_id ORDER BY count(*) DESC LIMIT 1",car_racing,"[{'table_name': 'team', 'table_schema': [{'col_name': 'team id'}, {'col_name': 'team'}, {'col_name': 'make'}, {'col_name': 'manager'}, {'col_name': 'sponsor'}, {'col_name': 'car owner'}], 'foreign_key_columns': [], 'primary_keys': ['team id']}]" -Find the manager and sponsor of the team that has the most drivers.,"SELECT t1.manager , t1.sponsor FROM team AS t1 JOIN team_driver AS t2 ON t1.team_id = t2.team_id GROUP BY t2.team_id ORDER BY count(*) DESC LIMIT 1",car_racing,"[{'table_name': 'team', 'table_schema': [{'col_name': 'team id'}, {'col_name': 'team'}, {'col_name': 'make'}, {'col_name': 'manager'}, {'col_name': 'sponsor'}, {'col_name': 'car owner'}], 'foreign_key_columns': [], 'primary_keys': ['team id']}]" -What are the manager and car owner of the team that has at least 2 drivers?,"SELECT t1.manager , t1.car_owner FROM team AS t1 JOIN team_driver AS t2 ON t1.team_id = t2.team_id GROUP BY t2.team_id HAVING count(*) >= 2",car_racing,"[{'table_name': 'team', 'table_schema': [{'col_name': 'team id'}, {'col_name': 'team'}, {'col_name': 'make'}, {'col_name': 'manager'}, {'col_name': 'sponsor'}, {'col_name': 'car owner'}], 'foreign_key_columns': [], 'primary_keys': ['team id']}]" -Find the team with two or more drivers and return the the manager and car owner of the team.,"SELECT t1.manager , t1.car_owner FROM team AS t1 JOIN team_driver AS t2 ON t1.team_id = t2.team_id GROUP BY t2.team_id HAVING count(*) >= 2",car_racing,"[{'table_name': 'team', 'table_schema': [{'col_name': 'team id'}, {'col_name': 'team'}, {'col_name': 'make'}, {'col_name': 'manager'}, {'col_name': 'sponsor'}, {'col_name': 'car owner'}], 'foreign_key_columns': [], 'primary_keys': ['team id']}]" +What are the manager and sponsor of the team that has the most drivers?,"SELECT t1.manager , t1.sponsor FROM team AS t1 JOIN team_driver AS t2 ON t1.team_id = t2.team_id GROUP BY t2.team_id ORDER BY count(*) DESC LIMIT 1",car_racing,"[{'table_name': 'team', 'table_schema': [{'col_name': 'team id'}, {'col_name': 'team'}, {'col_name': 'make'}, {'col_name': 'manager'}, {'col_name': 'sponsor'}, {'col_name': 'car owner'}], 'foreign_key_columns': [], 'primary_keys': ['team id']}, {'table_name': 'team driver', 'table_schema': [{'col_name': 'team id'}, {'col_name': 'driver id'}], 'foreign_key_columns': ['driver id', 'team id'], 'primary_keys': ['team id']}]" +Find the manager and sponsor of the team that has the most drivers.,"SELECT t1.manager , t1.sponsor FROM team AS t1 JOIN team_driver AS t2 ON t1.team_id = t2.team_id GROUP BY t2.team_id ORDER BY count(*) DESC LIMIT 1",car_racing,"[{'table_name': 'team', 'table_schema': [{'col_name': 'team id'}, {'col_name': 'team'}, {'col_name': 'make'}, {'col_name': 'manager'}, {'col_name': 'sponsor'}, {'col_name': 'car owner'}], 'foreign_key_columns': [], 'primary_keys': ['team id']}, {'table_name': 'team driver', 'table_schema': [{'col_name': 'team id'}, {'col_name': 'driver id'}], 'foreign_key_columns': ['driver id', 'team id'], 'primary_keys': ['team id']}]" +What are the manager and car owner of the team that has at least 2 drivers?,"SELECT t1.manager , t1.car_owner FROM team AS t1 JOIN team_driver AS t2 ON t1.team_id = t2.team_id GROUP BY t2.team_id HAVING count(*) >= 2",car_racing,"[{'table_name': 'team', 'table_schema': [{'col_name': 'team id'}, {'col_name': 'team'}, {'col_name': 'make'}, {'col_name': 'manager'}, {'col_name': 'sponsor'}, {'col_name': 'car owner'}], 'foreign_key_columns': [], 'primary_keys': ['team id']}, {'table_name': 'team driver', 'table_schema': [{'col_name': 'team id'}, {'col_name': 'driver id'}], 'foreign_key_columns': ['driver id', 'team id'], 'primary_keys': ['team id']}]" +Find the team with two or more drivers and return the the manager and car owner of the team.,"SELECT t1.manager , t1.car_owner FROM team AS t1 JOIN team_driver AS t2 ON t1.team_id = t2.team_id GROUP BY t2.team_id HAVING count(*) >= 2",car_racing,"[{'table_name': 'team', 'table_schema': [{'col_name': 'team id'}, {'col_name': 'team'}, {'col_name': 'make'}, {'col_name': 'manager'}, {'col_name': 'sponsor'}, {'col_name': 'car owner'}], 'foreign_key_columns': [], 'primary_keys': ['team id']}, {'table_name': 'team driver', 'table_schema': [{'col_name': 'team id'}, {'col_name': 'driver id'}], 'foreign_key_columns': ['driver id', 'team id'], 'primary_keys': ['team id']}]" How many institutions are there?,SELECT count(*) FROM institution,institution_sports,"[{'table_name': 'institution', 'table_schema': [{'col_name': 'institution id'}, {'col_name': 'name'}, {'col_name': 'team'}, {'col_name': 'city'}, {'col_name': 'province'}, {'col_name': 'founded'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'endowment'}, {'col_name': 'stadium'}, {'col_name': 'capacity'}], 'foreign_key_columns': [], 'primary_keys': ['institution id']}]" Count the number of institutions.,SELECT count(*) FROM institution,institution_sports,"[{'table_name': 'institution', 'table_schema': [{'col_name': 'institution id'}, {'col_name': 'name'}, {'col_name': 'team'}, {'col_name': 'city'}, {'col_name': 'province'}, {'col_name': 'founded'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'endowment'}, {'col_name': 'stadium'}, {'col_name': 'capacity'}], 'foreign_key_columns': [], 'primary_keys': ['institution id']}]" List the names of institutions in ascending alphabetical order.,SELECT Name FROM institution ORDER BY Name ASC,institution_sports,"[{'table_name': 'institution', 'table_schema': [{'col_name': 'institution id'}, {'col_name': 'name'}, {'col_name': 'team'}, {'col_name': 'city'}, {'col_name': 'province'}, {'col_name': 'founded'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'endowment'}, {'col_name': 'stadium'}, {'col_name': 'capacity'}], 'foreign_key_columns': [], 'primary_keys': ['institution id']}]" @@ -1778,82 +1778,82 @@ Which conference has the least number of total enrollment?,SELECT home_conferenc What are the home conferences with the fewest number of people enrolled?,SELECT home_conference FROM University GROUP BY home_conference ORDER BY sum(enrollment) LIMIT 1,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}]" List all major name and major code in the order of their major code,"SELECT major_name , major_code FROM Major ORDER BY major_code",university_rank,"[{'table_name': 'major', 'table_schema': [{'col_name': 'major id'}, {'col_name': 'major name'}, {'col_name': 'major code'}], 'foreign_key_columns': [], 'primary_keys': ['major id']}]" What are the names and codes for all majors ordered by their code?,"SELECT major_name , major_code FROM Major ORDER BY major_code",university_rank,"[{'table_name': 'major', 'table_schema': [{'col_name': 'major id'}, {'col_name': 'major name'}, {'col_name': 'major code'}], 'foreign_key_columns': [], 'primary_keys': ['major id']}]" -Show all majors and major ranks for the university with name Augustana College.,"SELECT T1.rank , T3.major_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T2.university_name = 'Augustana College'",university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'major', 'table_schema': [{'col_name': 'major id'}, {'col_name': 'major name'}, {'col_name': 'major code'}], 'foreign_key_columns': [], 'primary_keys': ['major id']}]" -What are the ranks and names of all majors at Augustana College?,"SELECT T1.rank , T3.major_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T2.university_name = 'Augustana College'",university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'major', 'table_schema': [{'col_name': 'major id'}, {'col_name': 'major name'}, {'col_name': 'major code'}], 'foreign_key_columns': [], 'primary_keys': ['major id']}]" -"What is the name, city, state of the university with a rank 1 on Accounting major?","SELECT T2.university_name , T2.city , T2.state FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T1.rank = 1 AND T3.major_name = 'Accounting'",university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'major', 'table_schema': [{'col_name': 'major id'}, {'col_name': 'major name'}, {'col_name': 'major code'}], 'foreign_key_columns': [], 'primary_keys': ['major id']}]" -"What is the name, city, and state of the university with number 1 ranked Accounting major?","SELECT T2.university_name , T2.city , T2.state FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T1.rank = 1 AND T3.major_name = 'Accounting'",university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'major', 'table_schema': [{'col_name': 'major id'}, {'col_name': 'major name'}, {'col_name': 'major code'}], 'foreign_key_columns': [], 'primary_keys': ['major id']}]" -What is the name of the university that has most number of majors with rank 1?,SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id = T2.university_id WHERE T1.rank = 1 GROUP BY T2.university_name ORDER BY count(*) DESC LIMIT 1,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}]" -What is the name of the university with the most majors ranked number 1?,SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id = T2.university_id WHERE T1.rank = 1 GROUP BY T2.university_name ORDER BY count(*) DESC LIMIT 1,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}]" -Show all university names without a major with rank 1?,SELECT university_name FROM University EXCEPT SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id = T2.university_id WHERE T1.rank = 1,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}]" -What are the names of all universities without any majors ranked number 1?,SELECT university_name FROM University EXCEPT SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id = T2.university_id WHERE T1.rank = 1,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}]" -Show all university names with both major Accounting and major Urban Education.,SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T3.major_name = 'Accounting' INTERSECT SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T3.major_name = 'Urban Education',university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'major', 'table_schema': [{'col_name': 'major id'}, {'col_name': 'major name'}, {'col_name': 'major code'}], 'foreign_key_columns': [], 'primary_keys': ['major id']}]" -What are the names of all universities that have both Accounting and Urban Education majors?,SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T3.major_name = 'Accounting' INTERSECT SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T3.major_name = 'Urban Education',university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'major', 'table_schema': [{'col_name': 'major id'}, {'col_name': 'major name'}, {'col_name': 'major code'}], 'foreign_key_columns': [], 'primary_keys': ['major id']}]" -What is the name and overall ranking of universities in Wisconsin state?,"SELECT T1.university_name , T2.rank FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id WHERE T1.state = 'Wisconsin'",university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}]" -What is the name and rank of every university in Wisconsin?,"SELECT T1.university_name , T2.rank FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id WHERE T1.state = 'Wisconsin'",university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}]" -What is the university name with highest research point?,SELECT T1.university_name FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id ORDER BY T2.research_point DESC LIMIT 1,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}]" -What is the name of the university with the most research points?,SELECT T1.university_name FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id ORDER BY T2.research_point DESC LIMIT 1,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}]" -List all university names in ascending order of their reputation points.,SELECT T1.university_name FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id ORDER BY T2.reputation_point,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}]" -What are the names of all universities in ascending order of reputation points?,SELECT T1.university_name FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id ORDER BY T2.reputation_point,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}]" -What is the name of university with major Accounting ranked 3 or above?,"SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T1.rank <= 3 AND T3.major_name = ""Accounting""",university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'major', 'table_schema': [{'col_name': 'major id'}, {'col_name': 'major name'}, {'col_name': 'major code'}], 'foreign_key_columns': [], 'primary_keys': ['major id']}]" -What are the names of the university with an Accounting major ranked 3 or higher?,"SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T1.rank <= 3 AND T3.major_name = ""Accounting""",university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'major', 'table_schema': [{'col_name': 'major id'}, {'col_name': 'major name'}, {'col_name': 'major code'}], 'foreign_key_columns': [], 'primary_keys': ['major id']}]" -What is the total enrollment of universities with a overall rank 5 or below?,SELECT sum(enrollment) FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id WHERE T2.rank >= 5,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}]" -What is the total number of students enrolled in an university with a rank of 5 or below?,SELECT sum(enrollment) FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id WHERE T2.rank >= 5,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}]" -Find the name and Citation point of the universities whose reputation points are top 3 and above.,"SELECT T1.University_Name , T2.Citation_point FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id ORDER BY T2.Reputation_point DESC LIMIT 3",university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}]" -What is the name and citation point of the unversities with the top 3 reputation points?,"SELECT T1.University_Name , T2.Citation_point FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id ORDER BY T2.Reputation_point DESC LIMIT 3",university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}]" +Show all majors and major ranks for the university with name Augustana College.,"SELECT T1.rank , T3.major_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T2.university_name = 'Augustana College'",university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'major', 'table_schema': [{'col_name': 'major id'}, {'col_name': 'major name'}, {'col_name': 'major code'}], 'foreign_key_columns': [], 'primary_keys': ['major id']}, {'table_name': 'major ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'major id'}], 'foreign_key_columns': ['major id', 'university id'], 'primary_keys': ['rank']}]" +What are the ranks and names of all majors at Augustana College?,"SELECT T1.rank , T3.major_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T2.university_name = 'Augustana College'",university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'major', 'table_schema': [{'col_name': 'major id'}, {'col_name': 'major name'}, {'col_name': 'major code'}], 'foreign_key_columns': [], 'primary_keys': ['major id']}, {'table_name': 'major ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'major id'}], 'foreign_key_columns': ['major id', 'university id'], 'primary_keys': ['rank']}]" +"What is the name, city, state of the university with a rank 1 on Accounting major?","SELECT T2.university_name , T2.city , T2.state FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T1.rank = 1 AND T3.major_name = 'Accounting'",university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'major', 'table_schema': [{'col_name': 'major id'}, {'col_name': 'major name'}, {'col_name': 'major code'}], 'foreign_key_columns': [], 'primary_keys': ['major id']}, {'table_name': 'major ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'major id'}], 'foreign_key_columns': ['major id', 'university id'], 'primary_keys': ['rank']}]" +"What is the name, city, and state of the university with number 1 ranked Accounting major?","SELECT T2.university_name , T2.city , T2.state FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T1.rank = 1 AND T3.major_name = 'Accounting'",university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'major', 'table_schema': [{'col_name': 'major id'}, {'col_name': 'major name'}, {'col_name': 'major code'}], 'foreign_key_columns': [], 'primary_keys': ['major id']}, {'table_name': 'major ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'major id'}], 'foreign_key_columns': ['major id', 'university id'], 'primary_keys': ['rank']}]" +What is the name of the university that has most number of majors with rank 1?,SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id = T2.university_id WHERE T1.rank = 1 GROUP BY T2.university_name ORDER BY count(*) DESC LIMIT 1,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'major ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'major id'}], 'foreign_key_columns': ['major id', 'university id'], 'primary_keys': ['rank']}]" +What is the name of the university with the most majors ranked number 1?,SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id = T2.university_id WHERE T1.rank = 1 GROUP BY T2.university_name ORDER BY count(*) DESC LIMIT 1,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'major ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'major id'}], 'foreign_key_columns': ['major id', 'university id'], 'primary_keys': ['rank']}]" +Show all university names without a major with rank 1?,SELECT university_name FROM University EXCEPT SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id = T2.university_id WHERE T1.rank = 1,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'major ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'major id'}], 'foreign_key_columns': ['major id', 'university id'], 'primary_keys': ['rank']}]" +What are the names of all universities without any majors ranked number 1?,SELECT university_name FROM University EXCEPT SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id = T2.university_id WHERE T1.rank = 1,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'major ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'major id'}], 'foreign_key_columns': ['major id', 'university id'], 'primary_keys': ['rank']}]" +Show all university names with both major Accounting and major Urban Education.,SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T3.major_name = 'Accounting' INTERSECT SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T3.major_name = 'Urban Education',university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'major', 'table_schema': [{'col_name': 'major id'}, {'col_name': 'major name'}, {'col_name': 'major code'}], 'foreign_key_columns': [], 'primary_keys': ['major id']}, {'table_name': 'major ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'major id'}], 'foreign_key_columns': ['major id', 'university id'], 'primary_keys': ['rank']}]" +What are the names of all universities that have both Accounting and Urban Education majors?,SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T3.major_name = 'Accounting' INTERSECT SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T3.major_name = 'Urban Education',university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'major', 'table_schema': [{'col_name': 'major id'}, {'col_name': 'major name'}, {'col_name': 'major code'}], 'foreign_key_columns': [], 'primary_keys': ['major id']}, {'table_name': 'major ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'major id'}], 'foreign_key_columns': ['major id', 'university id'], 'primary_keys': ['rank']}]" +What is the name and overall ranking of universities in Wisconsin state?,"SELECT T1.university_name , T2.rank FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id WHERE T1.state = 'Wisconsin'",university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'overall ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'reputation point'}, {'col_name': 'research point'}, {'col_name': 'citation point'}, {'col_name': 'total'}], 'foreign_key_columns': ['university id'], 'primary_keys': ['university id']}]" +What is the name and rank of every university in Wisconsin?,"SELECT T1.university_name , T2.rank FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id WHERE T1.state = 'Wisconsin'",university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'overall ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'reputation point'}, {'col_name': 'research point'}, {'col_name': 'citation point'}, {'col_name': 'total'}], 'foreign_key_columns': ['university id'], 'primary_keys': ['university id']}]" +What is the university name with highest research point?,SELECT T1.university_name FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id ORDER BY T2.research_point DESC LIMIT 1,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'overall ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'reputation point'}, {'col_name': 'research point'}, {'col_name': 'citation point'}, {'col_name': 'total'}], 'foreign_key_columns': ['university id'], 'primary_keys': ['university id']}]" +What is the name of the university with the most research points?,SELECT T1.university_name FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id ORDER BY T2.research_point DESC LIMIT 1,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'overall ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'reputation point'}, {'col_name': 'research point'}, {'col_name': 'citation point'}, {'col_name': 'total'}], 'foreign_key_columns': ['university id'], 'primary_keys': ['university id']}]" +List all university names in ascending order of their reputation points.,SELECT T1.university_name FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id ORDER BY T2.reputation_point,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'overall ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'reputation point'}, {'col_name': 'research point'}, {'col_name': 'citation point'}, {'col_name': 'total'}], 'foreign_key_columns': ['university id'], 'primary_keys': ['university id']}]" +What are the names of all universities in ascending order of reputation points?,SELECT T1.university_name FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id ORDER BY T2.reputation_point,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'overall ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'reputation point'}, {'col_name': 'research point'}, {'col_name': 'citation point'}, {'col_name': 'total'}], 'foreign_key_columns': ['university id'], 'primary_keys': ['university id']}]" +What is the name of university with major Accounting ranked 3 or above?,"SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T1.rank <= 3 AND T3.major_name = ""Accounting""",university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'major', 'table_schema': [{'col_name': 'major id'}, {'col_name': 'major name'}, {'col_name': 'major code'}], 'foreign_key_columns': [], 'primary_keys': ['major id']}, {'table_name': 'major ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'major id'}], 'foreign_key_columns': ['major id', 'university id'], 'primary_keys': ['rank']}]" +What are the names of the university with an Accounting major ranked 3 or higher?,"SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T1.rank <= 3 AND T3.major_name = ""Accounting""",university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'major', 'table_schema': [{'col_name': 'major id'}, {'col_name': 'major name'}, {'col_name': 'major code'}], 'foreign_key_columns': [], 'primary_keys': ['major id']}, {'table_name': 'major ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'major id'}], 'foreign_key_columns': ['major id', 'university id'], 'primary_keys': ['rank']}]" +What is the total enrollment of universities with a overall rank 5 or below?,SELECT sum(enrollment) FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id WHERE T2.rank >= 5,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'overall ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'reputation point'}, {'col_name': 'research point'}, {'col_name': 'citation point'}, {'col_name': 'total'}], 'foreign_key_columns': ['university id'], 'primary_keys': ['university id']}]" +What is the total number of students enrolled in an university with a rank of 5 or below?,SELECT sum(enrollment) FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id WHERE T2.rank >= 5,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'overall ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'reputation point'}, {'col_name': 'research point'}, {'col_name': 'citation point'}, {'col_name': 'total'}], 'foreign_key_columns': ['university id'], 'primary_keys': ['university id']}]" +Find the name and Citation point of the universities whose reputation points are top 3 and above.,"SELECT T1.University_Name , T2.Citation_point FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id ORDER BY T2.Reputation_point DESC LIMIT 3",university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'overall ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'reputation point'}, {'col_name': 'research point'}, {'col_name': 'citation point'}, {'col_name': 'total'}], 'foreign_key_columns': ['university id'], 'primary_keys': ['university id']}]" +What is the name and citation point of the unversities with the top 3 reputation points?,"SELECT T1.University_Name , T2.Citation_point FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id ORDER BY T2.Reputation_point DESC LIMIT 3",university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}, {'table_name': 'overall ranking', 'table_schema': [{'col_name': 'rank'}, {'col_name': 'university id'}, {'col_name': 'reputation point'}, {'col_name': 'research point'}, {'col_name': 'citation point'}, {'col_name': 'total'}], 'foreign_key_columns': ['university id'], 'primary_keys': ['university id']}]" which states do have more than two universities with enrollment smaller than 3000?,SELECT state FROM university WHERE enrollment < 3000 GROUP BY state HAVING count(*) > 2,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}]" What are the states that have more than 2 universities with an enrollment less than 3000?,SELECT state FROM university WHERE enrollment < 3000 GROUP BY state HAVING count(*) > 2,university_rank,"[{'table_name': 'university', 'table_schema': [{'col_name': 'university id'}, {'col_name': 'university name'}, {'col_name': 'city'}, {'col_name': 'state'}, {'col_name': 'team name'}, {'col_name': 'affiliation'}, {'col_name': 'enrollment'}, {'col_name': 'home conference'}], 'foreign_key_columns': [], 'primary_keys': ['university id']}]" Find the titles of movies that don’t have any rating.,SELECT title FROM movies WHERE rating = 'null',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" What are the names of movies that do not have any ratings?,SELECT title FROM movies WHERE rating = 'null',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" Find the names of movies whose rating is ‘G’.,SELECT title FROM movies WHERE rating = 'G',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" What are names of movies that have a 'G' ratings?,SELECT title FROM movies WHERE rating = 'G',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" -Find the title of the movie that is played in the Odeon theater.,SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Odeon',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" -What are the movie titles for ones that are played in the Odeon theater?,SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Odeon',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" -Find the names of movies that are played in any theater and the name of the corresponding theater.,"SELECT T1.title , T2.name FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie",movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" -What are the names of the movies that are played in any theater and the name of the corresponding theater?,"SELECT T1.title , T2.name FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie",movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" +Find the title of the movie that is played in the Odeon theater.,SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Odeon',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}, {'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +What are the movie titles for ones that are played in the Odeon theater?,SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Odeon',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}, {'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +Find the names of movies that are played in any theater and the name of the corresponding theater.,"SELECT T1.title , T2.name FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie",movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}, {'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +What are the names of the movies that are played in any theater and the name of the corresponding theater?,"SELECT T1.title , T2.name FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie",movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}, {'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" Find the number of movies whose rating is ‘G’.,SELECT count(*) FROM movies WHERE rating = 'G',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" How many movies had a 'G' rating?,SELECT count(*) FROM movies WHERE rating = 'G',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" -How many movies are playing across all theaters?,SELECT count(*) FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie,movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" -How many movies are playing in theaters?,SELECT count(*) FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie,movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" -How many distinct movies are on in theaters?,SELECT count(DISTINCT T1.code) FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie,movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" -How many different movies are playing?,SELECT count(DISTINCT T1.code) FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie,movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" -How many distinct movie theaters are there?,SELECT count(DISTINCT name) FROM movietheaters,movie_2,[] -How many different movie theaters exist?,SELECT count(DISTINCT name) FROM movietheaters,movie_2,[] +How many movies are playing across all theaters?,SELECT count(*) FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie,movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}, {'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +How many movies are playing in theaters?,SELECT count(*) FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie,movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}, {'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +How many distinct movies are on in theaters?,SELECT count(DISTINCT T1.code) FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie,movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}, {'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +How many different movies are playing?,SELECT count(DISTINCT T1.code) FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie,movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}, {'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +How many distinct movie theaters are there?,SELECT count(DISTINCT name) FROM movietheaters,movie_2,"[{'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +How many different movie theaters exist?,SELECT count(DISTINCT name) FROM movietheaters,movie_2,"[{'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" Find the rating of the movie whose name includes the word ‘Citizen’.,SELECT rating FROM movies WHERE title LIKE '%Citizen%',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" What is the rating of the movie what has a name including a word like 'Citizen'?,SELECT rating FROM movies WHERE title LIKE '%Citizen%',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" Find the name of the cinemas that are playing movies with either rating ‘G’ or rating ‘PG’.,SELECT title FROM movies WHERE rating = 'G' OR rating = 'PG',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" What are the names of the movie theaters that are playing 'G' or 'PG' rated movies?,SELECT title FROM movies WHERE rating = 'G' OR rating = 'PG',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" -Find the name of the movies that are played in either cinema Odeon or Imperial.,SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Odeon' OR T2.name = 'Imperial',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" -What are the titles of all the movies that played at the Odeon or Imperial theater?,SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Odeon' OR T2.name = 'Imperial',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" -Find the name of the movie that is on in both Odeon and Imperial theaters.,SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Odeon' INTERSECT SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Imperial',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" -What movie is playing at both the Odeon and Imperial theater?,SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Odeon' INTERSECT SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Imperial',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" -Find the name of all movies that are not played in Odeon theater.,SELECT title FROM movies EXCEPT SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Odeon',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" -What are the names of every movie that is not playing at the Odeon theater?,SELECT title FROM movies EXCEPT SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Odeon',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" +Find the name of the movies that are played in either cinema Odeon or Imperial.,SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Odeon' OR T2.name = 'Imperial',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}, {'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +What are the titles of all the movies that played at the Odeon or Imperial theater?,SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Odeon' OR T2.name = 'Imperial',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}, {'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +Find the name of the movie that is on in both Odeon and Imperial theaters.,SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Odeon' INTERSECT SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Imperial',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}, {'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +What movie is playing at both the Odeon and Imperial theater?,SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Odeon' INTERSECT SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Imperial',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}, {'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +Find the name of all movies that are not played in Odeon theater.,SELECT title FROM movies EXCEPT SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Odeon',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}, {'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +What are the names of every movie that is not playing at the Odeon theater?,SELECT title FROM movies EXCEPT SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Odeon',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}, {'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" List in alphabetical order the titles of all movies.,SELECT title FROM movies ORDER BY title,movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" What are the movie names in alphabetical order?,SELECT title FROM movies ORDER BY title,movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" Find the titles of all movies sorted by their ratings.,SELECT title FROM movies ORDER BY rating,movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" What are the movie names sorted by rating?,SELECT title FROM movies ORDER BY rating,movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" -Find the name of the theater that is playing the most number of movies.,SELECT name FROM movietheaters GROUP BY name ORDER BY count(*) DESC LIMIT 1,movie_2,[] -What is the name of the theater playing the most movies?,SELECT name FROM movietheaters GROUP BY name ORDER BY count(*) DESC LIMIT 1,movie_2,[] -Find the name of the movie that is played in the most number of theaters.,SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie GROUP BY T1.title ORDER BY count(*) DESC LIMIT 1,movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" -What is the name of the film playing at the most number of theaters?,SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie GROUP BY T1.title ORDER BY count(*) DESC LIMIT 1,movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" +Find the name of the theater that is playing the most number of movies.,SELECT name FROM movietheaters GROUP BY name ORDER BY count(*) DESC LIMIT 1,movie_2,"[{'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +What is the name of the theater playing the most movies?,SELECT name FROM movietheaters GROUP BY name ORDER BY count(*) DESC LIMIT 1,movie_2,"[{'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +Find the name of the movie that is played in the most number of theaters.,SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie GROUP BY T1.title ORDER BY count(*) DESC LIMIT 1,movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}, {'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +What is the name of the film playing at the most number of theaters?,SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie GROUP BY T1.title ORDER BY count(*) DESC LIMIT 1,movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}, {'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" Find the number of movies in each rating.,"SELECT count(*) , rating FROM movies GROUP BY rating",movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" How many movies exist for each rating?,"SELECT count(*) , rating FROM movies GROUP BY rating",movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" Find the number of movies whose rating is not null.,"SELECT count(*) , rating FROM movies WHERE rating != 'null' GROUP BY rating",movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" How many movies have a rating that is not null?,"SELECT count(*) , rating FROM movies WHERE rating != 'null' GROUP BY rating",movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" -Find the name of theaters that has at least one movie playing.,SELECT name FROM movietheaters GROUP BY name HAVING count(*) >= 1,movie_2,[] -What are the names of every theater with at least one movie playing?,SELECT name FROM movietheaters GROUP BY name HAVING count(*) >= 1,movie_2,[] -Select the name of all movie theaters that are not currently showing a movie.,SELECT DISTINCT name FROM MovieTheaters WHERE Movie = 'null',movie_2,[] -What are the names of all cinemas not showing any movies?,SELECT DISTINCT name FROM MovieTheaters WHERE Movie = 'null',movie_2,[] -Find the name of the movie theaters that are playing the movies whose rating is ‘G’.,SELECT T2.name FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T1.rating = 'G',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" -What are the names of theaters playing 'G' rated movies?,SELECT T2.name FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T1.rating = 'G',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" +Find the name of theaters that has at least one movie playing.,SELECT name FROM movietheaters GROUP BY name HAVING count(*) >= 1,movie_2,"[{'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +What are the names of every theater with at least one movie playing?,SELECT name FROM movietheaters GROUP BY name HAVING count(*) >= 1,movie_2,"[{'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +Select the name of all movie theaters that are not currently showing a movie.,SELECT DISTINCT name FROM MovieTheaters WHERE Movie = 'null',movie_2,"[{'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +What are the names of all cinemas not showing any movies?,SELECT DISTINCT name FROM MovieTheaters WHERE Movie = 'null',movie_2,"[{'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +Find the name of the movie theaters that are playing the movies whose rating is ‘G’.,SELECT T2.name FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T1.rating = 'G',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}, {'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +What are the names of theaters playing 'G' rated movies?,SELECT T2.name FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T1.rating = 'G',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}, {'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" Select the title of all movies.,SELECT title FROM movies,movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" What are all of the movie names?,SELECT title FROM movies,movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" Show all the distinct ratings in the database.,SELECT DISTINCT rating FROM movies,movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" What are the different movie ratings?,SELECT DISTINCT rating FROM movies,movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" Show all information of all unrated movies.,SELECT * FROM movies WHERE rating = 'null',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" What is all the information about the unrated movies?,SELECT * FROM movies WHERE rating = 'null',movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" -Show the titles of movies not currently being shown in any theaters.,SELECT Title FROM Movies WHERE Code NOT IN (SELECT Movie FROM MovieTheaters WHERE Movie != 'null'),movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" -What are the names of the movies not being shown in any theaters?,SELECT Title FROM Movies WHERE Code NOT IN (SELECT Movie FROM MovieTheaters WHERE Movie != 'null'),movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}]" +Show the titles of movies not currently being shown in any theaters.,SELECT Title FROM Movies WHERE Code NOT IN (SELECT Movie FROM MovieTheaters WHERE Movie != 'null'),movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}, {'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" +What are the names of the movies not being shown in any theaters?,SELECT Title FROM Movies WHERE Code NOT IN (SELECT Movie FROM MovieTheaters WHERE Movie != 'null'),movie_2,"[{'table_name': 'movies', 'table_schema': [{'col_name': 'code'}, {'col_name': 'title'}, {'col_name': 'rating'}], 'foreign_key_columns': [], 'primary_keys': ['code']}, {'table_name': 'movie theaters', 'table_schema': [{'col_name': 'code'}, {'col_name': 'name'}, {'col_name': 'movie'}], 'foreign_key_columns': ['movie'], 'primary_keys': ['code']}]" Who receieved the heaviest package?,SELECT T2.Name FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Recipient = T2.AccountNumber ORDER BY T1.Weight DESC LIMIT 1,planet_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'account number'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['account number']}, {'table_name': 'package', 'table_schema': [{'col_name': 'shipment'}, {'col_name': 'package number'}, {'col_name': 'contents'}, {'col_name': 'weight'}, {'col_name': 'sender'}, {'col_name': 'recipient'}], 'foreign_key_columns': ['recipient', 'sender', 'shipment'], 'primary_keys': ['shipment']}]" What is the name of the client who received the heaviest package?,SELECT T2.Name FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Recipient = T2.AccountNumber ORDER BY T1.Weight DESC LIMIT 1,planet_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'account number'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['account number']}, {'table_name': 'package', 'table_schema': [{'col_name': 'shipment'}, {'col_name': 'package number'}, {'col_name': 'contents'}, {'col_name': 'weight'}, {'col_name': 'sender'}, {'col_name': 'recipient'}], 'foreign_key_columns': ['recipient', 'sender', 'shipment'], 'primary_keys': ['shipment']}]" What is the total weight of all the packages that customer Leo Wong sent?,"SELECT sum(T1.Weight) FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender = T2.AccountNumber WHERE T2.Name = ""Leo Wong"";",planet_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'account number'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['account number']}, {'table_name': 'package', 'table_schema': [{'col_name': 'shipment'}, {'col_name': 'package number'}, {'col_name': 'contents'}, {'col_name': 'weight'}, {'col_name': 'sender'}, {'col_name': 'recipient'}], 'foreign_key_columns': ['recipient', 'sender', 'shipment'], 'primary_keys': ['shipment']}]" @@ -1864,8 +1864,8 @@ What is Turanga Leela's salary and position?,"SELECT Salary , POSITION FROM Emp What is the salary and position of the employee named Turanga Leela?,"SELECT Salary , POSITION FROM Employee WHERE Name = ""Turanga Leela"";",planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}]" What is the average salary of all intern jobs?,"SELECT avg(Salary) FROM Employee WHERE POSITION = ""Intern"";",planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}]" What is the average salary of an intern?,"SELECT avg(Salary) FROM Employee WHERE POSITION = ""Intern"";",planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}]" -What level is Physician?,"SELECT T1.Level FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID WHERE T2.position = ""Physician"";",planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}]" -What is the clearance level of a physician?,"SELECT T1.Level FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID WHERE T2.position = ""Physician"";",planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}]" +What level is Physician?,"SELECT T1.Level FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID WHERE T2.position = ""Physician"";",planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}, {'table_name': 'has clearance', 'table_schema': [{'col_name': 'employee'}, {'col_name': 'planet'}, {'col_name': 'level'}], 'foreign_key_columns': ['planet', 'employee'], 'primary_keys': ['employee']}]" +What is the clearance level of a physician?,"SELECT T1.Level FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID WHERE T2.position = ""Physician"";",planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}, {'table_name': 'has clearance', 'table_schema': [{'col_name': 'employee'}, {'col_name': 'planet'}, {'col_name': 'level'}], 'foreign_key_columns': ['planet', 'employee'], 'primary_keys': ['employee']}]" List Package Number of all package sent by Leo Wong?,"SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender = T2.AccountNumber WHERE T2.Name = ""Leo Wong"";",planet_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'account number'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['account number']}, {'table_name': 'package', 'table_schema': [{'col_name': 'shipment'}, {'col_name': 'package number'}, {'col_name': 'contents'}, {'col_name': 'weight'}, {'col_name': 'sender'}, {'col_name': 'recipient'}], 'foreign_key_columns': ['recipient', 'sender', 'shipment'], 'primary_keys': ['shipment']}]" What is the number of all packages that Leo Wong sent?,"SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender = T2.AccountNumber WHERE T2.Name = ""Leo Wong"";",planet_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'account number'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['account number']}, {'table_name': 'package', 'table_schema': [{'col_name': 'shipment'}, {'col_name': 'package number'}, {'col_name': 'contents'}, {'col_name': 'weight'}, {'col_name': 'sender'}, {'col_name': 'recipient'}], 'foreign_key_columns': ['recipient', 'sender', 'shipment'], 'primary_keys': ['shipment']}]" List all package numbers received by Leo Wong ?,"select t1.packagenumber from package as t1 join client as t2 on t1.recipient = t2.accountnumber where t2.name = ""leo wong"";",planet_1,"[{'table_name': 'client', 'table_schema': [{'col_name': 'account number'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['account number']}, {'table_name': 'package', 'table_schema': [{'col_name': 'shipment'}, {'col_name': 'package number'}, {'col_name': 'contents'}, {'col_name': 'weight'}, {'col_name': 'sender'}, {'col_name': 'recipient'}], 'foreign_key_columns': ['recipient', 'sender', 'shipment'], 'primary_keys': ['shipment']}]" @@ -1918,18 +1918,18 @@ List package number of packages shipped in Omicron Persei 8 planet or sent by Za What are the number of packages shipped on Omicron Persei 8 planet or sent by Zapp Brannigan?,"SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender = T2.AccountNumber JOIN Shipment AS T3 ON T1.Shipment = T3.ShipmentID JOIN Planet AS T4 ON T3.Planet = T4.PlanetID WHERE T2.Name = ""Zapp Brannigan"" OR T4.Name = ""Omicron Persei 8"";",planet_1,"[{'table_name': 'planet', 'table_schema': [{'col_name': 'planet id'}, {'col_name': 'name'}, {'col_name': 'coordinates'}], 'foreign_key_columns': [], 'primary_keys': ['planet id']}, {'table_name': 'shipment', 'table_schema': [{'col_name': 'shipment id'}, {'col_name': 'date'}, {'col_name': 'manager'}, {'col_name': 'planet'}], 'foreign_key_columns': ['planet', 'manager'], 'primary_keys': ['shipment id']}, {'table_name': 'client', 'table_schema': [{'col_name': 'account number'}, {'col_name': 'name'}], 'foreign_key_columns': [], 'primary_keys': ['account number']}, {'table_name': 'package', 'table_schema': [{'col_name': 'shipment'}, {'col_name': 'package number'}, {'col_name': 'contents'}, {'col_name': 'weight'}, {'col_name': 'sender'}, {'col_name': 'recipient'}], 'foreign_key_columns': ['recipient', 'sender', 'shipment'], 'primary_keys': ['shipment']}]" Which packages have weight between 10 and 30? List the package number and weight.,"SELECT PackageNumber , Weight FROM PACKAGE WHERE Weight BETWEEN 10 AND 30;",planet_1,"[{'table_name': 'package', 'table_schema': [{'col_name': 'shipment'}, {'col_name': 'package number'}, {'col_name': 'contents'}, {'col_name': 'weight'}, {'col_name': 'sender'}, {'col_name': 'recipient'}], 'foreign_key_columns': ['recipient', 'sender', 'shipment'], 'primary_keys': ['shipment']}]" What are the package numbers and weights that are between 10 and 30?,"SELECT PackageNumber , Weight FROM PACKAGE WHERE Weight BETWEEN 10 AND 30;",planet_1,"[{'table_name': 'package', 'table_schema': [{'col_name': 'shipment'}, {'col_name': 'package number'}, {'col_name': 'contents'}, {'col_name': 'weight'}, {'col_name': 'sender'}, {'col_name': 'recipient'}], 'foreign_key_columns': ['recipient', 'sender', 'shipment'], 'primary_keys': ['shipment']}]" -Which employees do not have clearance in Mars? List employee's name.,"SELECT Name FROM Employee EXCEPT SELECT T2.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID WHERE T3.Name = ""Mars"";",planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}, {'table_name': 'planet', 'table_schema': [{'col_name': 'planet id'}, {'col_name': 'name'}, {'col_name': 'coordinates'}], 'foreign_key_columns': [], 'primary_keys': ['planet id']}]" -What are the names of all employees who don't have clearance on Mars?,"SELECT Name FROM Employee EXCEPT SELECT T2.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID WHERE T3.Name = ""Mars"";",planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}, {'table_name': 'planet', 'table_schema': [{'col_name': 'planet id'}, {'col_name': 'name'}, {'col_name': 'coordinates'}], 'foreign_key_columns': [], 'primary_keys': ['planet id']}]" -Which employees have clearance in Omega III? List employees' name.,"SELECT T2.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID WHERE T3.Name = ""Omega III"";",planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}, {'table_name': 'planet', 'table_schema': [{'col_name': 'planet id'}, {'col_name': 'name'}, {'col_name': 'coordinates'}], 'foreign_key_columns': [], 'primary_keys': ['planet id']}]" -What are the names of all employees with clearance on Omega III?,"SELECT T2.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID WHERE T3.Name = ""Omega III"";",planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}, {'table_name': 'planet', 'table_schema': [{'col_name': 'planet id'}, {'col_name': 'name'}, {'col_name': 'coordinates'}], 'foreign_key_columns': [], 'primary_keys': ['planet id']}]" -Which planets that have exact one employee has clearance? List planets' name.,SELECT T3.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID GROUP BY T1.Planet HAVING count(*) = 1;,planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}, {'table_name': 'planet', 'table_schema': [{'col_name': 'planet id'}, {'col_name': 'name'}, {'col_name': 'coordinates'}], 'foreign_key_columns': [], 'primary_keys': ['planet id']}]" -What are the names of all planets with one employee that has clearance?,SELECT T3.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID GROUP BY T1.Planet HAVING count(*) = 1;,planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}, {'table_name': 'planet', 'table_schema': [{'col_name': 'planet id'}, {'col_name': 'name'}, {'col_name': 'coordinates'}], 'foreign_key_columns': [], 'primary_keys': ['planet id']}]" +Which employees do not have clearance in Mars? List employee's name.,"SELECT Name FROM Employee EXCEPT SELECT T2.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID WHERE T3.Name = ""Mars"";",planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}, {'table_name': 'planet', 'table_schema': [{'col_name': 'planet id'}, {'col_name': 'name'}, {'col_name': 'coordinates'}], 'foreign_key_columns': [], 'primary_keys': ['planet id']}, {'table_name': 'has clearance', 'table_schema': [{'col_name': 'employee'}, {'col_name': 'planet'}, {'col_name': 'level'}], 'foreign_key_columns': ['planet', 'employee'], 'primary_keys': ['employee']}]" +What are the names of all employees who don't have clearance on Mars?,"SELECT Name FROM Employee EXCEPT SELECT T2.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID WHERE T3.Name = ""Mars"";",planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}, {'table_name': 'planet', 'table_schema': [{'col_name': 'planet id'}, {'col_name': 'name'}, {'col_name': 'coordinates'}], 'foreign_key_columns': [], 'primary_keys': ['planet id']}, {'table_name': 'has clearance', 'table_schema': [{'col_name': 'employee'}, {'col_name': 'planet'}, {'col_name': 'level'}], 'foreign_key_columns': ['planet', 'employee'], 'primary_keys': ['employee']}]" +Which employees have clearance in Omega III? List employees' name.,"SELECT T2.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID WHERE T3.Name = ""Omega III"";",planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}, {'table_name': 'planet', 'table_schema': [{'col_name': 'planet id'}, {'col_name': 'name'}, {'col_name': 'coordinates'}], 'foreign_key_columns': [], 'primary_keys': ['planet id']}, {'table_name': 'has clearance', 'table_schema': [{'col_name': 'employee'}, {'col_name': 'planet'}, {'col_name': 'level'}], 'foreign_key_columns': ['planet', 'employee'], 'primary_keys': ['employee']}]" +What are the names of all employees with clearance on Omega III?,"SELECT T2.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID WHERE T3.Name = ""Omega III"";",planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}, {'table_name': 'planet', 'table_schema': [{'col_name': 'planet id'}, {'col_name': 'name'}, {'col_name': 'coordinates'}], 'foreign_key_columns': [], 'primary_keys': ['planet id']}, {'table_name': 'has clearance', 'table_schema': [{'col_name': 'employee'}, {'col_name': 'planet'}, {'col_name': 'level'}], 'foreign_key_columns': ['planet', 'employee'], 'primary_keys': ['employee']}]" +Which planets that have exact one employee has clearance? List planets' name.,SELECT T3.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID GROUP BY T1.Planet HAVING count(*) = 1;,planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}, {'table_name': 'planet', 'table_schema': [{'col_name': 'planet id'}, {'col_name': 'name'}, {'col_name': 'coordinates'}], 'foreign_key_columns': [], 'primary_keys': ['planet id']}, {'table_name': 'has clearance', 'table_schema': [{'col_name': 'employee'}, {'col_name': 'planet'}, {'col_name': 'level'}], 'foreign_key_columns': ['planet', 'employee'], 'primary_keys': ['employee']}]" +What are the names of all planets with one employee that has clearance?,SELECT T3.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID GROUP BY T1.Planet HAVING count(*) = 1;,planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}, {'table_name': 'planet', 'table_schema': [{'col_name': 'planet id'}, {'col_name': 'name'}, {'col_name': 'coordinates'}], 'foreign_key_columns': [], 'primary_keys': ['planet id']}, {'table_name': 'has clearance', 'table_schema': [{'col_name': 'employee'}, {'col_name': 'planet'}, {'col_name': 'level'}], 'foreign_key_columns': ['planet', 'employee'], 'primary_keys': ['employee']}]" Which employees have salaries between 5000 and 10000? List employees' name.,SELECT Name FROM Employee WHERE Salary BETWEEN 5000 AND 10000,planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}]" What are the employees's names for those that have salaries between 5000 and 10000?,SELECT Name FROM Employee WHERE Salary BETWEEN 5000 AND 10000,planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}]" Find the name of employees whose salary is above the average salary or more than 5000.,SELECT Name FROM Employee WHERE Salary > 5000 OR Salary > (SELECT avg(salary) FROM employee),planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}]" What are the names of all employees who have a salary greater than average or more than 5000?,SELECT Name FROM Employee WHERE Salary > 5000 OR Salary > (SELECT avg(salary) FROM employee),planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}]" -Find the number of employees who do not have clearance in Mars .,"select count(*) from employee where employeeid not in ( select t2.employeeid from has_clearance as t1 join employee as t2 on t1.employee = t2.employeeid join planet as t3 on t1.planet = t3.planetid where t3.name = ""mars"" );",planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}, {'table_name': 'planet', 'table_schema': [{'col_name': 'planet id'}, {'col_name': 'name'}, {'col_name': 'coordinates'}], 'foreign_key_columns': [], 'primary_keys': ['planet id']}]" -What is the number of employees that do not have clearance on Mars ?,"select count(*) from employee where employeeid not in ( select t2.employeeid from has_clearance as t1 join employee as t2 on t1.employee = t2.employeeid join planet as t3 on t1.planet = t3.planetid where t3.name = ""mars"" );",planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}, {'table_name': 'planet', 'table_schema': [{'col_name': 'planet id'}, {'col_name': 'name'}, {'col_name': 'coordinates'}], 'foreign_key_columns': [], 'primary_keys': ['planet id']}]" +Find the number of employees who do not have clearance in Mars .,"select count(*) from employee where employeeid not in ( select t2.employeeid from has_clearance as t1 join employee as t2 on t1.employee = t2.employeeid join planet as t3 on t1.planet = t3.planetid where t3.name = ""mars"" );",planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}, {'table_name': 'planet', 'table_schema': [{'col_name': 'planet id'}, {'col_name': 'name'}, {'col_name': 'coordinates'}], 'foreign_key_columns': [], 'primary_keys': ['planet id']}, {'table_name': 'has clearance', 'table_schema': [{'col_name': 'employee'}, {'col_name': 'planet'}, {'col_name': 'level'}], 'foreign_key_columns': ['planet', 'employee'], 'primary_keys': ['employee']}]" +What is the number of employees that do not have clearance on Mars ?,"select count(*) from employee where employeeid not in ( select t2.employeeid from has_clearance as t1 join employee as t2 on t1.employee = t2.employeeid join planet as t3 on t1.planet = t3.planetid where t3.name = ""mars"" );",planet_1,"[{'table_name': 'employee', 'table_schema': [{'col_name': 'employee id'}, {'col_name': 'name'}, {'col_name': 'position'}, {'col_name': 'salary'}, {'col_name': 'remarks'}], 'foreign_key_columns': [], 'primary_keys': ['employee id']}, {'table_name': 'planet', 'table_schema': [{'col_name': 'planet id'}, {'col_name': 'name'}, {'col_name': 'coordinates'}], 'foreign_key_columns': [], 'primary_keys': ['planet id']}, {'table_name': 'has clearance', 'table_schema': [{'col_name': 'employee'}, {'col_name': 'planet'}, {'col_name': 'level'}], 'foreign_key_columns': ['planet', 'employee'], 'primary_keys': ['employee']}]" How many games are there?,SELECT count(*) FROM game,video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}]" Count the number of games.,SELECT count(*) FROM game,video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}]" List the Title and Developers of all games ordered by units sold from large to small.,"SELECT Title , Developers FROM game ORDER BY Units_sold_Millions DESC",video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}]" @@ -1948,12 +1948,12 @@ List all player names in ascending alphabetical order.,SELECT Player_name FROM p What are the names of all players in alphabetical order?,SELECT Player_name FROM player ORDER BY Player_name ASC,video_game,"[{'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}]" List names and colleges of all players in descending order of rank of the year.,"SELECT Player_name , College FROM player ORDER BY Rank_of_the_year DESC",video_game,"[{'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}]" "What are the names and colleges of all players, ordered by rank of year descending?","SELECT Player_name , College FROM player ORDER BY Rank_of_the_year DESC",video_game,"[{'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}]" -"Please show the names and rank of players that have played the game titled ""Super Mario World"".","SELECT T3.Player_name , T3.rank_of_the_year FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T1.Title = ""Super Mario World""",video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}, {'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}]" -"What are the names and ranks of players who have played the game with the title ""Super Mario World""?","SELECT T3.Player_name , T3.rank_of_the_year FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T1.Title = ""Super Mario World""",video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}, {'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}]" -"Show the distinct developer of games played by players that go to college ""Auburn"".","SELECT DISTINCT T1.Developers FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.College = ""Auburn""",video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}, {'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}]" -What are the different developers of games that are played by players that attend Auburn college?,"SELECT DISTINCT T1.Developers FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.College = ""Auburn""",video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}, {'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}]" -"What is the average number of units sold in millions of games played by players with position ""Guard""?","SELECT avg(Units_sold_Millions) FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.Position = ""Guard""",video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}, {'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}]" -Return the average number of units sold in millions among games played by players who have the position Guard.,"SELECT avg(Units_sold_Millions) FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.Position = ""Guard""",video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}, {'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}]" +"Please show the names and rank of players that have played the game titled ""Super Mario World"".","SELECT T3.Player_name , T3.rank_of_the_year FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T1.Title = ""Super Mario World""",video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}, {'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}, {'table_name': 'game player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'game id'}, {'col_name': 'if active'}], 'foreign_key_columns': ['game id', 'player id'], 'primary_keys': ['player id']}]" +"What are the names and ranks of players who have played the game with the title ""Super Mario World""?","SELECT T3.Player_name , T3.rank_of_the_year FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T1.Title = ""Super Mario World""",video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}, {'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}, {'table_name': 'game player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'game id'}, {'col_name': 'if active'}], 'foreign_key_columns': ['game id', 'player id'], 'primary_keys': ['player id']}]" +"Show the distinct developer of games played by players that go to college ""Auburn"".","SELECT DISTINCT T1.Developers FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.College = ""Auburn""",video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}, {'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}, {'table_name': 'game player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'game id'}, {'col_name': 'if active'}], 'foreign_key_columns': ['game id', 'player id'], 'primary_keys': ['player id']}]" +What are the different developers of games that are played by players that attend Auburn college?,"SELECT DISTINCT T1.Developers FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.College = ""Auburn""",video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}, {'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}, {'table_name': 'game player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'game id'}, {'col_name': 'if active'}], 'foreign_key_columns': ['game id', 'player id'], 'primary_keys': ['player id']}]" +"What is the average number of units sold in millions of games played by players with position ""Guard""?","SELECT avg(Units_sold_Millions) FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.Position = ""Guard""",video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}, {'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}, {'table_name': 'game player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'game id'}, {'col_name': 'if active'}], 'foreign_key_columns': ['game id', 'player id'], 'primary_keys': ['player id']}]" +Return the average number of units sold in millions among games played by players who have the position Guard.,"SELECT avg(Units_sold_Millions) FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.Position = ""Guard""",video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}, {'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}, {'table_name': 'game player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'game id'}, {'col_name': 'if active'}], 'foreign_key_columns': ['game id', 'player id'], 'primary_keys': ['player id']}]" Please list the title and platform name of games.,"SELECT T1.Title , T2.Platform_name FROM game AS T1 JOIN platform AS T2 ON T1.Platform_ID = T2.Platform_ID",video_game,"[{'table_name': 'platform', 'table_schema': [{'col_name': 'platform id'}, {'col_name': 'platform name'}, {'col_name': 'market district'}, {'col_name': 'download rank'}], 'foreign_key_columns': [], 'primary_keys': ['platform id']}, {'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}]" What are the titles and platform names of all games?,"SELECT T1.Title , T2.Platform_name FROM game AS T1 JOIN platform AS T2 ON T1.Platform_ID = T2.Platform_ID",video_game,"[{'table_name': 'platform', 'table_schema': [{'col_name': 'platform id'}, {'col_name': 'platform name'}, {'col_name': 'market district'}, {'col_name': 'download rank'}], 'foreign_key_columns': [], 'primary_keys': ['platform id']}, {'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}]" Please list the title of games with platforms that have market district in Asia or USA.,"SELECT T1.Title FROM game AS T1 JOIN platform AS T2 ON T1.Platform_ID = T2.Platform_ID WHERE T2.Market_district = ""Asia"" OR T2.Market_district = ""USA""",video_game,"[{'table_name': 'platform', 'table_schema': [{'col_name': 'platform id'}, {'col_name': 'platform name'}, {'col_name': 'market district'}, {'col_name': 'download rank'}], 'foreign_key_columns': [], 'primary_keys': ['platform id']}, {'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}]" @@ -1964,14 +1964,14 @@ List the name of franchise that have the most number of games.,SELECT Franchise Which franchise has the most games?,SELECT Franchise FROM game GROUP BY Franchise ORDER BY COUNT(*) DESC LIMIT 1,video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}]" List the names of franchises that have at least two games.,SELECT Franchise FROM game GROUP BY Franchise HAVING COUNT(*) >= 2,video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}]" What are the names of franchises that have two or more games?,SELECT Franchise FROM game GROUP BY Franchise HAVING COUNT(*) >= 2,video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}]" -List the name of players that do not play any game.,SELECT Player_name FROM player WHERE Player_ID NOT IN (SELECT Player_ID FROM game_player),video_game,"[{'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}]" -What are the names of players who do not play any games?,SELECT Player_name FROM player WHERE Player_ID NOT IN (SELECT Player_ID FROM game_player),video_game,"[{'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}]" -"Show the title of games that are played by both players from college ""Oklahoma"" and players from college ""Auburn"".","SELECT T1.Title FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.College = ""Oklahoma"" INTERSECT SELECT T1.Title FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.College = ""Auburn""",video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}, {'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}]" -What are the titles of games that are played by players from Oklahoma college or Auburn college?,"SELECT T1.Title FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.College = ""Oklahoma"" INTERSECT SELECT T1.Title FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.College = ""Auburn""",video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}, {'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}]" +List the name of players that do not play any game.,SELECT Player_name FROM player WHERE Player_ID NOT IN (SELECT Player_ID FROM game_player),video_game,"[{'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}, {'table_name': 'game player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'game id'}, {'col_name': 'if active'}], 'foreign_key_columns': ['game id', 'player id'], 'primary_keys': ['player id']}]" +What are the names of players who do not play any games?,SELECT Player_name FROM player WHERE Player_ID NOT IN (SELECT Player_ID FROM game_player),video_game,"[{'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}, {'table_name': 'game player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'game id'}, {'col_name': 'if active'}], 'foreign_key_columns': ['game id', 'player id'], 'primary_keys': ['player id']}]" +"Show the title of games that are played by both players from college ""Oklahoma"" and players from college ""Auburn"".","SELECT T1.Title FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.College = ""Oklahoma"" INTERSECT SELECT T1.Title FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.College = ""Auburn""",video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}, {'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}, {'table_name': 'game player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'game id'}, {'col_name': 'if active'}], 'foreign_key_columns': ['game id', 'player id'], 'primary_keys': ['player id']}]" +What are the titles of games that are played by players from Oklahoma college or Auburn college?,"SELECT T1.Title FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.College = ""Oklahoma"" INTERSECT SELECT T1.Title FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.College = ""Auburn""",video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}, {'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}, {'table_name': 'game player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'game id'}, {'col_name': 'if active'}], 'foreign_key_columns': ['game id', 'player id'], 'primary_keys': ['player id']}]" Show all distinct franchises of games.,SELECT DISTINCT Franchise FROM game,video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}]" What are all the distinct franchises?,SELECT DISTINCT Franchise FROM game,video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}]" -Show the title of games that are not played by any player who is in the Guard position.,"SELECT Title FROM game EXCEPT SELECT T1.Title FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.Position = ""Guard""",video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}, {'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}]" -What are the titles of games not played by any players who play the Guard position?,"SELECT Title FROM game EXCEPT SELECT T1.Title FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.Position = ""Guard""",video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}, {'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}]" +Show the title of games that are not played by any player who is in the Guard position.,"SELECT Title FROM game EXCEPT SELECT T1.Title FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.Position = ""Guard""",video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}, {'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}, {'table_name': 'game player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'game id'}, {'col_name': 'if active'}], 'foreign_key_columns': ['game id', 'player id'], 'primary_keys': ['player id']}]" +What are the titles of games not played by any players who play the Guard position?,"SELECT Title FROM game EXCEPT SELECT T1.Title FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.Position = ""Guard""",video_game,"[{'table_name': 'game', 'table_schema': [{'col_name': 'game id'}, {'col_name': 'title'}, {'col_name': 'release date'}, {'col_name': 'franchise'}, {'col_name': 'developers'}, {'col_name': 'platform id'}, {'col_name': 'units sold millions'}], 'foreign_key_columns': ['platform id'], 'primary_keys': ['game id']}, {'table_name': 'player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'rank of the year'}, {'col_name': 'player name'}, {'col_name': 'position'}, {'col_name': 'college'}], 'foreign_key_columns': [], 'primary_keys': ['player id']}, {'table_name': 'game player', 'table_schema': [{'col_name': 'player id'}, {'col_name': 'game id'}, {'col_name': 'if active'}], 'foreign_key_columns': ['game id', 'player id'], 'primary_keys': ['player id']}]" list all the names of press in descending order of the profit of the year.,SELECT name FROM press ORDER BY Year_Profits_billion DESC,book_press,"[{'table_name': 'press', 'table_schema': [{'col_name': 'press id'}, {'col_name': 'name'}, {'col_name': 'month profits billion'}, {'col_name': 'year profits billion'}], 'foreign_key_columns': [], 'primary_keys': ['press id']}]" "Sorted all the press by year profits in descending order, and return press names.",SELECT name FROM press ORDER BY Year_Profits_billion DESC,book_press,"[{'table_name': 'press', 'table_schema': [{'col_name': 'press id'}, {'col_name': 'name'}, {'col_name': 'month profits billion'}, {'col_name': 'year profits billion'}], 'foreign_key_columns': [], 'primary_keys': ['press id']}]" What are the names of the publishers that made more than 15 billion profits each year or 1 billion each month?,SELECT name FROM press WHERE Year_Profits_billion > 15 OR Month_Profits_billion > 1,book_press,"[{'table_name': 'press', 'table_schema': [{'col_name': 'press id'}, {'col_name': 'name'}, {'col_name': 'month profits billion'}, {'col_name': 'year profits billion'}], 'foreign_key_columns': [], 'primary_keys': ['press id']}]" @@ -2030,32 +2030,32 @@ Show the ids and names for all documents by author Bianka Cummings.,"SELECT docu Show all author names and number of documents corresponding to each.,"SELECT author_name , count(*) FROM Documents GROUP BY author_name",cre_Doc_Workflow,"[{'table_name': 'documents', 'table_schema': [{'col_name': 'document id'}, {'col_name': 'author name'}, {'col_name': 'document name'}, {'col_name': 'document description'}, {'col_name': 'other details'}], 'foreign_key_columns': ['author name'], 'primary_keys': ['document id']}]" What is the name of the author with most number of documents?,SELECT author_name FROM Documents GROUP BY author_name ORDER BY count(*) DESC LIMIT 1,cre_Doc_Workflow,"[{'table_name': 'documents', 'table_schema': [{'col_name': 'document id'}, {'col_name': 'author name'}, {'col_name': 'document name'}, {'col_name': 'document description'}, {'col_name': 'other details'}], 'foreign_key_columns': ['author name'], 'primary_keys': ['document id']}]" Show the names for authors with at least two documents.,SELECT author_name FROM Documents GROUP BY author_name HAVING count(*) >= 2,cre_Doc_Workflow,"[{'table_name': 'documents', 'table_schema': [{'col_name': 'document id'}, {'col_name': 'author name'}, {'col_name': 'document name'}, {'col_name': 'document description'}, {'col_name': 'other details'}], 'foreign_key_columns': ['author name'], 'primary_keys': ['document id']}]" -How many business processes do we have?,SELECT count(*) FROM Business_processes,cre_Doc_Workflow,[] -"Show the next process id, process name, process description for process with id 9.","SELECT next_process_id , process_name , process_description FROM Business_processes WHERE process_id = 9",cre_Doc_Workflow,[] -What is the process name for the next process of the process with id 9?,SELECT process_name FROM Business_processes WHERE process_id = (SELECT next_process_id FROM Business_processes WHERE process_id = 9),cre_Doc_Workflow,[] -Show the number of process outcomes.,SELECT count(*) FROM Process_outcomes,cre_Doc_Workflow,[] -List the codes and descriptions for all process outcomes.,"SELECT process_outcome_code , process_outcome_description FROM Process_outcomes",cre_Doc_Workflow,[] -What is the description for the process outcome code working?,"SELECT process_outcome_description FROM Process_outcomes WHERE process_outcome_code = ""working""",cre_Doc_Workflow,[] -Show the number of process status.,SELECT count(*) FROM Process_status,cre_Doc_Workflow,[] -List the codes and descriptions for all process status.,"SELECT process_status_code , process_status_description FROM Process_status",cre_Doc_Workflow,[] -What is the description for process status code ct?,"SELECT process_status_description FROM Process_status WHERE process_status_code = ""ct""",cre_Doc_Workflow,[] +How many business processes do we have?,SELECT count(*) FROM Business_processes,cre_Doc_Workflow,"[{'table_name': 'business processes', 'table_schema': [{'col_name': 'process id'}, {'col_name': 'next process id'}, {'col_name': 'process name'}, {'col_name': 'process description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['process id']}]" +"Show the next process id, process name, process description for process with id 9.","SELECT next_process_id , process_name , process_description FROM Business_processes WHERE process_id = 9",cre_Doc_Workflow,"[{'table_name': 'business processes', 'table_schema': [{'col_name': 'process id'}, {'col_name': 'next process id'}, {'col_name': 'process name'}, {'col_name': 'process description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['process id']}]" +What is the process name for the next process of the process with id 9?,SELECT process_name FROM Business_processes WHERE process_id = (SELECT next_process_id FROM Business_processes WHERE process_id = 9),cre_Doc_Workflow,"[{'table_name': 'business processes', 'table_schema': [{'col_name': 'process id'}, {'col_name': 'next process id'}, {'col_name': 'process name'}, {'col_name': 'process description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['process id']}]" +Show the number of process outcomes.,SELECT count(*) FROM Process_outcomes,cre_Doc_Workflow,"[{'table_name': 'process outcomes', 'table_schema': [{'col_name': 'process outcome code'}, {'col_name': 'process outcome description'}], 'foreign_key_columns': [], 'primary_keys': ['process outcome code']}]" +List the codes and descriptions for all process outcomes.,"SELECT process_outcome_code , process_outcome_description FROM Process_outcomes",cre_Doc_Workflow,"[{'table_name': 'process outcomes', 'table_schema': [{'col_name': 'process outcome code'}, {'col_name': 'process outcome description'}], 'foreign_key_columns': [], 'primary_keys': ['process outcome code']}]" +What is the description for the process outcome code working?,"SELECT process_outcome_description FROM Process_outcomes WHERE process_outcome_code = ""working""",cre_Doc_Workflow,"[{'table_name': 'process outcomes', 'table_schema': [{'col_name': 'process outcome code'}, {'col_name': 'process outcome description'}], 'foreign_key_columns': [], 'primary_keys': ['process outcome code']}]" +Show the number of process status.,SELECT count(*) FROM Process_status,cre_Doc_Workflow,"[{'table_name': 'process status', 'table_schema': [{'col_name': 'process status code'}, {'col_name': 'process status description'}], 'foreign_key_columns': [], 'primary_keys': ['process status code']}]" +List the codes and descriptions for all process status.,"SELECT process_status_code , process_status_description FROM Process_status",cre_Doc_Workflow,"[{'table_name': 'process status', 'table_schema': [{'col_name': 'process status code'}, {'col_name': 'process status description'}], 'foreign_key_columns': [], 'primary_keys': ['process status code']}]" +What is the description for process status code ct?,"SELECT process_status_description FROM Process_status WHERE process_status_code = ""ct""",cre_Doc_Workflow,"[{'table_name': 'process status', 'table_schema': [{'col_name': 'process status code'}, {'col_name': 'process status description'}], 'foreign_key_columns': [], 'primary_keys': ['process status code']}]" How many staff do we have?,SELECT count(*) FROM Staff,cre_Doc_Workflow,"[{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'staff details'}], 'foreign_key_columns': [], 'primary_keys': ['staff id']}]" Show the ids and details for all staff.,"SELECT staff_id , staff_details FROM Staff",cre_Doc_Workflow,"[{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'staff details'}], 'foreign_key_columns': [], 'primary_keys': ['staff id']}]" What are the details for the staff member with id 100.,SELECT staff_details FROM Staff WHERE staff_id = 100,cre_Doc_Workflow,"[{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'staff details'}], 'foreign_key_columns': [], 'primary_keys': ['staff id']}]" Show the number of staff roles.,SELECT count(*) FROM Ref_staff_roles,cre_Doc_Workflow,[] List the codes and descriptions for all staff roles.,"SELECT staff_role_code , staff_role_description FROM Ref_staff_roles",cre_Doc_Workflow,[] What is the description for staff role code HR?,"SELECT staff_role_description FROM Ref_staff_roles WHERE staff_role_code = ""HR""",cre_Doc_Workflow,[] -How many documents have a process?,SELECT count(DISTINCT document_id) FROM Documents_processes,cre_Doc_Workflow,[] -List all process ids with a document.,SELECT DISTINCT process_id FROM Documents_processes,cre_Doc_Workflow,[] -Show all document ids without a process.,SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_processes,cre_Doc_Workflow,"[{'table_name': 'documents', 'table_schema': [{'col_name': 'document id'}, {'col_name': 'author name'}, {'col_name': 'document name'}, {'col_name': 'document description'}, {'col_name': 'other details'}], 'foreign_key_columns': ['author name'], 'primary_keys': ['document id']}]" -List all process ids with no document.,SELECT process_id FROM Business_processes EXCEPT SELECT process_id FROM Documents_processes,cre_Doc_Workflow,[] -What is the process outcome description and process status description for the document with id 0?,"SELECT T2.process_outcome_description , T3.process_status_description FROM Documents_processes AS T1 JOIN Process_outcomes AS T2 ON T1.process_outcome_code = T2.process_outcome_code JOIN Process_Status AS T3 ON T1.process_status_code = T3.process_status_code WHERE T1.document_id = 0",cre_Doc_Workflow,[] -"What is the process name for the document ""Travel to Brazil""?","SELECT T3.process_name FROM Documents_processes AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id JOIN Business_processes AS T3 ON T1.process_id = T3.process_id WHERE T2.document_name = ""Travel to Brazil""",cre_Doc_Workflow,"[{'table_name': 'documents', 'table_schema': [{'col_name': 'document id'}, {'col_name': 'author name'}, {'col_name': 'document name'}, {'col_name': 'document description'}, {'col_name': 'other details'}], 'foreign_key_columns': ['author name'], 'primary_keys': ['document id']}]" -Show all process ids and the number of documents in each process.,"SELECT process_id , count(*) FROM Documents_processes GROUP BY process_id",cre_Doc_Workflow,[] -How many staff are the document with id 0 and process with id 9.,SELECT count(*) FROM Staff_in_processes WHERE document_id = 0 AND process_id = 9,cre_Doc_Workflow,[] -Show all staff ids and the number of document processes for each staff.,"SELECT staff_id , count(*) FROM Staff_in_processes GROUP BY staff_id",cre_Doc_Workflow,[] -Show all staff role codes and the number of document processes for each role.,"SELECT staff_role_code , count(*) FROM Staff_in_processes GROUP BY staff_role_code",cre_Doc_Workflow,[] -How many different roles does the staff with id 3 have?,SELECT count(DISTINCT staff_role_code) FROM Staff_in_processes WHERE staff_id = 3,cre_Doc_Workflow,[] +How many documents have a process?,SELECT count(DISTINCT document_id) FROM Documents_processes,cre_Doc_Workflow,"[{'table_name': 'documents processes', 'table_schema': [{'col_name': 'document id'}, {'col_name': 'process id'}, {'col_name': 'process outcome code'}, {'col_name': 'process status code'}], 'foreign_key_columns': ['process status code', 'process outcome code', 'process id', 'document id'], 'primary_keys': ['document id']}]" +List all process ids with a document.,SELECT DISTINCT process_id FROM Documents_processes,cre_Doc_Workflow,"[{'table_name': 'documents processes', 'table_schema': [{'col_name': 'document id'}, {'col_name': 'process id'}, {'col_name': 'process outcome code'}, {'col_name': 'process status code'}], 'foreign_key_columns': ['process status code', 'process outcome code', 'process id', 'document id'], 'primary_keys': ['document id']}]" +Show all document ids without a process.,SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_processes,cre_Doc_Workflow,"[{'table_name': 'documents', 'table_schema': [{'col_name': 'document id'}, {'col_name': 'author name'}, {'col_name': 'document name'}, {'col_name': 'document description'}, {'col_name': 'other details'}], 'foreign_key_columns': ['author name'], 'primary_keys': ['document id']}, {'table_name': 'documents processes', 'table_schema': [{'col_name': 'document id'}, {'col_name': 'process id'}, {'col_name': 'process outcome code'}, {'col_name': 'process status code'}], 'foreign_key_columns': ['process status code', 'process outcome code', 'process id', 'document id'], 'primary_keys': ['document id']}]" +List all process ids with no document.,SELECT process_id FROM Business_processes EXCEPT SELECT process_id FROM Documents_processes,cre_Doc_Workflow,"[{'table_name': 'business processes', 'table_schema': [{'col_name': 'process id'}, {'col_name': 'next process id'}, {'col_name': 'process name'}, {'col_name': 'process description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['process id']}, {'table_name': 'documents processes', 'table_schema': [{'col_name': 'document id'}, {'col_name': 'process id'}, {'col_name': 'process outcome code'}, {'col_name': 'process status code'}], 'foreign_key_columns': ['process status code', 'process outcome code', 'process id', 'document id'], 'primary_keys': ['document id']}]" +What is the process outcome description and process status description for the document with id 0?,"SELECT T2.process_outcome_description , T3.process_status_description FROM Documents_processes AS T1 JOIN Process_outcomes AS T2 ON T1.process_outcome_code = T2.process_outcome_code JOIN Process_Status AS T3 ON T1.process_status_code = T3.process_status_code WHERE T1.document_id = 0",cre_Doc_Workflow,"[{'table_name': 'process outcomes', 'table_schema': [{'col_name': 'process outcome code'}, {'col_name': 'process outcome description'}], 'foreign_key_columns': [], 'primary_keys': ['process outcome code']}, {'table_name': 'process status', 'table_schema': [{'col_name': 'process status code'}, {'col_name': 'process status description'}], 'foreign_key_columns': [], 'primary_keys': ['process status code']}, {'table_name': 'documents processes', 'table_schema': [{'col_name': 'document id'}, {'col_name': 'process id'}, {'col_name': 'process outcome code'}, {'col_name': 'process status code'}], 'foreign_key_columns': ['process status code', 'process outcome code', 'process id', 'document id'], 'primary_keys': ['document id']}]" +"What is the process name for the document ""Travel to Brazil""?","SELECT T3.process_name FROM Documents_processes AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id JOIN Business_processes AS T3 ON T1.process_id = T3.process_id WHERE T2.document_name = ""Travel to Brazil""",cre_Doc_Workflow,"[{'table_name': 'documents', 'table_schema': [{'col_name': 'document id'}, {'col_name': 'author name'}, {'col_name': 'document name'}, {'col_name': 'document description'}, {'col_name': 'other details'}], 'foreign_key_columns': ['author name'], 'primary_keys': ['document id']}, {'table_name': 'business processes', 'table_schema': [{'col_name': 'process id'}, {'col_name': 'next process id'}, {'col_name': 'process name'}, {'col_name': 'process description'}, {'col_name': 'other details'}], 'foreign_key_columns': [], 'primary_keys': ['process id']}, {'table_name': 'documents processes', 'table_schema': [{'col_name': 'document id'}, {'col_name': 'process id'}, {'col_name': 'process outcome code'}, {'col_name': 'process status code'}], 'foreign_key_columns': ['process status code', 'process outcome code', 'process id', 'document id'], 'primary_keys': ['document id']}]" +Show all process ids and the number of documents in each process.,"SELECT process_id , count(*) FROM Documents_processes GROUP BY process_id",cre_Doc_Workflow,"[{'table_name': 'documents processes', 'table_schema': [{'col_name': 'document id'}, {'col_name': 'process id'}, {'col_name': 'process outcome code'}, {'col_name': 'process status code'}], 'foreign_key_columns': ['process status code', 'process outcome code', 'process id', 'document id'], 'primary_keys': ['document id']}]" +How many staff are the document with id 0 and process with id 9.,SELECT count(*) FROM Staff_in_processes WHERE document_id = 0 AND process_id = 9,cre_Doc_Workflow,"[{'table_name': 'staff in processes', 'table_schema': [{'col_name': 'document id'}, {'col_name': 'process id'}, {'col_name': 'staff id'}, {'col_name': 'staff role code'}, {'col_name': 'date from'}, {'col_name': 'date to'}, {'col_name': 'other details'}], 'foreign_key_columns': ['staff role code', 'document id', 'process id', 'staff id'], 'primary_keys': ['document id']}]" +Show all staff ids and the number of document processes for each staff.,"SELECT staff_id , count(*) FROM Staff_in_processes GROUP BY staff_id",cre_Doc_Workflow,"[{'table_name': 'staff in processes', 'table_schema': [{'col_name': 'document id'}, {'col_name': 'process id'}, {'col_name': 'staff id'}, {'col_name': 'staff role code'}, {'col_name': 'date from'}, {'col_name': 'date to'}, {'col_name': 'other details'}], 'foreign_key_columns': ['staff role code', 'document id', 'process id', 'staff id'], 'primary_keys': ['document id']}]" +Show all staff role codes and the number of document processes for each role.,"SELECT staff_role_code , count(*) FROM Staff_in_processes GROUP BY staff_role_code",cre_Doc_Workflow,"[{'table_name': 'staff in processes', 'table_schema': [{'col_name': 'document id'}, {'col_name': 'process id'}, {'col_name': 'staff id'}, {'col_name': 'staff role code'}, {'col_name': 'date from'}, {'col_name': 'date to'}, {'col_name': 'other details'}], 'foreign_key_columns': ['staff role code', 'document id', 'process id', 'staff id'], 'primary_keys': ['document id']}]" +How many different roles does the staff with id 3 have?,SELECT count(DISTINCT staff_role_code) FROM Staff_in_processes WHERE staff_id = 3,cre_Doc_Workflow,"[{'table_name': 'staff in processes', 'table_schema': [{'col_name': 'document id'}, {'col_name': 'process id'}, {'col_name': 'staff id'}, {'col_name': 'staff role code'}, {'col_name': 'date from'}, {'col_name': 'date to'}, {'col_name': 'other details'}], 'foreign_key_columns': ['staff role code', 'document id', 'process id', 'staff id'], 'primary_keys': ['document id']}]" How many agencies do we have?,SELECT count(*) FROM Agencies,advertising_agencies,"[{'table_name': 'agencies', 'table_schema': [{'col_name': 'agency id'}, {'col_name': 'agency details'}], 'foreign_key_columns': [], 'primary_keys': ['agency id']}]" Count the number of agencies.,SELECT count(*) FROM Agencies,advertising_agencies,"[{'table_name': 'agencies', 'table_schema': [{'col_name': 'agency id'}, {'col_name': 'agency details'}], 'foreign_key_columns': [], 'primary_keys': ['agency id']}]" Show all agency ids and details.,"SELECT agency_id , agency_details FROM Agencies",advertising_agencies,"[{'table_name': 'agencies', 'table_schema': [{'col_name': 'agency id'}, {'col_name': 'agency details'}], 'foreign_key_columns': [], 'primary_keys': ['agency id']}]" @@ -2130,19 +2130,19 @@ Show the meeting type codes and the number of meeting for each client.,"SELECT m How many meetings are there for each meeting type?,"SELECT meeting_type , count(*) FROM Meetings GROUP BY meeting_type",advertising_agencies,"[{'table_name': 'meetings', 'table_schema': [{'col_name': 'meeting id'}, {'col_name': 'client id'}, {'col_name': 'meeting outcome'}, {'col_name': 'meeting type'}, {'col_name': 'billable yn'}, {'col_name': 'start date time'}, {'col_name': 'end date time'}, {'col_name': 'purpose of meeting'}, {'col_name': 'other details'}], 'foreign_key_columns': ['client id'], 'primary_keys': ['meeting id']}]" "Show all meeting ids, meeting outcomes, meeting types and the details of the client atttending it.","SELECT T1.meeting_id , T1.meeting_outcome , T1.meeting_type , T2.client_details FROM meetings AS T1 JOIN clients AS T2 ON T1.client_id = T2.client_id",advertising_agencies,"[{'table_name': 'clients', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'agency id'}, {'col_name': 'sic code'}, {'col_name': 'client details'}], 'foreign_key_columns': ['agency id'], 'primary_keys': ['client id']}, {'table_name': 'meetings', 'table_schema': [{'col_name': 'meeting id'}, {'col_name': 'client id'}, {'col_name': 'meeting outcome'}, {'col_name': 'meeting type'}, {'col_name': 'billable yn'}, {'col_name': 'start date time'}, {'col_name': 'end date time'}, {'col_name': 'purpose of meeting'}, {'col_name': 'other details'}], 'foreign_key_columns': ['client id'], 'primary_keys': ['meeting id']}]" "What are the meeting ids, meeting outcomes, meeting types, and client details for all meetings?","SELECT T1.meeting_id , T1.meeting_outcome , T1.meeting_type , T2.client_details FROM meetings AS T1 JOIN clients AS T2 ON T1.client_id = T2.client_id",advertising_agencies,"[{'table_name': 'clients', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'agency id'}, {'col_name': 'sic code'}, {'col_name': 'client details'}], 'foreign_key_columns': ['agency id'], 'primary_keys': ['client id']}, {'table_name': 'meetings', 'table_schema': [{'col_name': 'meeting id'}, {'col_name': 'client id'}, {'col_name': 'meeting outcome'}, {'col_name': 'meeting type'}, {'col_name': 'billable yn'}, {'col_name': 'start date time'}, {'col_name': 'end date time'}, {'col_name': 'purpose of meeting'}, {'col_name': 'other details'}], 'foreign_key_columns': ['client id'], 'primary_keys': ['meeting id']}]" -Show the meeting ids and the number of staff in each meeting.,"SELECT meeting_id , count(*) FROM Staff_in_meetings GROUP BY meeting_id",advertising_agencies,[] -Count the number of staff in each meeting by meeting id.,"SELECT meeting_id , count(*) FROM Staff_in_meetings GROUP BY meeting_id",advertising_agencies,[] -Show the staff id and the number of meetings attended by the staff who attended some meeting but had the lowest attendance.,"SELECT staff_id , count(*) FROM Staff_in_meetings GROUP BY staff_id ORDER BY count(*) ASC LIMIT 1;",advertising_agencies,[] -What is the staff id of the staff who attended the least meetings but attended some meeting?,"SELECT staff_id , count(*) FROM Staff_in_meetings GROUP BY staff_id ORDER BY count(*) ASC LIMIT 1;",advertising_agencies,[] -How many staff have attended a meeting?,SELECT count(DISTINCT staff_id) FROM Staff_in_meetings,advertising_agencies,[] -Return the number of distinct staff who have attended a meeting?,SELECT count(DISTINCT staff_id) FROM Staff_in_meetings,advertising_agencies,[] -How many staff did not attend any meeting?,SELECT count(*) FROM Staff WHERE staff_id NOT IN ( SELECT staff_id FROM Staff_in_meetings ),advertising_agencies,"[{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'agency id'}, {'col_name': 'staff details'}], 'foreign_key_columns': [], 'primary_keys': ['staff id']}]" -Count the number of staff who did not attend any meeting.,SELECT count(*) FROM Staff WHERE staff_id NOT IN ( SELECT staff_id FROM Staff_in_meetings ),advertising_agencies,"[{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'agency id'}, {'col_name': 'staff details'}], 'foreign_key_columns': [], 'primary_keys': ['staff id']}]" +Show the meeting ids and the number of staff in each meeting.,"SELECT meeting_id , count(*) FROM Staff_in_meetings GROUP BY meeting_id",advertising_agencies,"[{'table_name': 'staff in meetings', 'table_schema': [{'col_name': 'meeting id'}, {'col_name': 'staff id'}], 'foreign_key_columns': ['staff id', 'meeting id'], 'primary_keys': []}]" +Count the number of staff in each meeting by meeting id.,"SELECT meeting_id , count(*) FROM Staff_in_meetings GROUP BY meeting_id",advertising_agencies,"[{'table_name': 'staff in meetings', 'table_schema': [{'col_name': 'meeting id'}, {'col_name': 'staff id'}], 'foreign_key_columns': ['staff id', 'meeting id'], 'primary_keys': []}]" +Show the staff id and the number of meetings attended by the staff who attended some meeting but had the lowest attendance.,"SELECT staff_id , count(*) FROM Staff_in_meetings GROUP BY staff_id ORDER BY count(*) ASC LIMIT 1;",advertising_agencies,"[{'table_name': 'staff in meetings', 'table_schema': [{'col_name': 'meeting id'}, {'col_name': 'staff id'}], 'foreign_key_columns': ['staff id', 'meeting id'], 'primary_keys': []}]" +What is the staff id of the staff who attended the least meetings but attended some meeting?,"SELECT staff_id , count(*) FROM Staff_in_meetings GROUP BY staff_id ORDER BY count(*) ASC LIMIT 1;",advertising_agencies,"[{'table_name': 'staff in meetings', 'table_schema': [{'col_name': 'meeting id'}, {'col_name': 'staff id'}], 'foreign_key_columns': ['staff id', 'meeting id'], 'primary_keys': []}]" +How many staff have attended a meeting?,SELECT count(DISTINCT staff_id) FROM Staff_in_meetings,advertising_agencies,"[{'table_name': 'staff in meetings', 'table_schema': [{'col_name': 'meeting id'}, {'col_name': 'staff id'}], 'foreign_key_columns': ['staff id', 'meeting id'], 'primary_keys': []}]" +Return the number of distinct staff who have attended a meeting?,SELECT count(DISTINCT staff_id) FROM Staff_in_meetings,advertising_agencies,"[{'table_name': 'staff in meetings', 'table_schema': [{'col_name': 'meeting id'}, {'col_name': 'staff id'}], 'foreign_key_columns': ['staff id', 'meeting id'], 'primary_keys': []}]" +How many staff did not attend any meeting?,SELECT count(*) FROM Staff WHERE staff_id NOT IN ( SELECT staff_id FROM Staff_in_meetings ),advertising_agencies,"[{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'agency id'}, {'col_name': 'staff details'}], 'foreign_key_columns': [], 'primary_keys': ['staff id']}, {'table_name': 'staff in meetings', 'table_schema': [{'col_name': 'meeting id'}, {'col_name': 'staff id'}], 'foreign_key_columns': ['staff id', 'meeting id'], 'primary_keys': []}]" +Count the number of staff who did not attend any meeting.,SELECT count(*) FROM Staff WHERE staff_id NOT IN ( SELECT staff_id FROM Staff_in_meetings ),advertising_agencies,"[{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'agency id'}, {'col_name': 'staff details'}], 'foreign_key_columns': [], 'primary_keys': ['staff id']}, {'table_name': 'staff in meetings', 'table_schema': [{'col_name': 'meeting id'}, {'col_name': 'staff id'}], 'foreign_key_columns': ['staff id', 'meeting id'], 'primary_keys': []}]" What are the ids and details of the clients who have attended any meeting or have any invoice?,"SELECT T1.client_id , T1.client_details FROM Clients AS T1 JOIN meetings AS T2 ON T1.client_id = T2.client_id UNION SELECT T1.client_id , T1.client_details FROM Clients AS T1 JOIN invoices AS T2 ON T1.client_id = T2.client_id",advertising_agencies,"[{'table_name': 'clients', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'agency id'}, {'col_name': 'sic code'}, {'col_name': 'client details'}], 'foreign_key_columns': ['agency id'], 'primary_keys': ['client id']}, {'table_name': 'invoices', 'table_schema': [{'col_name': 'invoice id'}, {'col_name': 'client id'}, {'col_name': 'invoice status'}, {'col_name': 'invoice details'}], 'foreign_key_columns': ['client id'], 'primary_keys': ['invoice id']}, {'table_name': 'meetings', 'table_schema': [{'col_name': 'meeting id'}, {'col_name': 'client id'}, {'col_name': 'meeting outcome'}, {'col_name': 'meeting type'}, {'col_name': 'billable yn'}, {'col_name': 'start date time'}, {'col_name': 'end date time'}, {'col_name': 'purpose of meeting'}, {'col_name': 'other details'}], 'foreign_key_columns': ['client id'], 'primary_keys': ['meeting id']}]" Return the ids and details of clients who have attended a meeting or had an invoice.,"SELECT T1.client_id , T1.client_details FROM Clients AS T1 JOIN meetings AS T2 ON T1.client_id = T2.client_id UNION SELECT T1.client_id , T1.client_details FROM Clients AS T1 JOIN invoices AS T2 ON T1.client_id = T2.client_id",advertising_agencies,"[{'table_name': 'clients', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'agency id'}, {'col_name': 'sic code'}, {'col_name': 'client details'}], 'foreign_key_columns': ['agency id'], 'primary_keys': ['client id']}, {'table_name': 'invoices', 'table_schema': [{'col_name': 'invoice id'}, {'col_name': 'client id'}, {'col_name': 'invoice status'}, {'col_name': 'invoice details'}], 'foreign_key_columns': ['client id'], 'primary_keys': ['invoice id']}, {'table_name': 'meetings', 'table_schema': [{'col_name': 'meeting id'}, {'col_name': 'client id'}, {'col_name': 'meeting outcome'}, {'col_name': 'meeting type'}, {'col_name': 'billable yn'}, {'col_name': 'start date time'}, {'col_name': 'end date time'}, {'col_name': 'purpose of meeting'}, {'col_name': 'other details'}], 'foreign_key_columns': ['client id'], 'primary_keys': ['meeting id']}]" What are the ids and details of the staff who have attended at least 1 meetings and have the detail with letter 's'?,"SELECT staff_id , staff_details FROM staff WHERE staff_details LIKE ""%s%"" GROUP BY staff_id HAVING count(*) >= 1",advertising_agencies,"[{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'agency id'}, {'col_name': 'staff details'}], 'foreign_key_columns': [], 'primary_keys': ['staff id']}]" Return the ids and details of staff who have attended at least 1 meeting and have an s in their staff details?,"SELECT staff_id , staff_details FROM staff WHERE staff_details LIKE ""%s%"" GROUP BY staff_id HAVING count(*) >= 1",advertising_agencies,"[{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'agency id'}, {'col_name': 'staff details'}], 'foreign_key_columns': [], 'primary_keys': ['staff id']}]" "What are the id, sic code and agency id of the client who has attended 1 meeting and has any invoice.","SELECT T1.client_id , T1.sic_code , T1.agency_id FROM clients AS T1 JOIN meetings AS T2 ON T1.client_id = T2.client_id GROUP BY T1.client_id HAVING count(*) = 1 INTERSECT SELECT T1.client_id , T1.sic_code , T1.agency_id FROM clients AS T1 JOIN invoices AS T2 ON T1.client_id = T2.client_id",advertising_agencies,"[{'table_name': 'clients', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'agency id'}, {'col_name': 'sic code'}, {'col_name': 'client details'}], 'foreign_key_columns': ['agency id'], 'primary_keys': ['client id']}, {'table_name': 'invoices', 'table_schema': [{'col_name': 'invoice id'}, {'col_name': 'client id'}, {'col_name': 'invoice status'}, {'col_name': 'invoice details'}], 'foreign_key_columns': ['client id'], 'primary_keys': ['invoice id']}, {'table_name': 'meetings', 'table_schema': [{'col_name': 'meeting id'}, {'col_name': 'client id'}, {'col_name': 'meeting outcome'}, {'col_name': 'meeting type'}, {'col_name': 'billable yn'}, {'col_name': 'start date time'}, {'col_name': 'end date time'}, {'col_name': 'purpose of meeting'}, {'col_name': 'other details'}], 'foreign_key_columns': ['client id'], 'primary_keys': ['meeting id']}]" "Return the ids, sic codes, and agency ids of clients who have attended 1 meeting and had an invoice.","SELECT T1.client_id , T1.sic_code , T1.agency_id FROM clients AS T1 JOIN meetings AS T2 ON T1.client_id = T2.client_id GROUP BY T1.client_id HAVING count(*) = 1 INTERSECT SELECT T1.client_id , T1.sic_code , T1.agency_id FROM clients AS T1 JOIN invoices AS T2 ON T1.client_id = T2.client_id",advertising_agencies,"[{'table_name': 'clients', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'agency id'}, {'col_name': 'sic code'}, {'col_name': 'client details'}], 'foreign_key_columns': ['agency id'], 'primary_keys': ['client id']}, {'table_name': 'invoices', 'table_schema': [{'col_name': 'invoice id'}, {'col_name': 'client id'}, {'col_name': 'invoice status'}, {'col_name': 'invoice details'}], 'foreign_key_columns': ['client id'], 'primary_keys': ['invoice id']}, {'table_name': 'meetings', 'table_schema': [{'col_name': 'meeting id'}, {'col_name': 'client id'}, {'col_name': 'meeting outcome'}, {'col_name': 'meeting type'}, {'col_name': 'billable yn'}, {'col_name': 'start date time'}, {'col_name': 'end date time'}, {'col_name': 'purpose of meeting'}, {'col_name': 'other details'}], 'foreign_key_columns': ['client id'], 'primary_keys': ['meeting id']}]" -"List the start time, end time of each meeting, and the corresponding client detail and staff detail.","SELECT T1.start_date_time , T1.end_date_time , T2.client_details , T4.staff_details FROM meetings AS T1 JOIN clients AS T2 ON T1.client_id = T2.client_id JOIN staff_in_meetings AS T3 ON T1.meeting_id = T3.meeting_id JOIN staff AS T4 ON T3.staff_id = T4.staff_id",advertising_agencies,"[{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'agency id'}, {'col_name': 'staff details'}], 'foreign_key_columns': [], 'primary_keys': ['staff id']}, {'table_name': 'clients', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'agency id'}, {'col_name': 'sic code'}, {'col_name': 'client details'}], 'foreign_key_columns': ['agency id'], 'primary_keys': ['client id']}, {'table_name': 'meetings', 'table_schema': [{'col_name': 'meeting id'}, {'col_name': 'client id'}, {'col_name': 'meeting outcome'}, {'col_name': 'meeting type'}, {'col_name': 'billable yn'}, {'col_name': 'start date time'}, {'col_name': 'end date time'}, {'col_name': 'purpose of meeting'}, {'col_name': 'other details'}], 'foreign_key_columns': ['client id'], 'primary_keys': ['meeting id']}]" -"What are the start and end times of each meeting, as well as the corresponding client and staff details the attendees?","SELECT T1.start_date_time , T1.end_date_time , T2.client_details , T4.staff_details FROM meetings AS T1 JOIN clients AS T2 ON T1.client_id = T2.client_id JOIN staff_in_meetings AS T3 ON T1.meeting_id = T3.meeting_id JOIN staff AS T4 ON T3.staff_id = T4.staff_id",advertising_agencies,"[{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'agency id'}, {'col_name': 'staff details'}], 'foreign_key_columns': [], 'primary_keys': ['staff id']}, {'table_name': 'clients', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'agency id'}, {'col_name': 'sic code'}, {'col_name': 'client details'}], 'foreign_key_columns': ['agency id'], 'primary_keys': ['client id']}, {'table_name': 'meetings', 'table_schema': [{'col_name': 'meeting id'}, {'col_name': 'client id'}, {'col_name': 'meeting outcome'}, {'col_name': 'meeting type'}, {'col_name': 'billable yn'}, {'col_name': 'start date time'}, {'col_name': 'end date time'}, {'col_name': 'purpose of meeting'}, {'col_name': 'other details'}], 'foreign_key_columns': ['client id'], 'primary_keys': ['meeting id']}]" +"List the start time, end time of each meeting, and the corresponding client detail and staff detail.","SELECT T1.start_date_time , T1.end_date_time , T2.client_details , T4.staff_details FROM meetings AS T1 JOIN clients AS T2 ON T1.client_id = T2.client_id JOIN staff_in_meetings AS T3 ON T1.meeting_id = T3.meeting_id JOIN staff AS T4 ON T3.staff_id = T4.staff_id",advertising_agencies,"[{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'agency id'}, {'col_name': 'staff details'}], 'foreign_key_columns': [], 'primary_keys': ['staff id']}, {'table_name': 'clients', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'agency id'}, {'col_name': 'sic code'}, {'col_name': 'client details'}], 'foreign_key_columns': ['agency id'], 'primary_keys': ['client id']}, {'table_name': 'meetings', 'table_schema': [{'col_name': 'meeting id'}, {'col_name': 'client id'}, {'col_name': 'meeting outcome'}, {'col_name': 'meeting type'}, {'col_name': 'billable yn'}, {'col_name': 'start date time'}, {'col_name': 'end date time'}, {'col_name': 'purpose of meeting'}, {'col_name': 'other details'}], 'foreign_key_columns': ['client id'], 'primary_keys': ['meeting id']}, {'table_name': 'staff in meetings', 'table_schema': [{'col_name': 'meeting id'}, {'col_name': 'staff id'}], 'foreign_key_columns': ['staff id', 'meeting id'], 'primary_keys': []}]" +"What are the start and end times of each meeting, as well as the corresponding client and staff details the attendees?","SELECT T1.start_date_time , T1.end_date_time , T2.client_details , T4.staff_details FROM meetings AS T1 JOIN clients AS T2 ON T1.client_id = T2.client_id JOIN staff_in_meetings AS T3 ON T1.meeting_id = T3.meeting_id JOIN staff AS T4 ON T3.staff_id = T4.staff_id",advertising_agencies,"[{'table_name': 'staff', 'table_schema': [{'col_name': 'staff id'}, {'col_name': 'agency id'}, {'col_name': 'staff details'}], 'foreign_key_columns': [], 'primary_keys': ['staff id']}, {'table_name': 'clients', 'table_schema': [{'col_name': 'client id'}, {'col_name': 'agency id'}, {'col_name': 'sic code'}, {'col_name': 'client details'}], 'foreign_key_columns': ['agency id'], 'primary_keys': ['client id']}, {'table_name': 'meetings', 'table_schema': [{'col_name': 'meeting id'}, {'col_name': 'client id'}, {'col_name': 'meeting outcome'}, {'col_name': 'meeting type'}, {'col_name': 'billable yn'}, {'col_name': 'start date time'}, {'col_name': 'end date time'}, {'col_name': 'purpose of meeting'}, {'col_name': 'other details'}], 'foreign_key_columns': ['client id'], 'primary_keys': ['meeting id']}, {'table_name': 'staff in meetings', 'table_schema': [{'col_name': 'meeting id'}, {'col_name': 'staff id'}], 'foreign_key_columns': ['staff id', 'meeting id'], 'primary_keys': []}]"