Wednesday, March 21, 2012

how to add the values in a column

Display The total value of all the orders put together
try sum, ie select sum(OrderValue) from orders
You may have to group the orders though, here from northwind I get a sum for each customer
select customerId,sum(freight) from orders group by customerid
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"qqqqqqqqqqqqqqqqqqqqqqq" wrote:

> Display The total value of all the orders put together
>
>

No comments:

Post a Comment