db_id
stringclasses 140
values | question
stringlengths 16
224
| schema
stringclasses 140
values | summarized-schema
stringlengths 18
304
| shrink-score
float64 0
1
|
---|---|---|---|---|
department_store
|
What are the ids of the top three products that were purchased in the largest amount?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
product_suppliers : product_id (number) , total_amount_purchased (text)
| 0.964286 |
department_store
|
Give the ids of the three products purchased in the largest amounts.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
product_suppliers : product_id (number) , total_amount_purchased (text)
| 0.964286 |
department_store
|
What are the product id and product type of the cheapest product?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_id (number) , product_type_code (text) , product_price (number)
| 0.946429 |
department_store
|
Give the id and product type of the product with the lowest price.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_id (number) , product_type_code (text) , product_price (number)
| 0.946429 |
department_store
|
Find the number of different product types.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_type_code (text)
| 0.982143 |
department_store
|
Count the number of distinct product types.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_type_code (text)
| 0.982143 |
department_store
|
Return the address of customer 10.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
addresses : address_details (text) , address_id (number) | customer_addresses : address_id (number) , customer_id (number)
| 0.928571 |
department_store
|
What is the address for the customer with id 10?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
addresses : address_details (text) , address_id (number) | customer_addresses : address_id (number) , customer_id (number)
| 0.928571 |
department_store
|
What are the staff ids and genders of all staffs whose job title is Department Manager?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
staff : staff_id (number) , staff_gender (text) | staff_department_assignments : staff_id (number) , job_title_code (text)
| 0.928571 |
department_store
|
Return the staff ids and genders for any staff with the title Department Manager.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
staff : staff_id (number) , staff_gender (text) | staff_department_assignments : staff_id (number) , job_title_code (text)
| 0.928571 |
department_store
|
For each payment method, return how many customers use it.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customers : payment_method_code (text) , customer_id (number)
| 0.964286 |
department_store
|
How many customers use each payment method?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customers : payment_method_code (text) , customer_id (number)
| 0.964286 |
department_store
|
What is the id of the product that was ordered the most often?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
order_items : product_id (number) , order_item_id (number)
| 0.964286 |
department_store
|
Give the product id for the product that was ordered most frequently.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
order_items : product_id (number) , order_item_id (number)
| 0.964286 |
department_store
|
What are the name, phone number and email address of the customer who made the largest number of orders?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customers : customer_name (text) , customer_phone (text) , customer_email (text) , customer_id (number) | customer_orders : customer_id (number) , order_id (number)
| 0.892857 |
department_store
|
Return the name, phone number and email address for the customer with the most orders.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customers : customer_name (text) , customer_phone (text) , customer_email (text) , customer_id (number) | customer_orders : customer_id (number) , order_id (number)
| 0.892857 |
department_store
|
What is the average price for each type of product?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_type_code (text) , product_price (number)
| 0.964286 |
department_store
|
Return the average price for each product type.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_type_code (text) , product_price (number)
| 0.964286 |
department_store
|
How many department stores does the store chain South have?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | department_stores : dept_store_chain_id (number) , dept_store_id (number)
| 0.928571 |
department_store
|
Count the number of stores the chain South has.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | department_stores : dept_store_chain_id (number) , dept_store_id (number)
| 0.928571 |
department_store
|
What is the name and job title of the staff who was assigned the latest?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
staff : staff_name (text) , staff_id (number) | staff_department_assignments : job_title_code (text) , staff_id (number) , date_assigned_to (time)
| 0.910714 |
department_store
|
Return the name and job title of the staff with the latest date assigned.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
staff : staff_name (text) , staff_id (number) | staff_department_assignments : job_title_code (text) , staff_id (number) , date_assigned_to (time)
| 0.910714 |
department_store
|
Give me the product type, name and price for all the products supplied by supplier id 3.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_type_code (text) , product_name (text) , product_price (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number)
| 0.892857 |
department_store
|
Return the product type, name, and price for products supplied by supplier 3.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_type_code (text) , product_name (text) , product_price (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number)
| 0.892857 |
department_store
|
Return the distinct name of customers whose order status is Pending, in the order of customer id.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customers : customer_name (text) , customer_id (number) | customer_orders : customer_id (number) , order_status_code (text)
| 0.928571 |
department_store
|
What are the distinct names of customers with an order status of Pending, sorted by customer id?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customers : customer_name (text) , customer_id (number) | customer_orders : customer_id (number) , order_status_code (text)
| 0.928571 |
department_store
|
Find the name and address of the customers who have both New and Pending orders.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customers : customer_name (text) , customer_address (text) , customer_id (number) | customer_orders : customer_id (number) , order_status_code (text)
| 0.910714 |
department_store
|
What are the names and addressed of customers who have both New and Pending orders?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customers : customer_name (text) , customer_address (text) , customer_id (number) | customer_orders : customer_id (number) , order_status_code (text)
| 0.910714 |
department_store
|
Return ids of all the products that are supplied by supplier id 2 and are more expensive than the average price of all products.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_id (number) , product_price (number) | product_suppliers : product_id (number) , supplier_id (number)
| 0.928571 |
department_store
|
What are the ids of products from the supplier with id 2, which are more expensive than the average price across all products?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_id (number) , product_price (number) | product_suppliers : product_id (number) , supplier_id (number)
| 0.928571 |
department_store
|
What is the id and name of the department store that has both marketing and managing department?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
department_stores : dept_store_id (number) , store_name (text) | departments : dept_store_id (number) , department_name (text)
| 0.928571 |
department_store
|
What are the ids and names of department stores with both marketing and managing departments?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
department_stores : dept_store_id (number) , store_name (text) | departments : dept_store_id (number) , department_name (text)
| 0.928571 |
department_store
|
What are the ids of the two department store chains with the largest number of department stores?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
department_stores : dept_store_chain_id (number) , dept_store_id (number)
| 0.964286 |
department_store
|
Return the ids of the two department store chains with the most department stores.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
department_stores : dept_store_chain_id (number) , dept_store_id (number)
| 0.964286 |
department_store
|
What is the id of the department with the least number of staff?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
staff_department_assignments : department_id (number) , staff_id (number)
| 0.964286 |
department_store
|
Return the id of the department with the fewest staff assignments.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
staff_department_assignments : department_id (number) , staff_id (number)
| 0.964286 |
department_store
|
For each product type, return the maximum and minimum price.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_type_code (text) , product_price (number)
| 0.964286 |
department_store
|
What are the maximum and minimum product prices for each product type?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_type_code (text) , product_price (number)
| 0.964286 |
department_store
|
Find the product type whose average price is higher than the average price of all products.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_type_code (text) , product_price (number)
| 0.964286 |
department_store
|
What is the code of the product type with an average price higher than the average price of all products?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_type_code (text) , product_price (number)
| 0.964286 |
department_store
|
Find the id and name of the staff who has been assigned for the shortest period.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
staff : staff_id (number) , staff_name (text) | staff_department_assignments : staff_id (number) , date_assigned_to (time) , date_assigned_from (time)
| 0.910714 |
department_store
|
What is the id and name of the staff who has been assigned for the least amount of time?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
staff : staff_id (number) , staff_name (text) | staff_department_assignments : staff_id (number) , date_assigned_to (time) , date_assigned_from (time)
| 0.910714 |
department_store
|
Return the names and ids of all products whose price is between 600 and 700.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_name (text) , product_id (number) , product_price (number)
| 0.946429 |
department_store
|
What are the names and ids of products costing between 600 and 700?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_name (text) , product_id (number) , product_price (number)
| 0.946429 |
department_store
|
Find the ids of all distinct customers who made order after some orders that were Cancelled.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customer_orders : customer_id (number) , order_date (time) , order_status_code (text)
| 0.946429 |
department_store
|
What are the distinct ids of customers who made an order after any order that was Cancelled?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customer_orders : customer_id (number) , order_date (time) , order_status_code (text)
| 0.946429 |
department_store
|
What is id of the staff who had a Staff Department Assignment earlier than any Clerical Staff?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
staff_department_assignments : staff_id (number) , date_assigned_to (time) , job_title_code (text)
| 0.946429 |
department_store
|
Return the id of the staff whose Staff Department Assignment was earlier than that of any Clerical Staff.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
staff_department_assignments : staff_id (number) , date_assigned_to (time) , job_title_code (text)
| 0.946429 |
department_store
|
What are the names and ids of customers whose address contains TN?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customers : customer_name (text) , customer_id (number) , customer_address (text)
| 0.946429 |
department_store
|
Return the names and ids of customers who have TN in their address.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customers : customer_name (text) , customer_id (number) , customer_address (text)
| 0.946429 |
department_store
|
Return the name and gender of the staff who was assigned in 2016.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
staff : staff_name (text) , staff_gender (text) , staff_id (number) | staff_department_assignments : staff_id (number) , date_assigned_from (time)
| 0.910714 |
department_store
|
What are the names and genders of staff who were assigned in 2016?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
staff : staff_name (text) , staff_gender (text) , staff_id (number) | staff_department_assignments : staff_id (number) , date_assigned_from (time)
| 0.910714 |
department_store
|
List the name of staff who has been assigned multiple jobs.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
staff : staff_name (text) , staff_id (number) | staff_department_assignments : staff_id (number)
| 0.946429 |
department_store
|
What are the names of staff who have been assigned multiple jobs?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
staff : staff_name (text) , staff_id (number) | staff_department_assignments : staff_id (number)
| 0.946429 |
department_store
|
List the name and phone number of all suppliers in the alphabetical order of their addresses.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
suppliers : supplier_name (text) , supplier_phone (text) , supplier_id (number) | supplier_addresses : supplier_id (number) , address_id (number) | addresses : address_id (number) , address_details (text)
| 0.875 |
department_store
|
What are the names and phone numbers for all suppliers, sorted in alphabetical order of their addressed?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
suppliers : supplier_name (text) , supplier_phone (text) , supplier_id (number) | supplier_addresses : supplier_id (number) , address_id (number) | addresses : address_id (number) , address_details (text)
| 0.875 |
department_store
|
What are the phone numbers of all customers and suppliers.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customers : customer_phone (text) | suppliers : supplier_phone (text)
| 0.964286 |
department_store
|
Return the phone numbers for all customers and suppliers.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customers : customer_phone (text) | suppliers : supplier_phone (text)
| 0.964286 |
department_store
|
Return the ids of all products that were ordered more than three times or supplied more than 80000.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
order_items : product_id (number) , order_item_id (number) | product_suppliers : product_id (number) , total_amount_purchased (text)
| 0.928571 |
department_store
|
What are the ids of all products that were either ordered more than 3 times or have a cumulative amount purchased of above 80000?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
order_items : product_id (number) , order_item_id (number) | product_suppliers : product_id (number) , total_amount_purchased (text)
| 0.928571 |
department_store
|
What are id and name of the products whose price is lower than 600 or higher than 900?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_id (number) , product_name (text) , product_price (number)
| 0.946429 |
department_store
|
Give the ids and names of products with price lower than 600 or higher than 900.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_id (number) , product_name (text) , product_price (number)
| 0.946429 |
department_store
|
Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
product_suppliers : supplier_id (number) , total_amount_purchased (text)
| 0.964286 |
department_store
|
What are the ids of suppliers which have an average amount purchased of above 50000 or below 30000?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
product_suppliers : supplier_id (number) , total_amount_purchased (text)
| 0.964286 |
department_store
|
What are the average amount purchased and value purchased for the supplier who supplies the most products.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
product_suppliers : total_amount_purchased (text) , total_value_purchased (number) , supplier_id (number) , product_id (number)
| 0.928571 |
department_store
|
Return the average total amount purchased and total value purchased for the supplier who supplies the greatest number of products.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
product_suppliers : total_amount_purchased (text) , total_value_purchased (number) , supplier_id (number) , product_id (number)
| 0.928571 |
department_store
|
What is the largest and smallest customer codes?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customers : customer_code (text)
| 0.982143 |
department_store
|
Return the maximum and minimum customer codes.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customers : customer_code (text)
| 0.982143 |
department_store
|
List the names of all the distinct customers who bought a keyboard.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customers : customer_name (text) , customer_id (number) | customer_orders : customer_id (number) , order_id (number) | order_items : order_id (number) , product_id (number) | products : product_id (number) , product_name (text)
| 0.857143 |
department_store
|
What are the distinct names of customers who have purchased a keyboard?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customers : customer_name (text) , customer_id (number) | customer_orders : customer_id (number) , order_id (number) | order_items : order_id (number) , product_id (number) | products : product_id (number) , product_name (text)
| 0.857143 |
department_store
|
List the names and phone numbers of all the distinct suppliers who supply red jeans.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
suppliers : supplier_name (text) , supplier_phone (text) , supplier_id (number) | product_suppliers : supplier_id (number) , product_id (number) | products : product_id (number) , product_name (text)
| 0.875 |
department_store
|
What are the distinct names and phone numbers for suppliers who have red jeans?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
suppliers : supplier_name (text) , supplier_phone (text) , supplier_id (number) | product_suppliers : supplier_id (number) , product_id (number) | products : product_id (number) , product_name (text)
| 0.875 |
department_store
|
What are the highest and lowest prices of products, grouped by and alphabetically ordered by product type?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_price (number) , product_type_code (text)
| 0.964286 |
department_store
|
Give the maximum and minimum product prices for each product type, grouped and ordered by product type.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_price (number) , product_type_code (text)
| 0.964286 |
department_store
|
List the order id, customer id for orders in Cancelled status, ordered by their order dates.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time)
| 0.928571 |
department_store
|
What are the order ids and customer ids for orders that have been Cancelled, sorted by their order dates?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time)
| 0.928571 |
department_store
|
Find the names of products that were bought by at least two distinct customers.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_name (text) , product_id (number) | customer_orders : order_id (number) , customer_id (number) | order_items : order_id (number) , product_id (number)
| 0.892857 |
department_store
|
What are the distinct names of products purchased by at least two different customers?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_name (text) , product_id (number) | customer_orders : order_id (number) , customer_id (number) | order_items : order_id (number) , product_id (number)
| 0.892857 |
department_store
|
Find the names of customers who have bought by at least three distinct products.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customers : customer_name (text) , customer_id (number) | customer_orders : customer_id (number) , order_id (number) | order_items : order_id (number) , product_id (number)
| 0.892857 |
department_store
|
What are the distinct names of customers who have purchased at least three different products?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customers : customer_name (text) , customer_id (number) | customer_orders : customer_id (number) , order_id (number) | order_items : order_id (number) , product_id (number)
| 0.892857 |
department_store
|
Find the name and gender of the staff who has been assigned the job of Sales Person but never Clerical Staff.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
staff : staff_name (text) , staff_gender (text) , staff_id (number) | staff_department_assignments : staff_id (number) , job_title_code (text)
| 0.910714 |
department_store
|
What are the names and genders of staff who have held the title Sales Person, but never Clerical Staff?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
staff : staff_name (text) , staff_gender (text) , staff_id (number) | staff_department_assignments : staff_id (number) , job_title_code (text)
| 0.910714 |
department_store
|
Find the id and name of customers whose address contains WY state and do not use credit card for payment.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customers : customer_id (number) , customer_name (text) , customer_address (text) , payment_method_code (text)
| 0.928571 |
department_store
|
What are the ids and names of customers with addressed that contain WY and who do not use a credit card for payment?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
customers : customer_id (number) , customer_name (text) , customer_address (text) , payment_method_code (text)
| 0.928571 |
department_store
|
Find the average price of all product clothes.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_price (number) , product_type_code (text)
| 0.964286 |
department_store
|
What is the average price of clothes?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_price (number) , product_type_code (text)
| 0.964286 |
department_store
|
Find the name of the most expensive hardware product.
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_name (text) , product_type_code (text) , product_price (number)
| 0.946429 |
department_store
|
What is the name of the hardware product with the greatest price?
|
addresses : address_id (number) , address_details (text) | staff : staff_id (number) , staff_gender (text) , staff_name (text) | suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | department_store_chain : dept_store_chain_id (number) , dept_store_chain_name (text) | customers : customer_id (number) , payment_method_code (text) , customer_code (text) , customer_name (text) , customer_address (text) , customer_phone (text) , customer_email (text) | products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | supplier_addresses : supplier_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_addresses : customer_id (number) , address_id (number) , date_from (time) , date_to (time) | customer_orders : order_id (number) , customer_id (number) , order_status_code (text) , order_date (time) | department_stores : dept_store_id (number) , dept_store_chain_id (number) , store_name (text) , store_address (text) , store_phone (text) , store_email (text) | departments : department_id (number) , dept_store_id (number) , department_name (text) | order_items : order_item_id (number) , order_id (number) , product_id (number) | product_suppliers : product_id (number) , supplier_id (number) , date_supplied_from (time) , date_supplied_to (time) , total_amount_purchased (text) , total_value_purchased (number) | staff_department_assignments : staff_id (number) , department_id (number) , date_assigned_from (time) , job_title_code (text) , date_assigned_to (time)
|
products : product_name (text) , product_type_code (text) , product_price (number)
| 0.946429 |
aircraft
|
How many aircrafts are there?
|
pilot : pilot_id (number) , name (text) , age (number) | aircraft : aircraft_id (number) , aircraft (text) , description (text) , max_gross_weight (text) , total_disk_area (text) , max_disk_loading (text) | match : round (number) , location (text) , country (text) , date (text) , fastest_qualifying (text) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (number) , airport_name (text) , total_passengers (number) , %_change_2007 (text) , international_passengers (number) , domestic_passengers (number) , transit_passengers (number) , aircraft_movements (number) , freight_metric_tonnes (number) | airport_aircraft : id (number) , airport_id (number) , aircraft_id (number)
|
aircraft : aircraft (text) , aircraft_id (number)
| 0.928571 |
aircraft
|
What is the number of aircraft?
|
pilot : pilot_id (number) , name (text) , age (number) | aircraft : aircraft_id (number) , aircraft (text) , description (text) , max_gross_weight (text) , total_disk_area (text) , max_disk_loading (text) | match : round (number) , location (text) , country (text) , date (text) , fastest_qualifying (text) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (number) , airport_name (text) , total_passengers (number) , %_change_2007 (text) , international_passengers (number) , domestic_passengers (number) , transit_passengers (number) , aircraft_movements (number) , freight_metric_tonnes (number) | airport_aircraft : id (number) , airport_id (number) , aircraft_id (number)
|
aircraft : aircraft (text) , aircraft_id (number)
| 0.928571 |
aircraft
|
List the description of all aircrafts.
|
pilot : pilot_id (number) , name (text) , age (number) | aircraft : aircraft_id (number) , aircraft (text) , description (text) , max_gross_weight (text) , total_disk_area (text) , max_disk_loading (text) | match : round (number) , location (text) , country (text) , date (text) , fastest_qualifying (text) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (number) , airport_name (text) , total_passengers (number) , %_change_2007 (text) , international_passengers (number) , domestic_passengers (number) , transit_passengers (number) , aircraft_movements (number) , freight_metric_tonnes (number) | airport_aircraft : id (number) , airport_id (number) , aircraft_id (number)
|
aircraft : description (text) , aircraft (text)
| 0.928571 |
aircraft
|
What are the descriptions for the aircrafts?
|
pilot : pilot_id (number) , name (text) , age (number) | aircraft : aircraft_id (number) , aircraft (text) , description (text) , max_gross_weight (text) , total_disk_area (text) , max_disk_loading (text) | match : round (number) , location (text) , country (text) , date (text) , fastest_qualifying (text) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (number) , airport_name (text) , total_passengers (number) , %_change_2007 (text) , international_passengers (number) , domestic_passengers (number) , transit_passengers (number) , aircraft_movements (number) , freight_metric_tonnes (number) | airport_aircraft : id (number) , airport_id (number) , aircraft_id (number)
|
aircraft : description (text) , aircraft (text)
| 0.928571 |
aircraft
|
What is the average number of international passengers of all airports?
|
pilot : pilot_id (number) , name (text) , age (number) | aircraft : aircraft_id (number) , aircraft (text) , description (text) , max_gross_weight (text) , total_disk_area (text) , max_disk_loading (text) | match : round (number) , location (text) , country (text) , date (text) , fastest_qualifying (text) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (number) , airport_name (text) , total_passengers (number) , %_change_2007 (text) , international_passengers (number) , domestic_passengers (number) , transit_passengers (number) , aircraft_movements (number) , freight_metric_tonnes (number) | airport_aircraft : id (number) , airport_id (number) , aircraft_id (number)
|
airport : international_passengers (number)
| 0.964286 |
aircraft
|
What is the average number of international passengers for an airport?
|
pilot : pilot_id (number) , name (text) , age (number) | aircraft : aircraft_id (number) , aircraft (text) , description (text) , max_gross_weight (text) , total_disk_area (text) , max_disk_loading (text) | match : round (number) , location (text) , country (text) , date (text) , fastest_qualifying (text) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (number) , airport_name (text) , total_passengers (number) , %_change_2007 (text) , international_passengers (number) , domestic_passengers (number) , transit_passengers (number) , aircraft_movements (number) , freight_metric_tonnes (number) | airport_aircraft : id (number) , airport_id (number) , aircraft_id (number)
|
airport : international_passengers (number)
| 0.964286 |
aircraft
|
What are the number of international and domestic passengers of the airport named London "Heathrow"?
|
pilot : pilot_id (number) , name (text) , age (number) | aircraft : aircraft_id (number) , aircraft (text) , description (text) , max_gross_weight (text) , total_disk_area (text) , max_disk_loading (text) | match : round (number) , location (text) , country (text) , date (text) , fastest_qualifying (text) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (number) , airport_name (text) , total_passengers (number) , %_change_2007 (text) , international_passengers (number) , domestic_passengers (number) , transit_passengers (number) , aircraft_movements (number) , freight_metric_tonnes (number) | airport_aircraft : id (number) , airport_id (number) , aircraft_id (number)
|
airport : international_passengers (number) , domestic_passengers (number) , airport_name (text)
| 0.892857 |
aircraft
|
How many international and domestic passengers are there in the airport London Heathrow?
|
pilot : pilot_id (number) , name (text) , age (number) | aircraft : aircraft_id (number) , aircraft (text) , description (text) , max_gross_weight (text) , total_disk_area (text) , max_disk_loading (text) | match : round (number) , location (text) , country (text) , date (text) , fastest_qualifying (text) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (number) , airport_name (text) , total_passengers (number) , %_change_2007 (text) , international_passengers (number) , domestic_passengers (number) , transit_passengers (number) , aircraft_movements (number) , freight_metric_tonnes (number) | airport_aircraft : id (number) , airport_id (number) , aircraft_id (number)
|
airport : international_passengers (number) , domestic_passengers (number) , airport_name (text)
| 0.892857 |
aircraft
|
What are the total number of Domestic Passengers of airports that contain the word "London".
|
pilot : pilot_id (number) , name (text) , age (number) | aircraft : aircraft_id (number) , aircraft (text) , description (text) , max_gross_weight (text) , total_disk_area (text) , max_disk_loading (text) | match : round (number) , location (text) , country (text) , date (text) , fastest_qualifying (text) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (number) , airport_name (text) , total_passengers (number) , %_change_2007 (text) , international_passengers (number) , domestic_passengers (number) , transit_passengers (number) , aircraft_movements (number) , freight_metric_tonnes (number) | airport_aircraft : id (number) , airport_id (number) , aircraft_id (number)
|
airport : domestic_passengers (number) , airport_name (text)
| 0.928571 |
aircraft
|
What are the total number of domestic passengers at all London airports?
|
pilot : pilot_id (number) , name (text) , age (number) | aircraft : aircraft_id (number) , aircraft (text) , description (text) , max_gross_weight (text) , total_disk_area (text) , max_disk_loading (text) | match : round (number) , location (text) , country (text) , date (text) , fastest_qualifying (text) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (number) , airport_name (text) , total_passengers (number) , %_change_2007 (text) , international_passengers (number) , domestic_passengers (number) , transit_passengers (number) , aircraft_movements (number) , freight_metric_tonnes (number) | airport_aircraft : id (number) , airport_id (number) , aircraft_id (number)
|
airport : domestic_passengers (number) , airport_name (text)
| 0.928571 |
aircraft
|
What are the maximum and minimum number of transit passengers of all aiports.
|
pilot : pilot_id (number) , name (text) , age (number) | aircraft : aircraft_id (number) , aircraft (text) , description (text) , max_gross_weight (text) , total_disk_area (text) , max_disk_loading (text) | match : round (number) , location (text) , country (text) , date (text) , fastest_qualifying (text) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (number) , airport_name (text) , total_passengers (number) , %_change_2007 (text) , international_passengers (number) , domestic_passengers (number) , transit_passengers (number) , aircraft_movements (number) , freight_metric_tonnes (number) | airport_aircraft : id (number) , airport_id (number) , aircraft_id (number)
|
airport : transit_passengers (number)
| 0.964286 |
aircraft
|
What is the maximum and mininum number of transit passengers for all airports?
|
pilot : pilot_id (number) , name (text) , age (number) | aircraft : aircraft_id (number) , aircraft (text) , description (text) , max_gross_weight (text) , total_disk_area (text) , max_disk_loading (text) | match : round (number) , location (text) , country (text) , date (text) , fastest_qualifying (text) , winning_pilot (text) , winning_aircraft (text) | airport : airport_id (number) , airport_name (text) , total_passengers (number) , %_change_2007 (text) , international_passengers (number) , domestic_passengers (number) , transit_passengers (number) , aircraft_movements (number) , freight_metric_tonnes (number) | airport_aircraft : id (number) , airport_id (number) , aircraft_id (number)
|
airport : transit_passengers (number)
| 0.964286 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.