how to join with group by statement

Posted by Surya logantahababu on Stack Overflow See other posts from Stack Overflow or by Surya logantahababu
Published on 2010-05-26T11:19:37Z Indexed on 2010/05/26 11:21 UTC
Read the original article Hit count: 187

Filed under:

Im having two tables

TableA Custid prodid Amt1 1 10 200 2 20 300 3 10 400 4 30 300 5 20 400 6 30 200

TableB prodid Amt2 10 100 20 200 30 300

and i want sum of all amount group by prodid. can any one give me both ansi and Tsql quries.

© Stack Overflow or respective owner

Related posts about sql