Users and their grades are contained in a SQL Server table I have. Let's assume for the sake of simplicity that there are just 2 columns: name and grade. For example, a common row may read Name: "John Doe," Grade: "A."
I'm trying to find a single SQL statement that will return the percentages for every potential response. Is there a way to do this without specifying every possible response (e.g., an open text box where users might type "pass/fail," "none," etc.)
I want the following final results: A: 5%, B: 15%, C: 40%, etc.
Can someone please help m with this?