sql server - Grouping Totals With SQL Query -


here's situation:

i have table has 2 data columns:

number | value      0 |    11      0 |    10      0 |    12      1 |    10      1 |    10      1 |    11      2 |    11        .        .        . 

and on...

i create query presents totals different numbers separately, end being so:

number | total      0 |    33      1 |    31      2 |    11        .        .        . 

i've tried applying simple sum(value) query, can't seem right.

any appreciated.

select number , sum(value) "total" tablename group number  

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -