Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEAA solution to last week's challenge can be found here.
This week's challenge was submitted by @JosephSerpis - Thank you for your submission!
Everyone loves a good invoice! There’s just something about seeing the amount you paid for each item and finding that everything is as it should be, adding up to the total amount. And for the most part invoices are created by automated processes which reduce the chance of errors appearing (unless someone entered the wrong items). But what if something went wrong…
For this week’s challenge, pretend you are a business analyst for a service provider which offers a number of services. You are attempting to report the services delivered for last month. Due to data limitations of your database the data comes in a unique way which you need to calculate the rolling sales in order to work out the total of services provided. The total sales are all the sales between (and including) each matching pair of IDs. In other words, you need to find the total of all of the sales for the records beginning with a given ID through to the corresponding ID, making sure to include all records between your pair of matching IDs.
Fun challenge.
Shoutout to @Aaron_Harter for a quick and clean solution!
I still need to clean mine up a bit, but here's a batch macro solution!
@Blake Haha oops 😂! It was still fun to create though...
Getting back into the Weekly Challenge game
Solution attached.