ODM 212 Practical 1
ODM 212 Practical 1
TANZANIA
CENTRE LINDI
REGISTRATION U21-516-0134
You are the IT Specialist of the Ministry of Energy Resource of Tanzania. You are recently
tasked by the CAG of Tanzania to validate the revenue records of Acacia Gold Mining after its
riffle with the government regarding its annual Sales of gold for the year 2016. Acacia is allowed
to sell only two types of Gold (white and Gold). Acacia keeps a ledger of all its customers and
their original countries in the same database with their sales. Acacia has given you a copy of its
database for auditing. Also, one of the customers of Acacia is called Lim Teik from Malaysia
whom the country suspects is having illegal dealings in the country.
1. Create a new table using extended query to summarize all the sales of the company so that a
report showing the total sales to each country
2. Create a table to summarize all the sales of Carat 9 in the year 2016 organized by Supplier.
3. Find how much gold Lim Teik bought and how much he spent in the month of June 2016.
Tables
1. Sales - Customize
This query creates a new table called SalesSummaryByCountry with two columns:
countryName and totalSales. It calculates the total sales amount for each country by
joining the Sales, Customer, and Country tables and grouping the results by countryName.
ii. To create a table summarizing the sales of Carat 9 in the year 2016 organized by Supplier,
we need to join the Sales, Gold, and Customer tables. We can use the following query:
This query creates a new table called Carat9SalesBySupplier with three columns:
customerName, supplier, and totalSales. It calculates the total sales amount of
Carat 9 in the year 2016 for each customer and supplier by joining the Sales, Gold, and
Customer tables, filtering for Carat 9 gold and sales in 2016, and grouping the results by
customerName and supplier.
iii. To find out how much gold Lim Teik bought and how much he spent in the month of June
2016, we need to join the Sales, Gold, and Customer tables. We can use the following query:
This query retrieves the typeID and salesAmount from the Sales and Gold tables for
Lim Teik's purchases in the month of June 2016. It joins the Sales, Gold, and Customer
tables, filters for Lim Teik as the customer and sales in June 2016, and returns the results.