Group Assessment #1
SQL Queries & Output
PROG8650 – SECTION 1_
CHANDRAN, MOHANASRI - 8918973;
FEBA CISILY THOMAS, FEBA CISILY THOMAS - 8915515;
JACOB, ANU - 8923906;
STEPHEN, CEDRIC CRUS - 8942138 ;
SUNDRIYAL, RISHABH - 8938670
DATE 09/29/2023
CONESTOGA COLLEGE
PROGRAM 1372 - INFORMATION TECHNOLOGY BUSINESS ANALYTICS
Group Assessment #1 PROG8650 – SECTION 1_
Question #1:
SQL Query
select * from Category
Snippet of output
Question #2:
SQL Query
select * from CustomerOrder, ShipmentMethod where CustomerOrder.ShipmentMethodID =
ShipmentMethod.ShipmentMethodID
Snippet of output
Group Assessment #1 PROG8650 – SECTION 1_
Question #3:
SQL Query
Select CustomerOrder.OrderID, CustomerOrder.TotalPaid, ShipmentMethod.ShipmentMode
from CustomerOrder join ShipmentMethod on CustomerOrder.ShipmentMethodID =
ShipmentMethod.ShipmentMethodID
Snippet of output
Question #4:
SQL Query
select * from customerOrder where TotalPaid < 1000
Snippet of output
Question #5:
SQL Query
Select * from CustomerOrder where EstDateShipped = ActualDateShipped
Group Assessment #1 PROG8650 – SECTION 1_
Snippet of output
Question #6:
SQL Query
Select CustomerOrder.OrderID, OrderStatus.Description from CustomerOrder join OrderStatus on
CustomerOrder.OrderStatusID = OrderStatus.OrderStatusID where OrderStatus.Description = 'in transit'
or orderstatus.Description = 'delayed'
Snippet of output
Question #7:
SQL Query
Select Product.Description, Review.Rating from Review join product on Review.ProductID =
Product.ProductID where Review.rating >= 4
Snippet of output
Group Assessment #1 PROG8650 – SECTION 1_
Question #8:
SQL Query
Select ShipmentMode, COUNT(shipmentmode) as Count from ShipmentMethod group by ShipmentMode
Snippet of output
Question #9:
SQL Query
Select Product.dbo.Product.* from Product.dbo.Product where Product.dbo.Product.ProductID not in
(select ProductID from ProductSelection)
Snippet of output
Question #10:
SQL Query
select OrderID, CustomerID, ActualDateShipped from CustomerOrder where ActualDateShipped between
'2023-09-01' and '2023-09-30'
Snippet of output
Group Assessment #1 PROG8650 – SECTION 1_
Question #11:
SQL Query
select OrderID, CustomerID, EstDateShipped from CustomerOrder where estDateShipped < '2022-01-01'
Snippet of output
Question #12:
SQL Query
select OrderID, CustomerID, ActualDateShipped from CustomerOrder where ActualDateShipped < '2023-01-
01' and month(ActualDateShipped)='10'
Snippet of output
Question #13:
SQL Query
select * from Product where price = (select MAX(price) as 'Highest Price' from Product)
Group Assessment #1 PROG8650 – SECTION 1_
Snippet of output
Question #14:
SQL Query
SELECT TOP 3 OrderID, Sum(UnitPriceSold) AS Highest_Price from ProductSelection
GROUP BY OrderID
ORDER BY Highest_Price DESC
Snippet of output
Question #15:
SQL Query
Select count(productID) as Count from ProductSelection
Snippet of output
Question #16:
SQL Query
Select customerID, COUNT(orderID) as 'Count Of Order ID' from CustomerOrder group by CustomerID
Group Assessment #1 PROG8650 – SECTION 1_
Snippet of output
Question #17:
SQL Query
Select Product.dbo.Product.* from Product where Product.dbo.Product.ProductCategoryID in(
Select Product.dbo.Category.ProductCategoryID from Category where CategoryName = 'Perishable' or
CategoryName = 'Miscallaneous')
and Product.dbo.Product.ProductID in (Select Review.ProductID from Review where Rating between 3 and
5)
Snippet of output
Question #18:
SQL Query
Select Orders.dbo.ProductSelection.* from Orders.dbo.ProductSelection
where Orders.dbo.ProductSelection.ProductID in (Select Product.dbo.Product.ProductID from
Product.dbo.Product where Product.dbo.Product.Package = 'Gift Box')
Snippet of output
Group Assessment #1 PROG8650 – SECTION 1_
Question #19:
SQL Query
select CustomerOrder.OrderID, CustomerOrder.CustomerID, Product.dbo.Product.WeightQTY from
CustomerOrder join ProductSelection on CustomerOrder.OrderID = ProductSelection.OrderID join
Product.dbo.Product on ProductSelection.ProductID = Product.dbo.Product.ProductID where
Product.dbo.Product.WeightQTY > 1
Snippet of output
Question #20:
SQL Query
Select CustomerOrder.OrderID, CustomerOrder.CustomerID, Product.dbo.Product.ProductID,
Product.dbo.Product.Description from CustomerOrder join ProductSelection on CustomerOrder.OrderID =
ProductSelection.OrderID join Product.dbo.Product on ProductSelection.ProductID =
Product.dbo.Product.ProductID
Snippet of output
Group Assessment #1 PROG8650 – SECTION 1_
Citation:
DATA SOURCE 6.4.1
REFERENCE:
Narrative Document. Case – CBR – 6.4.1.1. – Orders Database Documentation ver 1.11. p. 550 – 573
https://conestoga.desire2learn.com/d2l/le/content/878855/viewContent/17557777/View