Database schema:
CREATE TABLE customer (
  Customer_ID NUMBER PRIMARY KEY,
  Name TEXT,
  Nationality TEXT,
  Card_Credit NUMBER,
  Level_of_Membership NUMBER
);
CREATE TABLE branch (
  Branch_ID NUMBER PRIMARY KEY,
  Manager TEXT,
  Years_opened NUMBER,
  Location_of_office TEXT
);
CREATE TABLE customer_order (
  Customer_ID NUMBER PRIMARY KEY,
  Branch_ID NUMBER,
  Dish_Name TEXT,
  Quantity NUMBER,
  FOREIGN KEY (Branch_ID) REFERENCES branch(Branch_ID),
  FOREIGN KEY (Customer_ID) REFERENCES customer(Customer_ID)
);

Question: Show the names of customers and names of dishes they order.
SQL: SELECT T1.Name ,  T2.Dish_Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID  =  T2.Customer_ID

Question: Find the nationality and card credit of each customer.
SQL: SELECT Nationality ,  Card_Credit FROM customer

Question: How many customers are associated with each nationality? List the nationality and the number of customers.
SQL: SELECT Nationality ,  COUNT(*) FROM customer GROUP BY Nationality

Question: Who are the distinct managers of branches?
SQL: SELECT DISTINCT Manager FROM branch

Question: Show the nations that have both customers with card credit smaller than 50 and customers with card credit bigger than 75.
SQL: SELECT Nationality FROM customer WHERE Card_Credit  <  50 INTERSECT SELECT Nationality FROM customer WHERE Card_Credit  >  75

Question: Count the number of customers.
SQL: SELECT count(*) FROM customer

Question: What is the average card credit of customers with membership level higher than 1?
SQL: SELECT avg(Card_Credit) FROM customer WHERE Level_of_Membership  >  1

Question: Which nationality does the most customers have?
SQL: SELECT Nationality FROM customer GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1

Question: Which customers have total order quantity greater than 1? Give me the customer names.
SQL: SELECT T1.Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID  =  T2.Customer_ID GROUP BY T1.Name HAVING sum(T2.Quantity)  >  1

Question: Show the most common nationality of customers.
SQL: SELECT Nationality FROM customer GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1

Question: Show the customers with total quantity of order bigger than 1.
SQL: SELECT T1.Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID  =  T2.Customer_ID GROUP BY T1.Name HAVING sum(T2.Quantity)  >  1

Question: Show each customer name and the total quantities of dishes ordered by that customer.
SQL: SELECT T1.Name ,  sum(T2.Quantity) FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID  =  T2.Customer_ID GROUP BY T1.Name

Question: Which nations have both customers with card credit above 50 and customers with card credit below 75.
SQL: SELECT Nationality FROM customer WHERE Card_Credit  <  50 INTERSECT SELECT Nationality FROM customer WHERE Card_Credit  >  75

Question: What are the nationalities and card credits of customers?
SQL: SELECT Nationality ,  Card_Credit FROM customer

Question: List the names of customers that do not have any order.
SQL: SELECT name FROM customer WHERE Customer_ID NOT IN (SELECT Customer_ID FROM customer_order)

Question: For each order, find the customer name and the dish name. Sort the result in descending order of the quantity of dish.
SQL: SELECT T1.Name ,  T2.Dish_Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID  =  T2.Customer_ID ORDER BY T2.Quantity DESC

Question: Show the names of customers and names of dishes they order, in descending order of the quantity of dish.
SQL: SELECT T1.Name ,  T2.Dish_Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID  =  T2.Customer_ID ORDER BY T2.Quantity DESC

Question: What is the card credit of the customer with the highest membership level?
SQL: SELECT Card_Credit FROM customer ORDER BY Level_of_Membership DESC LIMIT 1

Question: Sort all the customers by the level of membership in ascending order, and return the customer names.
SQL: SELECT Name FROM customer ORDER BY Level_of_Membership ASC

Question: List the names of customers in ascending order of level of membership.
SQL: SELECT Name FROM customer ORDER BY Level_of_Membership ASC

Question: Which customers have nationality "England" or "Australia"? Give me their names.
SQL: SELECT Name FROM customer WHERE Nationality  =  "England" OR Nationality  =  "Australia"

Question: Show the names of customers with nationality "England" or "Australia".
SQL: SELECT Name FROM customer WHERE Nationality  =  "England" OR Nationality  =  "Australia"

Question: How many customers are there?
SQL: SELECT count(*) FROM customer