Question
1) ALIASES and CASE. Create new columns (fields) in the results. Note that aliases are temporary...and not stored for reuse inside a query. a) Use
1) ALIASES and CASE. Create new columns (fields) in the results. Note that aliases are temporary...and not stored for reuse inside a query. a) Use the Products table and create a query that shows ProductName, UnitsInStock, UnitsOnOrder, ReorderLevel, and a calculated field named UnitsAvailable defined as UnitsInStock + UnitsOnOrder. 2) Create VIEWS. a) Copy and paste the query in 1a and create a view called ProductLevels based on this query.
3) INNER JOIN: a) Query the ProductSales2019 to only show products with SumOfQuantitySoldIn2019 less than 50. Do not modify the view (only query the view from the SQL editor similar to how you query a table).
4) LEFT JOIN (same as LEFT OUTER JOIN): a) Using the Products table and ProductSales2019 view, show for all products, the quantitysold in 2019. Display the (i) ProductID and (ii) ProductName for all products in the Products table, and (iii) SumOfQuantitySoldIn2019 (include null values for products not sold in 2019). b) Using the Products table and ProductSales2019 view, show ProductID, ProductName, and SumOfQualitySoldIn2019 for all Products that were not sold in 2019
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