Question
MySQL Workplace 8, keep getting some syntax errors and ambiguous errors. thanks for the help in advance! Read Modadd a USE statement in line 1,
MySQL Workplace 8, keep getting some syntax errors and ambiguous errors. thanks for the help in advance!
Read Modadd a USE statement in line 1, specify the schema name you just created. Reverse-engineer the database to produce the ER diagram for this database. Rely on the ERD to perform remaining tasks. Write and execute SQL commands to get information from the database: Display a single number showing the total number of customers in the database. Display a single number showing how many products categories are available (do not include duplicates). Display a single number showing how many shipping addresses are from Ontario. Join the payment_info and payments table together based on PK/FK. Display the count of records for each payment type. Display a single number showing how many invoices were issued in 2013. Join the customers and shipping_details tables together based on PK/FK. Display the province code and the number of records per province. Data should be sorted in descending order of the number of records. Display the lowest, highest, and average amounts on the invoice table? Join the customers and customer_product tables together based on PK/FK. The SQL should display the customers first and last names, the email (in uppercase) and the ordered amount. Only records where the ordered_amount is greater or equal to 5 should be displayed. Refering to the customers and shipping_details tables on the ER, display all data from the customers table but only where the province on the shipping_details table is equal to NS. Do not use a join for this requirement.
Tables and colums are
customer_product - id , ordered_amount , customer_id , product_id ,payment_id
customers - customer_id , first_name , last_name , email , phoneNo , shipping_detail_id
invoice - invoice_id , invoice_no , amount , invoice_date
payment_info - payment_info_id , payment_type
payments - payment_id , payment_info_id , invoice_id
products - product_id , product_name , details , category , quantity
shipping_details - shipping_detail_id , address , city , province
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started