Skip to content
Advertisement

Percentage of existence in a group in SQL

Hi I have a requirement of finding the occurrence percentage of specific items in a group. My table is like this

And the required result set is like this

Im having just a group query like this

Im not getting an idea how to calculate the percentage from the group

Advertisement

Answer

You can use OVER Clause.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement