0% found this document useful (0 votes)
30 views1 page

Practical Case Study 2

The document outlines a practical case study for a database design and development module focused on TechStore, an e-commerce retailer. Students are instructed to analyze sales data from a provided SQL database, complete various tasks involving SQL queries, and submit both soft and hard copies of their work. The tasks include importing the database, counting sales transactions, calculating averages, and grouping data by product and customer IDs.

Uploaded by

jkusekwa01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views1 page

Practical Case Study 2

The document outlines a practical case study for a database design and development module focused on TechStore, an e-commerce retailer. Students are instructed to analyze sales data from a provided SQL database, complete various tasks involving SQL queries, and submit both soft and hard copies of their work. The tasks include importing the database, counting sales transactions, calculating averages, and grouping data by product and customer IDs.

Uploaded by

jkusekwa01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MODULE: DATABASE DESIGN AND DEVELOPMENT PRACTICAL CASE STUDY

PROGRAME: DATA SCIENCE 1 & BOS 1


To be collected on: 19/06/2024 through your class representatives

INSTRUCTIONS: 1. Answer all questions

2. Marks are allocated at the end of each question.

3. collect both softcopies (word docs) and Hard copies (printed docs)

4. copy and paste your correct sql queries after proving they are returning the
correct results.

CASE STUDY: TECHSTORE E-COMMERCE DATABASE

Introduction

TechStore is an online retailer that sells various electronic products. The company wants to analyze
its sales data to improve business strategies. They have provided you with a database containing
information about their sales transactions. The database is the file called [Link] which is
attached to this case study.

Tasks:

1. Import the database into your phpMyAdmin environment (3)


2. How many tables are there in the database? (2)
3. Write a query to count the total number of sales transactions recorded in the ‘Sales’ table (2)
4. Write a query to calculate the average total amount of sales transactions from the ‘Sales’ table (2)
5. Write a query to group the sales transactions by product_id and calculate the total quantity sold for
each product. (2)
6. Write a query to group the sales transactions by customer_id and calculate the average total amount
spent by each customer. (2)
7. Write a query to group the sales transactions by customer_id and calculate the average total amount
spent by each customer. Then, filter the results to show only those customers who have an average
spending of more than $100. (2)

You might also like