Question: Multiple choice SQL questions. Simply select the correct the correct letter. 1.Which of the following statements creates a new view named CustomerView from a query?
Multiple choice SQL questions. Simply select the correct the correct letter.
1.Which of the following statements creates a new view named CustomerView from a query?
a. create view CustomerView select... | |
b. create view as CustomerView select... | |
c. create view CustomerView as select... | |
d. create view CustomerView; select... |
2.which SELECT clause calculates the total percentage of inventory for each product?
| Product | Quantity |
|---|---|
| Shirt | 5 |
| Shoes | 3 |
| Pants | 2 |
| Product | Pct |
|---|---|
| Shirt | 50% |
| Shoes | 30% |
| Pants | 20% |
a. select Product, Quantity, sum(Quantity) as Total format=percent5.2 from inventory; | |
b. select Product, (select sum(Quantity) from inventory) as Pct format=percent5.2 from inventory; | |
c. select Product, Quantity/(select sum(Quantity)) as Pct format=percent5.2 from inventory; | |
d. select Product, Quantity/sum(Quantity) as Pct format=percent5.2 from inventory; |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
