I am working on SQL and I want to achieve this output in SQL using HIVE, here is the problem statement
I have columns Item, Cost and price. The output I am expecting to have a following columns
- 25% cost- Which is the 25% value of cost.
- total_price- Its a sum of price values based on Item.
- cumulative_price-Based on item it's a sum of cumulative price.
- I want to flag those records which has cumulative_price>25%cost value
