CREATE TABLE Ref_Payment_Methods (
    payment_method_code TEXT PRIMARY KEY,
    payment_method_description TEXT
);
CREATE TABLE Ref_Service_Types (
    Service_Type_Code TEXT PRIMARY KEY,
    Parent_Service_Type_Code TEXT,
    Service_Type_Description TEXT
);
CREATE TABLE Addresses (
    Address_ID TEXT PRIMARY KEY,
    Line_1 TEXT,
    Line_2 TEXT,
    City_Town TEXT,
    State_County TEXT,
    Other_Details TEXT
);
CREATE TABLE Products (
    Product_ID TEXT PRIMARY KEY,
    Product_Name TEXT,
    Product_Price NUMBER,
    Product_Description TEXT,
    Other_Product_Service_Details TEXT
);
CREATE TABLE Marketing_Regions (
    Marketing_Region_Code TEXT PRIMARY KEY,
    Marketing_Region_Name TEXT,
    Marketing_Region_Descriptrion TEXT,
    Other_Details TEXT
);
CREATE TABLE Clients (
    Client_ID NUMBER PRIMARY KEY,
    Address_ID NUMBER,
    Customer_Email_Address TEXT,
    Customer_Name TEXT,
    Customer_Phone TEXT,
    Other_Details TEXT,
    FOREIGN KEY ("Address_ID") REFERENCES Addresses("Address_ID")
);
CREATE TABLE Drama_Workshop_Groups (
    Workshop_Group_ID NUMBER PRIMARY KEY,
    Address_ID NUMBER,
    Currency_Code TEXT,
    Marketing_Region_Code TEXT,
    Store_Name TEXT,
    Store_Phone TEXT,
    Store_Email_Address TEXT,
    Other_Details TEXT,
    FOREIGN KEY ("Address_ID") REFERENCES Addresses("Address_ID")
);
CREATE TABLE Performers (
    Performer_ID NUMBER PRIMARY KEY,
    Address_ID NUMBER,
    Customer_Name TEXT,
    Customer_Phone TEXT,
    Customer_Email_Address TEXT,
    Other_Details TEXT,
    FOREIGN KEY ("Address_ID") REFERENCES Addresses("Address_ID")
);
CREATE TABLE Customers (
    Customer_ID TEXT PRIMARY KEY,
    Address_ID NUMBER,
    Customer_Name TEXT,
    Customer_Phone TEXT,
    Customer_Email_Address TEXT,
    Other_Details TEXT,
    FOREIGN KEY ("Address_ID") REFERENCES Addresses("Address_ID")
);
CREATE TABLE Stores (
    Store_ID TEXT PRIMARY KEY,
    Address_ID NUMBER,
    Marketing_Region_Code TEXT,
    Store_Name TEXT,
    Store_Phone TEXT,
    Store_Email_Address TEXT,
    Other_Details TEXT,
    FOREIGN KEY ("Marketing_Region_Code") REFERENCES Marketing_Regions("Marketing_Region_Code"),
    FOREIGN KEY ("Address_ID") REFERENCES Addresses("Address_ID")
);
CREATE TABLE Bookings (
    Booking_ID NUMBER PRIMARY KEY,
    Customer_ID NUMBER,
    Workshop_Group_ID TEXT,
    Status_Code TEXT,
    Store_ID NUMBER,
    Order_Date TIME,
    Planned_Delivery_Date TIME,
    Actual_Delivery_Date TIME,
    Other_Order_Details TEXT,
    FOREIGN KEY ("Workshop_Group_ID") REFERENCES Drama_Workshop_Groups("Workshop_Group_ID"),
    FOREIGN KEY ("Customer_ID") REFERENCES Clients("Client_ID")
);
CREATE TABLE Performers_in_Bookings (
    Order_ID NUMBER PRIMARY KEY,
    Performer_ID NUMBER,
    FOREIGN KEY ("Order_ID") REFERENCES Bookings("Booking_ID"),
    FOREIGN KEY ("Performer_ID") REFERENCES Performers("Performer_ID")
);
CREATE TABLE Customer_Orders (
    Order_ID NUMBER PRIMARY KEY,
    Customer_ID NUMBER,
    Store_ID NUMBER,
    Order_Date TIME,
    Planned_Delivery_Date TIME,
    Actual_Delivery_Date TIME,
    Other_Order_Details TEXT,
    FOREIGN KEY ("Store_ID") REFERENCES Stores("Store_ID"),
    FOREIGN KEY ("Customer_ID") REFERENCES Customers("Customer_ID")
);
CREATE TABLE Order_Items (
    Order_Item_ID NUMBER PRIMARY KEY,
    Order_ID NUMBER,
    Product_ID NUMBER,
    Order_Quantity TEXT,
    Other_Item_Details TEXT,
    FOREIGN KEY ("Product_ID") REFERENCES Products("Product_ID"),
    FOREIGN KEY ("Order_ID") REFERENCES Customer_Orders("Order_ID")
);
CREATE TABLE Invoices (
    Invoice_ID NUMBER PRIMARY KEY,
    Order_ID NUMBER,
    payment_method_code TEXT,
    Product_ID NUMBER,
    Order_Quantity TEXT,
    Other_Item_Details TEXT,
    Order_Item_ID NUMBER,
    FOREIGN KEY ("payment_method_code") REFERENCES Ref_Payment_Methods("payment_method_code"),
    FOREIGN KEY ("Order_ID") REFERENCES Bookings("Booking_ID"),
    FOREIGN KEY ("Order_ID") REFERENCES Customer_Orders("Order_ID")
)

Question: What is the product ID of the most frequently ordered item on invoices?
SQL: SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1

Question: Find the id of the product ordered the most often on invoices.
SQL: SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1

Question: What is the description of the service type which offers both the photo product and the film product?
SQL: SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code  =  T2.Service_Type_Code WHERE T2.Product_Name  =  'photo' INTERSECT SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code  =  T2.Service_Type_Code WHERE T2.Product_Name  =  'film'

Question: Give me the description of the service type that offers not only the photo product but also the film product.
SQL: SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code  =  T2.Service_Type_Code WHERE T2.Product_Name  =  'photo' INTERSECT SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code  =  T2.Service_Type_Code WHERE T2.Product_Name  =  'film'