Finance-Analytics-using-SQL-and-EXCEL

Finance Analytics using SQL and EXCEL Portfolio

This repository/portfolio is for a project which was created for a computer hardware producing company. To help the company, better its yearly performance by getting enough insights from its database to make quick, smart data-informed decisions.

The situation in the project is that there is a computer hardware-producing organization, and we have its finance-related database. The database consists of details about the product, customers, cost of products, all the rebate offers, sales information with date of purchase, sold quantity, etc.

The task involves SQL queries to answer ad-hoc requests for which the business needs insights. The task also focuses on improving the performance of large queries using different measures. Apart from that, it also expects certain insights in the form of charts and tables.

Report-generating actions were taken using SQL for retrieving various details per business requirement. The tables were extracted in the form of comma-separated-values(CSV) files and for visualization of these insights, EXCEL charts were used. User-defined functions, stored procedures, etc were taken advantage of so that the same SQL queries can be used as a reusable asset for any past/future financial years.

Finally, a lot of the conclusions were made after the insights were drawn, some of them are listed below such as:

1- Amazon has the highest global market share percentage, it is the biggest customer/asset for our organization.

2- Nova pvt. ltd, Notebillig, etc have the lowest market share, and there is a need to improve the business strategy for such customers.

3- India is the best-selling country with the largest percentage of product sales.

4- South American countries like Chile, Brazil, and Columbia have very little business done by our organization. So, a better and more personalized marketing strategy would be necessary to attract these markets.

5- Region wise net sales percentage was drawn out of the data for APAC, EU, LATAM, and NA regions. Also, top n and bottom n products in these regions were extracted to know customer behavior better.


Below are some of the tasks involved in the project, snapshots of the queries and the generated reports:-

Task1

Before writing the query to retrieve information, we first wrote a user defined function called ‘get_fiscal_year’ which takes any date as input and give out ‘financial year’ for that particular date as per the assumed financial year start date.

image



Now, below is the query to retrieve the required information:

image

It gives us the following report:

image

Task2

After the performance improvments and added column, the below queries were used to generate reports:-
image
image

Task3

Task4

It gave us the report which we exported and saved as a excel and further went on to create a Pie Chart for each region as shown below:-

image

image

Challenge#2
Also created stored procedure called ‘get_%_net_sales_of_customers_per_region’ as a reusable asset for any combination of inputs. Below is the code and working snapshots of the stored procedure:-

image

image

Task5

Task6

If you reached till the end, really Appreciate you for your time! 😄:

Click here to go to Top