Database schema:
CREATE TABLE Products (
  product_id NUMBER PRIMARY KEY,
  parent_product_id NUMBER,
  product_name TEXT,
  product_price NUMBER,
  product_color TEXT,
  product_size TEXT,
  product_description TEXT
);
CREATE TABLE Customers (
  customer_id NUMBER PRIMARY KEY,
  gender_code TEXT,
  customer_first_name TEXT,
  customer_middle_initial TEXT,
  customer_last_name TEXT,
  email_address TEXT,
  login_name TEXT,
  login_password TEXT,
  phone_number TEXT,
  address_line_1 TEXT,
  town_city TEXT,
  county TEXT,
  country TEXT
);
CREATE TABLE Customer_Payment_Methods (
  customer_id NUMBER,
  payment_method_code TEXT,
  FOREIGN KEY (customer_id) REFERENCES Customers(customer_id)
);
CREATE TABLE Invoices (
  invoice_number NUMBER PRIMARY KEY,
  invoice_status_code TEXT,
  invoice_date TIME
);
CREATE TABLE Orders (
  order_id NUMBER PRIMARY KEY,
  customer_id NUMBER,
  order_status_code TEXT,
  date_order_placed TIME,
  FOREIGN KEY (customer_id) REFERENCES Customers(customer_id)
);
CREATE TABLE Order_Items (
  order_item_id NUMBER PRIMARY KEY,
  product_id NUMBER,
  order_id NUMBER,
  order_item_status_code TEXT,
  FOREIGN KEY (order_id) REFERENCES Orders(order_id),
  FOREIGN KEY (product_id) REFERENCES Products(product_id)
);
CREATE TABLE Shipments (
  shipment_id NUMBER PRIMARY KEY,
  order_id NUMBER,
  invoice_number NUMBER,
  shipment_tracking_number TEXT,
  shipment_date TIME,
  FOREIGN KEY (order_id) REFERENCES Orders(order_id),
  FOREIGN KEY (invoice_number) REFERENCES Invoices(invoice_number)
);
CREATE TABLE Shipment_Items (
  shipment_id NUMBER PRIMARY KEY,
  order_item_id NUMBER,
  FOREIGN KEY (order_item_id) REFERENCES Order_Items(order_item_id),
  FOREIGN KEY (shipment_id) REFERENCES Shipments(shipment_id)
);

Question: List the customers' first name, middle initial, last name and payment methods.
SQL: SELECT T1.customer_first_name ,  T1.customer_middle_initial ,  T1.customer_last_name ,  T2.Payment_method_code FROM Customers AS T1 JOIN Customer_Payment_Methods AS T2 ON T1.customer_id  =  T2.customer_id

Question: What are the colors , descriptions , and sizes for all products that are not at the maximum price ?
SQL: select product_color ,  product_description ,  product_size from products where product_price  !=  ( select max(product_price) from products )

Question: What is the most uncommon order status?
SQL: SELECT order_status_code FROM Orders GROUP BY order_status_code ORDER BY count(*) LIMIT 1

Question: How many number of products does each gender of customers buy? List the gender and the number
SQL: SELECT T1.gender_code ,  count(*) FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id  =  T2.customer_id JOIN Order_items AS T3 ON T2.order_id  =  T3.order_id GROUP BY T1.gender_code

Question: List all the distinct product names, price and descriptions which are bought by female customers.
SQL: SELECT DISTINCT T1.product_name ,  T1.product_price ,  T1.product_description FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id  =  T2.product_id JOIN Orders AS T3 ON T2.order_id  =  T3.order_id JOIN Customers AS T4 ON T3.customer_id  =  T4.customer_id WHERE T4.gender_code  =  'Female'

Question: What is the average price of the products being ordered?
SQL: SELECT avg(T1.product_price) FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id  =  T2.product_id

Question: Which customers did not make any orders? List the first name, middle initial and last name.
SQL: SELECT customer_first_name ,  customer_middle_initial ,  customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name ,  T1.customer_middle_initial ,  T1.customer_last_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id  =  T2.customer_id

Question: How many different payment methods can customers choose from?
SQL: SELECT count(DISTINCT Payment_method_code) FROM Customer_Payment_Methods

Question: What is the product average price?
SQL: SELECT avg(product_price) FROM Products

Question: Which product are listed in orders most frequently? List the id, product name and price.
SQL: SELECT T1.product_id ,  T1.product_name ,  T1.product_price FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id  =  T2.product_id GROUP BY T1.product_id ORDER BY count(*) DESC LIMIT 1

Question: What are the ids, first and last names of the customers who have ordered more than twice and have bought at least 3 items?
SQL: SELECT T1.customer_id ,  T1.customer_first_name ,  T1.customer_last_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id HAVING count(*)  >  2 INTERSECT SELECT T1.customer_id ,  T1.customer_first_name ,  T1.customer_last_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id  =  T2.customer_id JOIN Order_items AS T3 ON T2.order_id  =  T3.order_id GROUP BY T1.customer_id HAVING count(*)  >= 3

Question: What are the names of the products tht have been shipped, and on what days were they shipped?
SQL: SELECT T1.product_name ,  T4.shipment_date FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id  =  T2.product_id JOIN Shipment_Items AS T3 ON T2.order_item_id  =  T3.order_item_id JOIN Shipments AS T4 ON T3.shipment_id  =  T4.shipment_id

Question: What are the tracking numbers and dates for all shipments listed?
SQL: SELECT shipment_tracking_number ,  shipment_date FROM Shipments

Question: What are all the order status and all the dates of orders?
SQL: SELECT order_status_code ,  date_order_placed FROM Orders

Question: Which order have the least sum of the product prices. List the order id and sum.
SQL: SELECT T1.order_id ,  sum(T2.product_price) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id  =  T2.product_id GROUP BY T1.order_id ORDER BY sum(T2.product_price) ASC LIMIT 1

Question: What are the product price and the product size of the products whose price is above average?
SQL: SELECT product_price ,  product_size FROM Products WHERE product_price  >  ( SELECT avg(product_price) FROM Products )

Question: For the orders with any produts, how many products does each orders contain ? List the order id, status and the number.
SQL: SELECT T1.order_id ,  T1.order_status_code ,  count(*) FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id  =  T2.order_id GROUP BY T1.order_id

Question: What are the sizes of all products whose name includes the word 'Dell'?
SQL: SELECT product_size FROM Products WHERE product_name LIKE '%Dell%'

Question: For all products sold more than 3 times, what are their ids and descriptions?
SQL: SELECT T1.product_id ,  T1.product_description FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id  =  T2.product_id GROUP BY T1.product_id HAVING count(*)  >  3

Question: What are the dates of the earliest order and the dates of all orders with more than 1 item?
SQL: SELECT min(date_order_placed) FROM Orders UNION SELECT T1.date_order_placed FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id  =  T2.order_id GROUP BY T1.order_id HAVING count(*)  >  1

Question: What are the email address, town and county of the customers who are of the least common gender?
SQL: SELECT email_address ,  town_city ,  county FROM Customers WHERE gender_code  =  ( SELECT gender_code FROM Customers GROUP BY gender_code ORDER BY count(*) ASC LIMIT 1 )

Question: What is the most popular payment method?
SQL: SELECT Payment_method_code FROM Customer_Payment_Methods GROUP BY Payment_method_code ORDER BY count(*) DESC LIMIT 1

Question: How many kinds of products have not been sold?
SQL: SELECT count(*) FROM Products WHERE product_id NOT IN ( SELECT product_id FROM Order_items )

Question: How many orders has each gender of customers placed?
SQL: SELECT T1.gender_code ,  count(*) FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.gender_code