So I have the following table format in SQL Server. I want to find the percentage of animals where the color is black.
Type Color
--------------
Dog Black
Cat Brown
Dog Brown
Cat Black
Dog white
Dog Black
So in other words the output would be something like this.
Dog black 33%
Cat black 16.6%
How can I do this in a single query?