How to get the last “consume” of each product type for each unit produced?
I have an SQL table that’s essentially just products being consumed in the fabrication process. I would like to (use what I think is the LAG function) return the last “consume” of each product type for each unit produced. There is also a timestamp attached to every Action (build or consume) if that helped.