Menu
Hi,
I was wondering if it is possible to write a query that gets the result of 3 counts?
For example I have a table called “boxes” that has the following:
– id– name– color
now I want to write a query that gets the count of boxes but filter them based on color so if we have 30 red and 20 blue and 10 green
it does not give me a result of 60 but rather it says
red 30
blue 20
green 10
Obviously it can easily be done with 3 queries, but can it be done by 1?