Question
Can someone help me create the database on SQL based on the images above? You are encouraged to use the views to simplify the queries
Can someone help me create the database on SQL based on the images above?
You are encouraged to use the views to simplify the queries which follow You can use a view in a SELECT statement in exactly the same way as you can use a table, often avoiding the need to write the same joins and calculations over and over. When writing a view, it is easiest to write the SELECT statement first, and only add the CREATE VIEW statement to the beginning once you have confirmed that the SELECT statement is working correctly. If you wish to create additional views to use in the queries which follow, include them in this file.
Product View Create a view which shows the following details of all products: - The Product Name - Type name - Price (example partial output of the Product View - your data may vary, example illustrates structure only) Favourite Drinks View Create a view which shows the Product ID number, Product Name and Customer email, of all drinks that are in a customer's favourite order. (example partial output of the Favourite Drinks View - your data may vary, example illustrates structure only) Order View Create a view which shows the following details of all deliveries and ordered products. - The Order Id - The Driver Name - The Delivery Date - The Vehicle Make/Model - The ordered product ID number, product name and quantity. - The delivery address. - Any discount percentages (If the order took place during a special event). - The cost of the products (Take into account quantity and discounts)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