365 Days of Daily Coding: Day 129
I am doing a data visualisation course from domestika. It was just so that I was scrolling my facebook’s newsfeed and I saw that they have black friday sale. I clicked on their ad since I was interested. I browsed few secs and saw the course. I was sceptical at first but all the courses were only RM 35. The normal price was around RM 190 for each. I said to myself “Let’s just try. It’s only RM 35”. Once I started taking the course, I fell completely hooked to it. Also because I have been trying to start a data viz project of mine and I have been stuck so taking this course along while doing the exercise has been helping me out tremendously. I will be sharing the link to my work here. Probably, it’s going to be a blog post of my behind-the-scenes work. Meanwhile, if you would like to know the course that I am taking, the link is here.
Puzzle 13: Inventory Tracking

I tried the solution in the live oracle environment here.
WITH temp AS (
Select '7/1/2018' AS DateLog, 100 AS Quantity FROM Dual Union All
Select '7/2/2018' AS DateLog, 75 AS Quantity FROM Dual Union All
Select '7/3/2018' AS DateLog, -150 AS Quantity FROM Dual Union All
Select '7/4/2018' AS DateLog, 50 AS Quantity FROM Dual Union All
Select '7/5/2018' AS DateLog, -100 AS Quantity FROM Dual
)
Select DateLog, Quantity, SUM(Quantity) OVER (ORDER BY DateLog) AS Inventory
FROM temp;

Leave a comment