db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
college_3 | select avg(t2.gradepoint) from enrolled_in as t1 join gradeconversion as t2 join student as t3 on t1.grade = t2.lettergrade and t1.stuid = t3.stuid where t3.lname = 'smith' | Question: what is the average gradepoint for students with the last name smith? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Faculty -> FacID, Lname, Fname, Rank, Sex, Phone, Room, Building. Department -> DNO, Division, DName, Room, Building, DPhone. Member_of -> FacID, DNO, Appt_Type.... | what is the average gradepoint for students with the last name smith? |
college_3 | select max(t2.gradepoint) , min(t2.gradepoint) from enrolled_in as t1 join gradeconversion as t2 join student as t3 on t1.grade = t2.lettergrade and t1.stuid = t3.stuid where t3.city_code = 'nyc' | Question: what is the maximum and minimum grade point of students who live in nyc? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Faculty -> FacID, Lname, Fname, Rank, Sex, Phone, Room, Building. Department -> DNO, Division, DName, Room, Building, DPhone. Member_of -> FacID, DNO, Appt_Ty... | what is the maximum and minimum grade point of students who live in nyc? |
college_3 | select max(t2.gradepoint) , min(t2.gradepoint) from enrolled_in as t1 join gradeconversion as t2 join student as t3 on t1.grade = t2.lettergrade and t1.stuid = t3.stuid where t3.city_code = 'nyc' | Question: give the maximum and minimum gradepoints for students living in nyc? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Faculty -> FacID, Lname, Fname, Rank, Sex, Phone, Room, Building. Department -> DNO, Division, DName, Room, Building, DPhone. Member_of -> FacID, DNO, Appt_Type. ... | give the maximum and minimum gradepoints for students living in nyc? |
college_3 | select cname from course where credits = 3 union select cname from course where credits = 1 and hours = 4 | Question: find the names of courses that have either 3 credits or 1 credit but 4 hours. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Faculty -> FacID, Lname, Fname, Rank, Sex, Phone, Room, Building. Department -> DNO, Division, DName, Room, Building, DPhone. Member_of -> FacID, DNO, Ap... | find the names of courses that have either 3 credits or 1 credit but 4 hours. |
college_3 | select cname from course where credits = 3 union select cname from course where credits = 1 and hours = 4 | Question: what are the names of courses that give either 3 credits, or 1 credit and 4 hours? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Faculty -> FacID, Lname, Fname, Rank, Sex, Phone, Room, Building. Department -> DNO, Division, DName, Room, Building, DPhone. Member_of -> FacID, DN... | what are the names of courses that give either 3 credits, or 1 credit and 4 hours? |
college_3 | select dname from department where division = 'as' union select dname from department where division = 'en' and building = 'neb' | Question: find the names of departments that are either in division as or in division en and in building neb. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Faculty -> FacID, Lname, Fname, Rank, Sex, Phone, Room, Building. Department -> DNO, Division, DName, Room, Building, DPhone. Membe... | find the names of departments that are either in division as or in division en and in building neb. |
college_3 | select dname from department where division = 'as' union select dname from department where division = 'en' and building = 'neb' | Question: what are the names of departments either in division as, or in division en and in building neb? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Faculty -> FacID, Lname, Fname, Rank, Sex, Phone, Room, Building. Department -> DNO, Division, DName, Room, Building, DPhone. Member_of... | what are the names of departments either in division as, or in division en and in building neb? |
college_3 | select fname from student where stuid not in (select stuid from enrolled_in) | Question: find the first name of students not enrolled in any course. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Faculty -> FacID, Lname, Fname, Rank, Sex, Phone, Room, Building. Department -> DNO, Division, DName, Room, Building, DPhone. Member_of -> FacID, DNO, Appt_Type. Course ->... | find the first name of students not enrolled in any course. |
college_3 | select fname from student where stuid not in (select stuid from enrolled_in) | Question: what are the first names of all students that are not enrolled in courses? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Faculty -> FacID, Lname, Fname, Rank, Sex, Phone, Room, Building. Department -> DNO, Division, DName, Room, Building, DPhone. Member_of -> FacID, DNO, Appt_... | what are the first names of all students that are not enrolled in courses? |
department_store | select product_id from product_suppliers order by total_amount_purchased desc limit 3 | Question: what are the ids of the top three products that were purchased in the largest amount? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. ... | what are the ids of the top three products that were purchased in the largest amount? |
department_store | select product_id from product_suppliers order by total_amount_purchased desc limit 3 | Question: give the ids of the three products purchased in the largest amounts. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> cust... | give the ids of the three products purchased in the largest amounts. |
department_store | select product_id , product_type_code from products order by product_price limit 1 | Question: what are the product id and product type of the cheapest product? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> custome... | what are the product id and product type of the cheapest product? |
department_store | select product_id , product_type_code from products order by product_price limit 1 | Question: give the id and product type of the product with the lowest price. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> custom... | give the id and product type of the product with the lowest price. |
department_store | select count(distinct product_type_code) from products | Question: find the number of different product types. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> customer_id, payment_method_c... | find the number of different product types. |
department_store | select count(distinct product_type_code) from products | Question: count the number of distinct product types. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> customer_id, payment_method_c... | count the number of distinct product types. |
department_store | select t1.address_details from addresses as t1 join customer_addresses as t2 on t1.address_id = t2.address_id where t2.customer_id = 10 | Question: return the address of customer 10. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> customer_id, payment_method_code, cust... | return the address of customer 10. |
department_store | select t1.address_details from addresses as t1 join customer_addresses as t2 on t1.address_id = t2.address_id where t2.customer_id = 10 | Question: what is the address for the customer with id 10? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> customer_id, payment_met... | what is the address for the customer with id 10? |
department_store | select t1.staff_id , t1.staff_gender from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id where t2.job_title_code = 'department manager' | Question: what are the staff ids and genders of all staffs whose job title is department manager? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name... | what are the staff ids and genders of all staffs whose job title is department manager? |
department_store | select t1.staff_id , t1.staff_gender from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id where t2.job_title_code = 'department manager' | Question: return the staff ids and genders for any staff with the title department manager. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Cust... | return the staff ids and genders for any staff with the title department manager. |
department_store | select payment_method_code , count(*) from customers group by payment_method_code | Question: for each payment method, return how many customers use it. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> customer_id, p... | for each payment method, return how many customers use it. |
department_store | select payment_method_code , count(*) from customers group by payment_method_code | Question: how many customers use each payment method? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> customer_id, payment_method_c... | how many customers use each payment method? |
department_store | select product_id from order_items group by product_id order by count(*) desc limit 1 | Question: what is the id of the product that was ordered the most often? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> customer_i... | what is the id of the product that was ordered the most often? |
department_store | select product_id from order_items group by product_id order by count(*) desc limit 1 | Question: give the product id for the product that was ordered most frequently. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> cus... | give the product id for the product that was ordered most frequently. |
department_store | select t1.customer_name , t1.customer_phone , t1.customer_email from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id group by t2.customer_id order by count(*) desc limit 1 | Question: what are the name, phone number and email address of the customer who made the largest number of orders? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept... | what are the name, phone number and email address of the customer who made the largest number of orders? |
department_store | select t1.customer_name , t1.customer_phone , t1.customer_email from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id group by t2.customer_id order by count(*) desc limit 1 | Question: return the name, phone number and email address for the customer with the most orders. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name.... | return the name, phone number and email address for the customer with the most orders. |
department_store | select product_type_code , avg(product_price) from products group by product_type_code | Question: what is the average price for each type of product? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> customer_id, payment_... | what is the average price for each type of product? |
department_store | select product_type_code , avg(product_price) from products group by product_type_code | Question: return the average price for each product type. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> customer_id, payment_meth... | return the average price for each product type. |
department_store | select count(*) from department_stores as t1 join department_store_chain as t2 on t1.dept_store_chain_id = t2.dept_store_chain_id where t2.dept_store_chain_name = 'south' | Question: how many department stores does the store chain south have? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> customer_id, ... | how many department stores does the store chain south have? |
department_store | select count(*) from department_stores as t1 join department_store_chain as t2 on t1.dept_store_chain_id = t2.dept_store_chain_id where t2.dept_store_chain_name = 'south' | Question: count the number of stores the chain south has. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> customer_id, payment_meth... | count the number of stores the chain south has. |
department_store | select t1.staff_name , t2.job_title_code from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id order by t2.date_assigned_to desc limit 1 | Question: what is the name and job title of the staff who was assigned the latest? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> ... | what is the name and job title of the staff who was assigned the latest? |
department_store | select t1.staff_name , t2.job_title_code from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id order by t2.date_assigned_to desc limit 1 | Question: return the name and job title of the staff with the latest date assigned. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers ->... | return the name and job title of the staff with the latest date assigned. |
department_store | select t2.product_type_code , t2.product_name , t2.product_price from product_suppliers as t1 join products as t2 on t1.product_id = t2.product_id where t1.supplier_id = 3 | Question: give me the product type, name and price for all the products supplied by supplier id 3. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_nam... | give me the product type, name and price for all the products supplied by supplier id 3. |
department_store | select t2.product_type_code , t2.product_name , t2.product_price from product_suppliers as t1 join products as t2 on t1.product_id = t2.product_id where t1.supplier_id = 3 | Question: return the product type, name, and price for products supplied by supplier 3. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customer... | return the product type, name, and price for products supplied by supplier 3. |
department_store | select distinct t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where t2.order_status_code = 'pending' order by t2.customer_id | Question: return the distinct name of customers whose order status is pending, in the order of customer id. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_... | return the distinct name of customers whose order status is pending, in the order of customer id. |
department_store | select distinct t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where t2.order_status_code = 'pending' order by t2.customer_id | Question: what are the distinct names of customers with an order status of pending, sorted by customer id? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_c... | what are the distinct names of customers with an order status of pending, sorted by customer id? |
department_store | select t1.customer_name , t1.customer_address from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where t2.order_status_code = 'new' intersect select t1.customer_name , t1.customer_address from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where t2.... | Question: find the name and address of the customers who have both new and pending orders. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Custo... | find the name and address of the customers who have both new and pending orders. |
department_store | select t1.customer_name , t1.customer_address from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where t2.order_status_code = 'new' intersect select t1.customer_name , t1.customer_address from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where t2.... | Question: what are the names and addressed of customers who have both new and pending orders? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Cu... | what are the names and addressed of customers who have both new and pending orders? |
department_store | select t1.product_id from product_suppliers as t1 join products as t2 on t1.product_id = t2.product_id where t1.supplier_id = 2 and t2.product_price > (select avg(product_price) from products) | Question: return ids of all the products that are supplied by supplier id 2 and are more expensive than the average price of all products. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> d... | return ids of all the products that are supplied by supplier id 2 and are more expensive than the average price of all products. |
department_store | select t1.product_id from product_suppliers as t1 join products as t2 on t1.product_id = t2.product_id where t1.supplier_id = 2 and t2.product_price > (select avg(product_price) from products) | Question: what are the ids of products from the supplier with id 2, which are more expensive than the average price across all products? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dep... | what are the ids of products from the supplier with id 2, which are more expensive than the average price across all products? |
department_store | select t2.dept_store_id , t2.store_name from departments as t1 join department_stores as t2 on t1.dept_store_id = t2.dept_store_id where t1.department_name = 'marketing' intersect select t2.dept_store_id , t2.store_name from departments as t1 join department_stores as t2 on t1.dept_store_id = t2.dept_store_id w... | Question: what is the id and name of the department store that has both marketing and managing department? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_c... | what is the id and name of the department store that has both marketing and managing department? |
department_store | select t2.dept_store_id , t2.store_name from departments as t1 join department_stores as t2 on t1.dept_store_id = t2.dept_store_id where t1.department_name = 'marketing' intersect select t2.dept_store_id , t2.store_name from departments as t1 join department_stores as t2 on t1.dept_store_id = t2.dept_store_id w... | Question: what are the ids and names of department stores with both marketing and managing departments? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chai... | what are the ids and names of department stores with both marketing and managing departments? |
department_store | select dept_store_chain_id from department_stores group by dept_store_chain_id order by count(*) desc limit 2 | Question: what are the ids of the two department store chains with the largest number of department stores? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_... | what are the ids of the two department store chains with the largest number of department stores? |
department_store | select dept_store_chain_id from department_stores group by dept_store_chain_id order by count(*) desc limit 2 | Question: return the ids of the two department store chains with the most department stores. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Cus... | return the ids of the two department store chains with the most department stores. |
department_store | select department_id from staff_department_assignments group by department_id order by count(*) limit 1 | Question: what is the id of the department with the least number of staff? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> customer... | what is the id of the department with the least number of staff? |
department_store | select department_id from staff_department_assignments group by department_id order by count(*) limit 1 | Question: return the id of the department with the fewest staff assignments. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> custom... | return the id of the department with the fewest staff assignments. |
department_store | select product_type_code , max(product_price) , min(product_price) from products group by product_type_code | Question: for each product type, return the maximum and minimum price. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> customer_id,... | for each product type, return the maximum and minimum price. |
department_store | select product_type_code , max(product_price) , min(product_price) from products group by product_type_code | Question: what are the maximum and minimum product prices for each product type? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> cu... | what are the maximum and minimum product prices for each product type? |
department_store | select product_type_code from products group by product_type_code having avg(product_price) > (select avg(product_price) from products) | Question: find the product type whose average price is higher than the average price of all products. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_... | find the product type whose average price is higher than the average price of all products. |
department_store | select product_type_code from products group by product_type_code having avg(product_price) > (select avg(product_price) from products) | Question: what is the code of the product type with an average price higher than the average price of all products? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dep... | what is the code of the product type with an average price higher than the average price of all products? |
department_store | select t1.staff_id , t1.staff_name from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id order by date_assigned_to - date_assigned_from limit 1 | Question: find the id and name of the staff who has been assigned for the shortest period. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Custo... | find the id and name of the staff who has been assigned for the shortest period. |
department_store | select t1.staff_id , t1.staff_name from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id order by date_assigned_to - date_assigned_from limit 1 | Question: what is the id and name of the staff who has been assigned for the least amount of time? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_nam... | what is the id and name of the staff who has been assigned for the least amount of time? |
department_store | select product_name , product_id from products where product_price between 600 and 700 | Question: return the names and ids of all products whose price is between 600 and 700. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers... | return the names and ids of all products whose price is between 600 and 700. |
department_store | select product_name , product_id from products where product_price between 600 and 700 | Question: what are the names and ids of products costing between 600 and 700? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> custo... | what are the names and ids of products costing between 600 and 700? |
department_store | select distinct customer_id from customer_orders where order_date > (select min(order_date) from customer_orders where order_status_code = 'cancelled') | Question: find the ids of all distinct customers who made order after some orders that were cancelled. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain... | find the ids of all distinct customers who made order after some orders that were cancelled. |
department_store | select distinct customer_id from customer_orders where order_date > (select min(order_date) from customer_orders where order_status_code = 'cancelled') | Question: what are the distinct ids of customers who made an order after any order that was cancelled? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain... | what are the distinct ids of customers who made an order after any order that was cancelled? |
department_store | select staff_id from staff_department_assignments where date_assigned_to < (select max(date_assigned_to) from staff_department_assignments where job_title_code = 'clerical staff') | Question: what is id of the staff who had a staff department assignment earlier than any clerical staff? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_cha... | what is id of the staff who had a staff department assignment earlier than any clerical staff? |
department_store | select staff_id from staff_department_assignments where date_assigned_to < (select max(date_assigned_to) from staff_department_assignments where job_title_code = 'clerical staff') | Question: return the id of the staff whose staff department assignment was earlier than that of any clerical staff. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dep... | return the id of the staff whose staff department assignment was earlier than that of any clerical staff. |
department_store | select customer_name , customer_id from customers where customer_address like '%tn%' | Question: what are the names and ids of customers whose address contains tn? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> custom... | what are the names and ids of customers whose address contains tn? |
department_store | select customer_name , customer_id from customers where customer_address like '%tn%' | Question: return the names and ids of customers who have tn in their address. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> custo... | return the names and ids of customers who have tn in their address. |
department_store | select t1.staff_name , t1.staff_gender from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id where t2.date_assigned_from like '2016%' | Question: return the name and gender of the staff who was assigned in 2016. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> custome... | return the name and gender of the staff who was assigned in 2016. |
department_store | select t1.staff_name , t1.staff_gender from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id where t2.date_assigned_from like '2016%' | Question: what are the names and genders of staff who were assigned in 2016? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> custom... | what are the names and genders of staff who were assigned in 2016? |
department_store | select t1.staff_name from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id group by t2.staff_id having count (*) > 1 | Question: list the name of staff who has been assigned multiple jobs. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> customer_id, ... | list the name of staff who has been assigned multiple jobs. |
department_store | select t1.staff_name from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id group by t2.staff_id having count (*) > 1 | Question: what are the names of staff who have been assigned multiple jobs? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> custome... | what are the names of staff who have been assigned multiple jobs? |
department_store | select t1.supplier_name , t1.supplier_phone from suppliers as t1 join supplier_addresses as t2 on t1.supplier_id = t2.supplier_id join addresses as t3 on t2.address_id = t3.address_id order by t3.address_details | Question: list the name and phone number of all suppliers in the alphabetical order of their addresses. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chai... | list the name and phone number of all suppliers in the alphabetical order of their addresses. |
department_store | select t1.supplier_name , t1.supplier_phone from suppliers as t1 join supplier_addresses as t2 on t1.supplier_id = t2.supplier_id join addresses as t3 on t2.address_id = t3.address_id order by t3.address_details | Question: what are the names and phone numbers for all suppliers, sorted in alphabetical order of their addressed? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept... | what are the names and phone numbers for all suppliers, sorted in alphabetical order of their addressed? |
department_store | select customer_phone from customers union select supplier_phone from suppliers | Question: what are the phone numbers of all customers and suppliers. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> customer_id, p... | what are the phone numbers of all customers and suppliers. |
department_store | select customer_phone from customers union select supplier_phone from suppliers | Question: return the phone numbers for all customers and suppliers. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> customer_id, pa... | return the phone numbers for all customers and suppliers. |
department_store | select product_id from order_items group by product_id having count(*) > 3 union select product_id from product_suppliers group by product_id having sum(total_amount_purchased) > 80000 | Question: return the ids of all products that were ordered more than three times or supplied more than 80000. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_stor... | return the ids of all products that were ordered more than three times or supplied more than 80000. |
department_store | select product_id from order_items group by product_id having count(*) > 3 union select product_id from product_suppliers group by product_id having sum(total_amount_purchased) > 80000 | Question: what are the ids of all products that were either ordered more than 3 times or have a cumulative amount purchased of above 80000? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> ... | what are the ids of all products that were either ordered more than 3 times or have a cumulative amount purchased of above 80000? |
department_store | select product_id , product_name from products where product_price < 600 or product_price > 900 | Question: what are id and name of the products whose price is lower than 600 or higher than 900? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name.... | what are id and name of the products whose price is lower than 600 or higher than 900? |
department_store | select product_id , product_name from products where product_price < 600 or product_price > 900 | Question: give the ids and names of products with price lower than 600 or higher than 900. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Custo... | give the ids and names of products with price lower than 600 or higher than 900. |
department_store | select supplier_id from product_suppliers group by supplier_id having avg(total_amount_purchased) > 50000 or avg(total_amount_purchased) < 30000 | Question: find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_... | find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000. |
department_store | select supplier_id from product_suppliers group by supplier_id having avg(total_amount_purchased) > 50000 or avg(total_amount_purchased) < 30000 | Question: what are the ids of suppliers which have an average amount purchased of above 50000 or below 30000? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_stor... | what are the ids of suppliers which have an average amount purchased of above 50000 or below 30000? |
department_store | select avg(total_amount_purchased) , avg(total_value_purchased) from product_suppliers where supplier_id = (select supplier_id from product_suppliers group by supplier_id order by count(*) desc limit 1) | Question: what are the average amount purchased and value purchased for the supplier who supplies the most products. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, de... | what are the average amount purchased and value purchased for the supplier who supplies the most products. |
department_store | select avg(total_amount_purchased) , avg(total_value_purchased) from product_suppliers where supplier_id = (select supplier_id from product_suppliers group by supplier_id order by count(*) desc limit 1) | Question: return the average total amount purchased and total value purchased for the supplier who supplies the greatest number of products. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain ->... | return the average total amount purchased and total value purchased for the supplier who supplies the greatest number of products. |
department_store | select max(customer_code) , min(customer_code) from customers | Question: what is the largest and smallest customer codes? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> customer_id, payment_met... | what is the largest and smallest customer codes? |
department_store | select max(customer_code) , min(customer_code) from customers | Question: return the maximum and minimum customer codes. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> customer_id, payment_metho... | return the maximum and minimum customer codes. |
department_store | select distinct t1.customer_name from customers as t1 join customer_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 where t4.product_name = 'keyboard' | Question: list the names of all the distinct customers who bought a keyboard. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> custo... | list the names of all the distinct customers who bought a keyboard. |
department_store | select distinct t1.customer_name from customers as t1 join customer_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 where t4.product_name = 'keyboard' | Question: what are the distinct names of customers who have purchased a keyboard? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> c... | what are the distinct names of customers who have purchased a keyboard? |
department_store | select distinct t1.supplier_name , t1.supplier_phone from suppliers as t1 join product_suppliers as t2 on t1.supplier_id = t2.supplier_id join products as t3 on t2.product_id = t3.product_id where t3.product_name = 'red jeans' | Question: list the names and phone numbers of all the distinct suppliers who supply red jeans. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. C... | list the names and phone numbers of all the distinct suppliers who supply red jeans. |
department_store | select distinct t1.supplier_name , t1.supplier_phone from suppliers as t1 join product_suppliers as t2 on t1.supplier_id = t2.supplier_id join products as t3 on t2.product_id = t3.product_id where t3.product_name = 'red jeans' | Question: what are the distinct names and phone numbers for suppliers who have red jeans? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Custom... | what are the distinct names and phone numbers for suppliers who have red jeans? |
department_store | select max(product_price) , min(product_price) , product_type_code from products group by product_type_code order by product_type_code | Question: what are the highest and lowest prices of products, grouped by and alphabetically ordered by product type? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, de... | what are the highest and lowest prices of products, grouped by and alphabetically ordered by product type? |
department_store | select max(product_price) , min(product_price) , product_type_code from products group by product_type_code order by product_type_code | Question: give the maximum and minimum product prices for each product type, grouped and ordered by product type. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_... | give the maximum and minimum product prices for each product type, grouped and ordered by product type. |
department_store | select order_id , customer_id from customer_orders where order_status_code = 'cancelled' order by order_date | Question: list the order id, customer id for orders in cancelled status, ordered by their order dates. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain... | list the order id, customer id for orders in cancelled status, ordered by their order dates. |
department_store | select order_id , customer_id from customer_orders where order_status_code = 'cancelled' order by order_date | Question: what are the order ids and customer ids for orders that have been cancelled, sorted by their order dates? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dep... | what are the order ids and customer ids for orders that have been cancelled, sorted by their order dates? |
department_store | select distinct t3.product_name from customer_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 t3.product_id having count (distinct t1.customer_id) >= 2 | Question: find the names of products that were bought by at least two distinct customers. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Custom... | find the names of products that were bought by at least two distinct customers. |
department_store | select distinct t3.product_name from customer_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 t3.product_id having count (distinct t1.customer_id) >= 2 | Question: what are the distinct names of products purchased by at least two different customers? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name.... | what are the distinct names of products purchased by at least two different customers? |
department_store | select distinct t1.customer_name from customers as t1 join customer_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 (distinct t3.product_id) >= 3 | Question: find the names of customers who have bought by at least three distinct products. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Custo... | find the names of customers who have bought by at least three distinct products. |
department_store | select distinct t1.customer_name from customers as t1 join customer_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 (distinct t3.product_id) >= 3 | Question: what are the distinct names of customers who have purchased at least three different products? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_cha... | what are the distinct names of customers who have purchased at least three different products? |
department_store | select t1.staff_name , t1.staff_gender from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id where t2.job_title_code = 'sales person' except select t1.staff_name , t1.staff_gender from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id where t2.job_t... | Question: find the name and gender of the staff who has been assigned the job of sales person but never clerical staff. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id,... | find the name and gender of the staff who has been assigned the job of sales person but never clerical staff. |
department_store | select t1.staff_name , t1.staff_gender from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id where t2.job_title_code = 'sales person' except select t1.staff_name , t1.staff_gender from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id where t2.job_t... | Question: what are the names and genders of staff who have held the title sales person, but never clerical staff? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_... | what are the names and genders of staff who have held the title sales person, but never clerical staff? |
department_store | select customer_id , customer_name from customers where customer_address like '%wy%' and payment_method_code != 'credit card' | Question: find the id and name of customers whose address contains wy state and do not use credit card for payment. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dep... | find the id and name of customers whose address contains wy state and do not use credit card for payment. |
department_store | select customer_id , customer_name from customers where customer_address like '%wy%' and payment_method_code != 'credit card' | Question: what are the ids and names of customers with addressed that contain wy and who do not use a credit card for payment? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_ch... | what are the ids and names of customers with addressed that contain wy and who do not use a credit card for payment? |
department_store | select avg(product_price) from products where product_type_code = 'clothes' | Question: find the average price of all product clothes. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> customer_id, payment_metho... | find the average price of all product clothes. |
department_store | select avg(product_price) from products where product_type_code = 'clothes' | Question: what is the average price of clothes? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> customer_id, payment_method_code, c... | what is the average price of clothes? |
department_store | select product_name from products where product_type_code = 'hardware' order by product_price desc limit 1 | Question: find the name of the most expensive hardware product. | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> customer_id, paymen... | find the name of the most expensive hardware product. |
department_store | select product_name from products where product_type_code = 'hardware' order by product_price desc limit 1 | Question: what is the name of the hardware product with the greatest price? | Tables: Addresses -> address_id, address_details. Staff -> staff_id, staff_gender, staff_name. Suppliers -> supplier_id, supplier_name, supplier_phone. Department_Store_Chain -> dept_store_chain_id, dept_store_chain_name. Customers -> custome... | what is the name of the hardware product with the greatest price? |
aircraft | select count(*) from aircraft | Question: how many aircrafts are there? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. airport -> Airport_ID, Airport_Name, Total_Pa... | how many aircrafts are there? |
aircraft | select count(*) from aircraft | Question: what is the number of aircraft? | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. airport -> Airport_ID, Airport_Name, Total_... | what is the number of aircraft? |
aircraft | select description from aircraft | Question: list the description of all aircrafts. | Tables: pilot -> Pilot_Id, Name, Age. aircraft -> Aircraft_ID, Aircraft, Description, Max_Gross_Weight, Total_disk_area, Max_disk_Loading. match -> Round, Location, Country, Date, Fastest_Qualifying, Winning_Pilot, Winning_Aircraft. airport -> Airport_ID, Airport_Name,... | list the description of all aircrafts. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.