Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

How to get SUM

$
0
0
Hi All,
i have a table and i want count as well as sum together eg below

Status ----Count
1 ---- 2
2 ----- 3
3 ---- 4
4 ---- 5
Total ---- 14
i want this output how to get it pls help me
for count i am using this query
select status,count(*) from table group by status

pls let me know which query is used to generate above output.

thanks in advance :)

Viewing all articles
Browse latest Browse all 13329

Trending Articles