Code: Select all
Company Product Revenue
A Widgets 15
A Cat food 5
B Sneakers 50
B Widgets 12
B Cat food 95
B Cat food 5
Code: Select all
Company Widgets_rev Cat_food_rev Sneakers_rev
A 15 5 (null)
B 12 100 50
My assumption has been to employ the PARTITION/OVER statements, but I've run into a brick wall chasing that particular squirrel.
Thanks in advance!