DBAsupport.com Forums - Powered by vBulletin
Results 1 to 1 of 1

Thread: Top Percentage of rows by condition

Hybrid View

  1. #1
    Join Date
    Oct 2024
    Posts
    1

    Top Percentage of rows by condition

    Version : Oracle 19c

    Hello,

    Please find the sample data attached as file and i have product name and sold quantity and ranked this already. i would need to apply top 50% product by Sold_Quantity or rank should be categorize as ?TOP Selling?, 50% to 75% should be categorize as ?Medium Selling? and 75% to 100% as ?Low Selling?. I gave the sample data. in original, total number of rows may vary. so, these % should apply accordingly. Final result, i would need the column as Product_Name, Sold_Quantity,Rank, Category(Top/Medium/Low). How to achieve this. any sample query please
    Attached Files Attached Files

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width