View on GitHub

SQL

My SQL queries to related to sales and business intelligence

This is a reference page for my ongoing SQL repository where I keep original transactional SQL queries that I have found useful in my IT career. Feel free to use or improve them.

Not looking for SQL? Here are my other repositories.

DECLARE @my_repo = "Awesome!"

Sales Statistics

Sales vs Sales Goal MTD (Month-to-Date)

Sales vs Sales Goal MTD.sql This query assigns a goal of $1,000,000 as the sales goal for the month, adds up all sales for the month so far, and then compares it to where your sales should be at right now if you are on track with your sales goal. The results look like this:

Sales Goal   Todays Target   Gross Sales

1000000.00   500000.00         503000.00

Sales vs Sales Goal QTD (Quarter-to-Date)

Sales vs Sales Goal QTD.sql This query assigns a goal of $3,000,000 as the sales goal for the quarter, adds up all sales for the quarter so far, and then compares it to where your sales should be at right now if you are on track with your sales goal. The results look like this:

Sales Goal   Todays Target   Gross Sales

3000000.00   1500000.00         1503000.00


Home | Music | Projects