Professional Documents
Culture Documents
UAS ITC (Lowig, Anastasia, Deyla)
UAS ITC (Lowig, Anastasia, Deyla)
IMPLEMENTATION
FOR NORTHWIND
DATABASE
Lowig Caesar B21220026 Anastasia Valentina B21220027 Deyla Soegiono
B21220029
NORTHWIND COMPANY
Multinational USA-UK Trading Company that
ABOUT carries out Export and Import activities for Food
Products
OrderID CategoryID
CustomerID EmployeeID
PRIMARY CustomerTypeID TerritoryID
KEY SupplierID RegionID
ProductID ShipperID
01
EMPLOYEE
Q1 - Employee’s Territory and Regional
First Name Title Territory Region
Margaret employees.Title,
SELECT employees.FirstName, Sales Representative Greensboro
territories.TerritoryDescription, Eastern
region.RegionDescription GOAL : To gain history information about
employee’s Territory and Regional
FROM ((employees INNER JOIN employeeterritories ON employees.EmployeeID =
Michael
employeeterritories.EmployeeID) INNER Sales
JOINRepresentative
territories ON Phoenix Western
employeeterritories.TerritoryID = territories.TerritoryID) INNER JOIN region ON
territories.RegionID = region.RegionID;
Q2 - Average Salary For Each Region
GOAL: to identify staff title for every region Westerns Sales Representative
Q4 - Total Income of Employee
First Name Sum Of Total
SELECT employees.FirstName, Sum([order details].Total) AS
Margaret 250,187.45 SumOfTotal
Janet 213,051.30 FROM (employees INNER JOIN orders ON
employees.EmployeeID = orders.EmployeeID) INNER JOIN
Nancy 202,143.71 [order details] ON orders.OrderID = [order details].OrderID
Andrew 177,749.26 GROUP BY employees.FirstName;
Robert 141,295.99
Michael 78,198.10
Steven 75,567.75
ContactTitle SumOfTotal
Q5 - Total Income of Employee
Sales Manager 245830
(Divided by Job Title)
Sales Representative 243314
Margaret Jack's New England Clam Chowder Seafood New England Seafood Cannery
Margaret Louisiana Fiery Hot Pepper Sauce Condiments New Orleans Cajun Delights
FROM ((((territories INNER JOIN employeeterritories ON Atlanta Chai 125 Exotic Liquids
territories.TerritoryID = employeeterritories.TerritoryID) INNER
Atlanta Chartreuse 109 Aux joyeux
JOIN orders ON employeeterritories.EmployeeID = verte ecclsiastiques
orders.EmployeeID) INNER JOIN [order details] ON
orders.OrderID = [order details].OrderID) INNER JOIN products Atlanta Cte de Blaye 103 Aux joyeux
ON [order details].ProductID = products.ProductID) INNER JOIN ecclsiastiques
suppliers ON products.SupplierID = suppliers.SupplierID Atlanta Escargots de 145 Escargots
Bourgogne Nouveaux
GROUP BY territories.TerritoryDescription, products.ProductName,
Atlanta Filo Mix 173 G'day, Mate
suppliers.CompanyName
Gorgonzola Telino 1,397 12 - 100 g pkgs FROM [order details] INNER JOIN products ON [order
details].ProductID = products.ProductID
Gnocchi di nonna 1,263 24 - 250 g pkgs.
Alice
GROUP BY products.ProductName, products.QuantityPerUnit;
Pavlova 1,158 32 - 500 g boxes
Rhnbru Klosterbier 1,155 24 - 0.5 l bottles GOAL : To gain information about total quantity
order of each product
Guaran Fantstica 1,125 12 - 355 ml cans
39 0 0
13 70 5
53 0 0
UPDATE products SET products.RatioSisaProduk =
0 0
UnitsonOrder/UnitsinStock;
120 0 0
15 0 0
HAVING (((products.RatioSisaProduk)<0.5));
GOAL: to find out which products need to be given a discounted price
Q15 - Increase / Decrease Product
Prices
Territory Company Name Product Name Ratio Sisa
Description Produk
SELECT territories.TerritoryDescription,
Atlanta Exotic Liquids Aniseed Syrup 5 suppliers.CompanyName, products.ProductName,
products.RatioSisaProduk
Atlanta Formaggi Fortini s.r.l. Mascarpone 4
Fabioli
FROM ((((territories INNER JOIN employeeterritories ON
Atlanta Karkki Oy Maxilaku 6 territories.TerritoryID = employeeterritories.TerritoryID) INNER
JOIN orders ON employeeterritories.EmployeeID =
Atlanta Lyngbysild Rogede sild 14
orders.EmployeeID) INNER JOIN [order details] ON
orders.OrderID = [order details].OrderID) INNER JOIN
Atlanta New Orleans Cajun Louisiana Hot 25
Delights Spiced Okra products ON [order details].ProductID = products.ProductID)
INNER JOIN suppliers ON products.SupplierID =
Atlanta Plutzer Wimmers gute 4
Lebensmittelgromrkte AG Semmelkndel suppliers.SupplierID
Atlanta Specialty Biscuits, Ltd. Sir Rodney's 13
Scones GROUP BY territories.TerritoryDescription,
suppliers.CompanyName, products.ProductName,
Atlanta Tokyo Traders Longlife Tofu 5 products.RatioSisaProduk
HAVING (((products.RatioSisaProduk)>3));
GOAL: to find out which products should be increased
Q16 - Total Income of Each Product Category
Produce 105,268.60
Grains/Cereals 100,726.80
03
ORDER
CountOfOrderID Country
Q17 - Total Order
122 USA
(Divided by Country)
122 Germany
SELECT Count(orders.OrderID) AS CountOfOrderID,
customers.Country 83 Brazil
37 Sweden
30 Canada
28 Mexico
28 Italy
Q17 - Total Order CountOfOrderID Country
22 Finland
SELECT Count(orders.OrderID) AS CountOfOrderID,
customers.Country 19 Belgium
13 Portugal
7 Poland
6 Norway
Q18 - Count of Order for each employee
Region Employee ID Count Of
Description Order ID
SELECT region.RegionDescription, orders.EmployeeID,
Eastern 1 246 Count(orders.OrderID) AS CountOfOrderID
Eastern 2 672
FROM (((region INNER JOIN territories ON region.RegionID =
Eastern 4 468 territories.RegionID) INNER JOIN employeeterritories ON
territories.TerritoryID = employeeterritories.TerritoryID) INNER
Eastern 5 294 JOIN employees ON employeeterritories.EmployeeID =
employees.EmployeeID) INNER JOIN orders ON
Northern 8 416 employees.EmployeeID = orders.EmployeeID
Northern 9 301
GROUP BY region.RegionDescription, orders.EmployeeID;
Southern 3 508
GOAL: to evaluated the achievement of the staff
Westerns 6 335
Westerns 7 720
Q19 - Employee vs Order
Region Count Of Sum Of Count
Description Employee ID Of Order ID
SELECT [3a].RegionDescription, Count([3a].EmployeeID) AS
CountOfEmployeeID, Sum([3a].CountOfOrderID) AS Eastern 4 1680
SumOfCountOfOrderID
Northern 2 717
FROM 3a
Southern 1 508
GROUP BY [3a].RegionDescription; Westerns 2 1055
Ireland 2755.24 Argentina 598.58 GOAL : To gain information about which country
spend more freight for their order from our
Venezuela 2735.18 Norway 275.5 company
Denmark 1396.19
Q21 - Total Freight of Shipping Company