Skip to content
Advertisement

How to sum and count in grouping in sql

I have tables like below. I would like to grouping and counting by referreing to its score.

First, I would like to sum score by customer It achived by group by method.

second, I would like to count by binning following band. I couldn’t figure out how to count after grouping

Are there any way to achieve this?

Thanks

Advertisement

Answer

You could use a union approach:

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