How to find percentage for this below query
name | status
-----------+-------------
Marketing | In Progress
Marketing | Completed
Marketing | Completed
Sales | Completed
Sales | Completed
Audit | In Progress
Audit | In Progress
Audit | In Progress
For the above mentioned table, name "marketing" have 1 In progress(Status) and 2 Completed(Status)
So how to find % for this name column. If its "marketing" it has to be 66.66% because out of 3, 2 is completed and 1 is in progress.
For "sales" it has to be 100%. For "Audit" it has to be 0%
can someone help me out to find the query for postgresql
No answers yet!
3 years ago by Anand