首页 > 数据库 >MET AD688 SQL for E-Commerce Startups

MET AD688 SQL for E-Commerce Startups

时间:2024-09-19 13:02:05浏览次数:1  
标签:Commerce customers SQL MET products Key each Startups data

MET AD688 Assignment 2

SQL for E-Commerce Startups

Assignment Objective: You have recently joined an e-commerce startup, "ShopSmart," which sells various products online. The company has been growing, but they are facing challenges with understanding their customers’ purchasing behaviors and optimizing their product offerings. Your task is to design a database that can store the company's data, populate it with realistic data, and then perform. a series of SQL queries to derive insights and solve business problems.

Possible Points: 8

Database Design

Products: Stores Information about products available on the platform

ProductID

Primary Key

ProductName

 

Category

 

Price

 

StockQuantity

 

DateAdded

 

 

 

ShopSmart has enlisted the help of a few consultants in the data management field, and they’ve identified and recommended the following entities that are necessary to store the company’s data.

Customers: Stores information about customers

CustomerID

Primary Key

FirstName

 

LastName

 

Email

 

SignUpDate

 

LastPurchaseDate

 

 

 

Orders: Stores information about customer orders

OrderID

Primary Key

CustomerID

Foreign Key

OrderDate

 

OrderStatus

 

 

 

OrderItems: Stores information about the items within each order

OrderItemID

Primary Key

OrderID

Foreign Key

ProductID

Foreign Key

Quantity

 

PricePerUnit

 

Reviews: Stores customer reviews for products

ReviewID

Primary Key

CustomerID

Foreign Key

ProductID

Foreign Key

ReviewDate

 

Rating (Note: this is on a scale of 1 - 5

 

ReviewText

 

Datasets

You’ve been provided with the following .csv files, each containing critical data that ShopSmart has collected:

Customers_Data.csv

Products_Data.csv

Orders_Data.csv

Order_Items_Data.csv

Reviews_Data.csv

Task 2-0: Managerial Report Structure

Submission Requirements: You are required to submit a managerial report, along with your SQL file used for this assignment.

Your paper should be structured and presented in the form. of a managerial report, APA format. This report should include:

· Cover Page

· Table of Contents

· Executive Summary

· Main Body (3 - 6 pages, APA format)

· Appendices

o Visualizations

o Screenshots of code and output

(max 0.5 point)

Task 2-1: Database design and development

1. You are required to review the data provided by the consultants for accuracy and create a design of this database (i.e. create an ERM). To be included in your design are cardinalities, relationships between entities, 代 写MET AD688 SQL for E-Commerce Startups identification of primary and foreign keys and for each attribute, identify its datatype. In your managerial report, provide a description of the ERM you’ve created.

2. Using SQL, Create and populate each table with the data provided in the excel files. HINT: You should create a database in SQLite first, then proceed to create the tables.

(max 1.5 point)

Task 2-2: Basic SQL Queries

ShopSmart would like to gain insights into the current operations of the business. For each of the following questions, write the SQL query to retrieve the required data. In your managerial report, discuss your findings.

1. Retrieve a list of all customers who signed up in the last 30 days.

2. List all products that are currently out of stock.

3. Find the total number of orders placed in the last month.

4. Display all orders made by a specific customer of your choice.

5. Show the top 5 products by the number of orders.

6. Retrieve all reviews for a specific product.

7. List all customers who have not made any purchases in the last 6 months.

8. Show the total revenue generated from orders in the last year.

9. Find the average rating of products in each category.

10. Retrieve all orders with a status of "Pending."

(max 2 points)

Task 2-3: Intermediate SQL Queries

ShopSmart’s Leadership team are very impressed with the work you’ve done so far and would like to dig deeper into their data for decision-making purposes. For each of the following questions, write the SQL query to retrieve the required data. In your managerial report, discuss your findings.

1. Identify customers who have spent more than $500 on the platform.

2. Calculate the average order value for each customer.

3. Find products that have been added in the last 90 days but have not been sold.

4. Generate a report of products with low stock (less than 10 items in stock).

5. List customers who have given a rating of 5 to any product.

6. Identify customers who have ordered more than 3 different products in a single order.

7. Find the top 3 categories with the highest sales volume.

8. Display all customers who have purchased from a specific category.

9. Calculate the total spend by each customer since their signup.

10. Identify orders that include items from multiple categories.

(max 2 points)

Task 2-4: Advanced SQL queries

“The work our new hire has done is outstanding! However, everything has seemed so effortless—let’s set a real challenge to determine the true extent of this talent.” - ShopSmart’s CEO

For each of the following questions, write the SQL query to retrieve the required data. Provide a short analysis for each advanced query, explaining the insights gained and how they could be used by the e-commerce company.

1. Analyze the purchasing behavior. of customers by grouping them into segments based on their total spend and average order value.

2. Identify patterns in the reviews to find products that receive consistently high or low ratings.

3. Create a list of customers who have stopped purchasing (no orders in the last 6 months) and have given low ratings in their last reviews.

(max 2 points)

标签:Commerce,customers,SQL,MET,products,Key,each,Startups,data
From: https://www.cnblogs.com/WX-codinghelp/p/18420382

相关文章

  • D51 树的直径 [AGC001C] Shorten Diameter
    视频链接:D51树的直径[AGC001C]ShortenDiameter_哔哩哔哩_bilibili  [AGC001C]ShortenDiameter-洛谷|计算机科学教育新生态(luogu.com.cn)//树的直径+逆向思维#include<iostream>#include<cstring>#include<algorithm>usingnamespacestd;#defineN......
  • WPF ListBox ContextMenu MenuItem Command CommandParameter Path PlacementTarget
    <ListBox.ContextMenu><ContextMenu><MenuItemHeader="ExportNewtonSoftJson"FontSize="50"Foreground="Red"Command="{BindingExportNewt......
  • Qt::BlockingQueuedConnection 与 QMetaCallEvent
    Qt创建连接类型如果是Qt::BlockingQueuedConnection,即senderthread与receiverthread不同,但是要求sendersignal与receiverslot执行是不同线程间的同步行为。也即:在sendersignal发出后sender线程要等待receiver线程的slot执行完后才能继续向后执行指令。......
  • jmeter压测中请求头参数accept-encoding对压测的影响
    1、首先来做一个实验:对接口进行压测,且所有接口的请求头都不传参数accept-encoding:gzip,deflate,br,zstd进行压测,使用聚合报告进行数据统计显示如下:可以观测到接收的KB/sec中的流量如下: 2、对接口进行压测,且所有接口的请求头都传参数accept-encoding:gzip,deflate,br,......
  • ECON 3720: Introduction to Econometrics
    ECON 3720: Introduction to EconometricsProblem Set 02Fall Semester 2024Due: September 20th 2024Please submit the problem set no later than 5 PM on September 20th 2024. Submit the problem set to your TA’s mailbox in th......
  • 编写jmeter脚本的原则
    jmeter编写脚本的原则,事务、抽象的概念,面向对象的思想(封装,继承,多态)断言1、尽量不要使用beanshell,如果遇到一些jmeter不支持的加密算法,或者一些功能,可以将其封装成jmeter的函数,进行调用2、尽量抽取公共信息,使用http信息头管理器,http请求默认值等3、如很多接口必须要用到beanshell,则......
  • Metasploit Framework (MSF) 使用指南 - 第一篇:介绍与基础用法
    引言MetasploitFramework(MSF)是一款功能强大的开源安全漏洞检测工具,被广泛应用于渗透测试中。它内置了数千个已知的软件漏洞,并持续更新以应对新兴的安全威胁。MSF不仅限于漏洞利用,还包括信息收集、漏洞探测和后渗透攻击等多个环节,因此被安全社区誉为“可以黑掉整个宇宙”的工具。......
  • 云原生周刊:Prometheus 3.0 Beta 发布|2024.09.16
    开源项目推荐KumaKuma是一个现代化的基于Envoy的服务网格,能够在每个云平台上运行,支持单区域或多区域部署,兼容Kubernetes和虚拟机。凭借其广泛的通用工作负载支持,以及对Envoy数据平面代理技术的原生支持(但无需Envoy专业知识),Kuma提供了现代化的L4-L7服务连接、发现、......
  • Prometheus修改数据存储位置
    Prometheus修改数据存储位置Prometheus的数据存储位置可以通过配置文件中的--storage.tsdb.path参数来指定。默认情况下,数据存储在Prometheus安装目录下的data文件夹中。要修改数据存储位置,可以在Prometheus启动命令中添加或修改该参数。步骤1:修改Prometheus启动命令接......
  • SciTech-Mathmatics-Probability+Statistics-VII-Statistics:Quantifing Uncertainty+
    SciTech-Mathmatics-Probability+Statistics-VII-Statistics:QuantifingUncertaintySamplingMethods(抽样方法)的原理与实践(终章)在过去的几篇文章,我们一起探索统计学的许多重要概念与方法:样本与总体,统计量、参数估计、假设检验、置信区间、ANOVA(方差分析),RA(回归分......