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 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:
1000000.00 500000.00 503000.00
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:
3000000.00 1500000.00 1503000.00