0% found this document useful (0 votes)
132 views23 pages

SQL Project Business Report

SQL Project Business Report

Uploaded by

datasciencemasud
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)
132 views23 pages

SQL Project Business Report

SQL Project Business Report

Uploaded by

datasciencemasud
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
You are on page 1/ 23

BUSINESS REPORT

SQL Project on Reliant retail limited

MASOOD AHMED KHAN


0
Page

GREAT LEARNING
Page 1 of 22

Contents
Project Problem Statement ............................................................................................ 2
ER DIAGRAM................................................................................................................. 3
Problem 1 ..................................................................................................................... 4
Problem 2 ..................................................................................................................... 6
Problem 3 ..................................................................................................................... 8
Problem 4 ................................................................................................................... 10
Problem 5 ................................................................................................................... 11
Problem 6 ................................................................................................................... 13
Problem 7 ................................................................................................................... 15
Problem 8 ................................................................................................................... 16
Problem 9 ................................................................................................................... 19
Problem 10 ................................................................................................................. 21
Page 2 of 22

Project Problem Statement

You are hired by a chain of online retail stores “Reliant retail limited”.
They provide you with “orders” database and seek answers to the
following queries as the results from these queries will help the company
in making data-driven decisions that will impact the overall growth of the
online retail store.

I will start the presentation by displaying the ER Diagram of the


database given to us at first and then let’s move ahead with the
questions.
Page 3 of 22

ER DIAGRAM
Page 4 of 22

Problem 1

Write a query to display customer full name with their title (mr/ms), both first name and
last name are in upper case with customer email id, customer creation date and
display customer’s category after applying below categorization rules:

i. If customer creation date year <2005 then category a

ii. If customer creation date year >=2005 and <2011 then category b

iii. If customer creation date year>= 2011 then category c

Hint: Use case statement, no permanent change in table required. [note: tables to be
used -online_customer table]

SOLUTION

The goal of this query is to display the full name of customers, including their title (Mr./Ms.),
along with their email ID, creation date, and customer category based on the year of their
creation date.

SAMPLE OUTPUT
Page 5 of 22

BUSINESS INSIGHTS

• This categorization helps identify long-term customers (Category A) versus newer


customers (Category C). Understanding customer tenure can inform marketing
strategies, loyalty programs, and targeted promotions.

RECOMMENDATIONS

• Targeted Marketing: Use the customer categories to develop tailored marketing


campaigns that cater to the specific needs and preferences of each group.

• Customer Retention Programs: Focus on engaging long-term customers (Category


A) with loyalty programs or special offers to retain their business.

• Feedback Collection: Gather feedback from different categories to understand


their satisfaction and improve service offerings.
Page 6 of 22

Problem 2

Write a query to display the following information for the products, which have not been
sold: product_id, product_desc, product_quantity_avail, product_price, inventory
values(product_quantity_avail*product_price), new_price after applying discount as per
the below criteria. Sort the output concerning the decreasing value of inventory_value.

i. If product price > 20,000 then apply 20% discount

ii. If product price > 10,000 then apply 15% discount

iii. If product price =< 10,000 then apply 10% discount

Hint: use case statement, no permanent change in table required. [note: tables to be
used -product, order_items table]

SOLUTION

The goal of this query is to retrieve details of products that have not been sold, including
product ID, description, quantity available, price, inventory value, and the new price after
applying discounts based on specific criteria.

SAMPLE OUTPUT
Page 7 of 22

BUSINESS INSIGHTS

• Identifying unsold products is crucial for inventory management and sales


strategies. By analyzing unsold products, the company can determine if certain
products need promotional efforts or if their pricing strategies need adjustments.
• Understanding the inventory value can help in making informed decisions about
stock clearance, discounts, and potential markdowns.

RECOMMENDATIONS

• Inventory Review: Regularly review unsold products to assess their sales


performance and consider strategies for moving excess inventory.

• Targeted Promotions: Implement targeted promotions for high-value unsold


products to stimulate sales, particularly for items with a high inventory value.

• Pricing Strategy Evaluation: Re-evaluate pricing strategies for unsold products,


especially those that have not sold due to perceived high price points. Consider
temporary discounts or bundling strategies to enhance attractiveness.
Page 8 of 22

Problem 3

write a query to display product_class_code, product_class_description, count of product


type in each product class, and inventory value
(p.product_quantity_avail*p.product_price). Information should be displayed for only those
product_class_code that have more than 1,00,000 inventory value. sort the output
concerning the decreasing value of inventory_value.

[note: tables to be used -product, product_class]

SOLUTION

The goal of this query is to provide insights into product classes that hold significant
inventory value and the count of products within each class.

SAMPLE OUTPUT
Page 9 of 22

BUSINESS INSIGHTS

• Analyzing product classes with high inventory values can help in strategic decision-
making regarding stock management and marketing efforts.
• Understanding product counts within classes can aid in identifying potential
overstock issues or trends in consumer preferences.

RECOMMENDATIONS

• Inventory Management: Focus on optimizing inventory for classes with high values
to minimize holding costs and avoid stockouts.

• Marketing Strategy: Develop targeted marketing campaigns for high-value product


classes to boost sales.

• Sales Analysis: Regularly assess the performance of product classes to adapt to


changing market demands and improve inventory turnover rates.
Page 10 of 22

Problem 4

Write a query to display customer_id, full name, customer_email, customer_phone and


country of customers who have cancelled all the orders placed by them(use sub-query)

[note: tables to be used - online_customer, addresss, order_header]

SOLUTION

The goal of this query is to identify customers who have completely canceled their orders
and retrieve their details for potential follow-up or analysis.

SAMPLE OUTPUT

BUSINESS INSIGHTS

• Understanding why these customers have canceled their orders can help improve
customer retention strategies. It can also highlight potential issues in service or
product quality.

RECOMMENDATIONS

• Customer Follow-Up: Consider reaching out to these customers to understand


their reasons for canceling and see if they can be persuaded to continue ordering.

• Quality Analysis: Analyze the common reasons for order cancellations and address
them to improve overall customer satisfaction.
Page 11 of 22

• Marketing Strategy: Target these customers with specific campaigns to win them
back, perhaps offering incentives for their next order.

Problem 5

Write a query to display shipper name, city to which it is catering, number of customer
catered by the shipper in the city and number of consignments delivered to that city for
shipper dhl

[note: tables to be used -shipper, online_customer, addresss, order_header]

SOLUTION

The goal of this query is to gather information about the shipper "DHL" to analyze its
customer base and delivery performance in various cities.

SAMPLE OUTPUT
Page 12 of 22

BUSINESS INSIGHTS

• Understanding customer reach and the volume of consignments delivered can help
DHL identify successful regions and areas needing improvement.

RECOMMENDATIONS

• Market Expansion: If certain cities have low customer counts, consider marketing
efforts to attract more customers in those areas.

• Performance Review: Analyzing the delivery performance can help improve


logistics and customer satisfaction.

• Customer Feedback: Gather feedback from customers in various cities to enhance


service quality and adapt offerings to local preferences.
Page 13 of 22

Problem 6
Write a query to display customer id, customer full name, total quantity and total value
(quantity*price) shipped where mode of payment is cash and customer last name starts
with 'g'

[note: tables to be used -online_customer, order_items, product, order_header]

SOLUTION

The goal of this query is to analyze customer orders that were paid for in cash, specifically
focusing on customers whose last names start with the letter 'G'.

SAMPLE OUTPUT
Page 14 of 22

BUSINESS INSIGHTS

• Understanding customer purchasing behavior in this segment can help tailor


marketing strategies or payment options.

RECOMMENDATIONS

• Promotions: Consider offering promotions or discounts to customers who pay in


cash to encourage more purchases.

• Customer Engagement: Engage with customers who have a pattern of cash


purchases to understand their preferences better.

• Monitoring Sales: Keep an eye on the sales performance of cash-paying customers


for potential trends in buying behavior.
Page 15 of 22

Problem 7

Write a query to display order_id and volume of biggest order (in terms of volume) that can
fit in carton id 10

-- [note: tables to be used -carton, order_items, product]

SOLUTION

The purpose of this query is to determine the order ID and the volume of the largest order
that can fit within a specific carton (ID 10).

SAMPLE OUTPUT

BUSINESS INSIGHTS

• Understanding the volume of orders can assist in logistics and inventory


management, ensuring efficient packing and shipping.

RECOMMENDATIONS

• Optimizing Packing: Use the results to optimize the packing process for large
orders.

• Inventory Planning: Consider how many large orders can be fulfilled with the
available carton sizes and adjust inventory levels accordingly.

• Analyzing Volume Trends: Monitor order volume trends to enhance forecasting and
manage storage space effectively.
Page 16 of 22

Problem 8
Write a query to display product_id, product_desc, product_quantity_avail, quantity sold,
and show inventory status of products as below as per below condition:

a. For electronics and computer categories,

i. If sales till date is zero then show 'no sales in past, give discount to reduce inventory',

ii. If inventory quantity is less than 10% of quantity sold, show 'low inventory, need to add
inventory',

iii. If inventory quantity is less than 50% of quantity sold, show 'medium inventory, need
to add some inventory',

iv. If inventory quantity is more or equal to 50% of quantity sold, show 'sufficient
inventory'

b. For mobiles and watches categories,

i. If sales till date is zero then show 'no sales in past, give discount to reduce inventory',

ii. If inventory quantity is less than 20% of quantity sold, show 'low inventory, need to add
inventory',

iii. If inventory quantity is less than 60% of quantity sold, show 'medium inventory, need
to add some inventory',

iv. If inventory quantity is more or equal to 60% of quantity sold, show 'sufficient
inventory'

c. Rest of the categories,

i. If sales till date is zero then show 'no sales in past, give discount to reduce inventory',

ii. If inventory quantity is less than 30% of quantity sold, show 'low inventory, need to add
inventory',

iii. If inventory quantity is less than 70% of quantity sold, show 'medium inventory, need
to add some inventory',

iv. If inventory quantity is more or equal to 70% of quantity sold, show 'sufficient
inventory'
Page 17 of 22

[note: tables to be used -product, product_class, order_items] (use sub-query)

SOLUTION

The purpose of this report is to analyze the inventory status of various products in our
catalog, focusing on sales performance and current inventory levels. By categorizing
products based on their sales and inventory data, we aim to identify potential inventory
issues and suggest actions for improvement.

SAMPLE OUTPUT
Page 18 of 22

BUSINESS INSIGHTS

• Zero Sales Products: A significant number of products have not sold, indicating
potential issues with product selection, pricing, or marketing.
• Low Inventory Risks: Some items are nearing critical inventory levels, which could
lead to stockouts and lost sales.
• Categorical Differences: Variability in sales and inventory trends across product
classes suggests the need for tailored strategies.

RECOMMENDATIONS

1. For Products with Zero Sales:

o Market Research: Investigate reasons for low sales and consider revising
marketing strategies.

o Promotions: Introduce discounts or bundles to stimulate interest.

2. For Low Inventory Products:

o Reorder Strategy: Implement proactive restocking for high-demand items to


avoid stockouts.

o Demand Forecasting: Use sales data to improve inventory planning.

3. For Sufficient Inventory:

o Marketing Focus: Enhance marketing strategies to boost sales further for


adequately stocked products.

o Cross-Promotion: Leverage opportunities for cross-selling and upselling.

4. Overall Inventory Management:

o Regular Monitoring: Establish routine inventory evaluations to identify


trends.

o Technology Utilization: Consider inventory management software for real-


time insights.
Page 19 of 22

Problem 9

Write a query to display product_id, product_desc and total quantity of products which are
sold together with product id 201 and are not shipped to city bangalore and new delhi.
Display the output in descending order concerning tot_qty.(use sub-query)

[note: tables to be used -order_items,product,order_header, online_customer, address]

SOLUTION

The objective of the query is to identify and analyze products that are sold together with
product ID 201, excluding orders shipped to the cities of Bangalore and New Delhi.

SAMPLE OUTPUT
Page 20 of 22

BUSINESS INSIGHTS

1. Sales Performance: The query highlights products frequently sold together with
product ID 201, providing insight into popular product combinations. This helps
identify complementary products that customers tend to purchase together.

2. Geographical Preferences: Excluding Bangalore and New Delhi from the sales data
reveals customer purchasing patterns in other cities. This can help in targeting and
optimizing product offerings outside of these major cities.

3. Inventory Management: By analyzing product quantities sold together, the


business can forecast demand for complementary products and adjust inventory
levels accordingly, ensuring stock availability.

RECOMMENDATIONS

1. Bundling Opportunities: Leverage insights from complementary product sales to


create bundle offers or promotions, which could increase overall sales and
customer satisfaction.

2. Regional Marketing: Since sales are excluded from Bangalore and New Delhi, focus
on marketing and promotional activities in other regions to boost sales in less
targeted cities.

3. Optimized Stocking: Use the data to adjust stock levels for frequently sold-together
products, preventing stockouts and improving overall customer satisfaction.
Page 21 of 22

Problem 10

Write a query to display the order_id,customer_id and customer fullname and total
quantity of products shipped for order ids which are even and shipped to address where
pincode is not starting with "5"

[note: tables to be used - online_customer,order_header, order_items, address]

SOLUTION

The objective of this query is to identify and analyze the orders placed by customers with
even order_ids, specifically focusing on those shipped to addresses where the pincode
does not start with "5".

SAMPLE OUTPUT
Page 22 of 22

BUSINESS INSIGHTS

1. Customer Behavior: Analyzing the orders with even order_ids may reveal patterns
or preferences among customers, such as seasonal buying trends or specific
product interests linked to these orders.

2. Geographical Distribution: The restriction on pincodes not starting with "5" might
indicate targeting specific regions, thus understanding geographical sales trends
and customer bases.

3. Product Demand: The total quantity of products shipped can help gauge which
products are in demand among customers in these regions, aiding in inventory
planning and stock management.

4. Customer Profile: Identifying the customers associated with these orders provides
insights into who the key buyers are, which can inform future marketing and sales
strategies.

RECOMMENDATIONS

1. Targeted Marketing Campaigns: Utilize the insights from customer behavior


analysis to launch marketing campaigns targeted at customers in regions with high
sales volume (excluding those with pincodes starting with "5").

2. Inventory Optimization: Monitor inventory levels for high-demand products


identified through this query to prevent stockouts and ensure customer satisfaction.

3. Customer Engagement: Engage with customers who frequently place even


order_ids through loyalty programs or special promotions to encourage repeat
purchases.

4. Geographic Expansion: Explore opportunities to expand product offerings or


marketing strategies in regions identified as having significant sales potential (those
without pincodes starting with "5").

5. Continuous Analysis: Implement regular analysis of customer orders based on


various criteria (including order_id parity) to uncover further insights that could
influence strategic decisions.

You might also like