Paper No: 1
Quantity is the information of the products having the highest quantity in the given location.Display the result in ascending order of LocationName, then in descending order of ProductName with the products of the same location as follows:
LocationID
LocationName
ProductID
ProductName
Quantity
1
30
Debur and Polish
747
HL Mountain Frame Black, 38 148
2
60
Final Assembly
528
Seat Lug
729
3
7
Finished Goods Storage 708
Sport-100 Helmet, Black
324
4
7
Finished Goods Storage
872
Road Bottle Cage
324
5
7
Finished Goods Storage
845
Mountain Pump
324
6
10
Frame Forming
478
Metal Bar 2
622
7 20
Frame Welding
398
Handlebar Tube
550
8
5
Metal Storage
350
Fork Crown
622
9
6
Miscellaneous Storage 528
Seat Lug
924
10 40
Paint
747
HL Mountain Frame Black, 38 107
11 3
Paint Shop
494
Paint - Silver
49
12 3
Paint Shop
495
Paint - Blue
49
13 4
Paint Storage
495
Paint - Blue
35
14
2
Sheet Metal Racks
483
Metal Sheet 3
691
15 45
Specialized Paint
944
LL Mountain Frame - Silver, 40 136
16 50
Subassembly
397
Hex Nut 19
763
17 1
Tool Crib
389
Hex Nut 2
657
Picture 7.1
Zoom
Question 8:
[1 mark] Create a stored procedure named proc_product_model to calculate the count of distinct products belonging to a given model where @modelID int is an input parameter and @numberOfProducts int is an output parameter of the procedure.
For example, when we execute the procedure proc_product_model by using the following statements, the result should be as in the following figure:
declare @x int
+ 100%
Close