E-mail Print PDF

SUM()

SELECT SUM(column_name) FROM table_name

O_IdOrderDateOrderPriceCustomer
1 2008/11/12 1000 Hansen
2 2008/10/23 1600 Nilsen
3 2008/09/02 700 Hansen
4 2008/09/03 300 Hansen
5 2008/08/30 2000 Jensen
6 2008/10/04 100 Nilsen

1
SELECT SUM(OrderPrice) AS  FROM Orders

Query Result:

5700

Comments

 
0 #1 Andrey 2010-11-01 13:16 And if you need a total for each Customer OrderPrice the table CUSTOMERY? Quote
 
 
+6 #2 Jasper 2010-11-02 14:55 Safely stale from here
w3schools.com/.../...
Even the values ​​have not changed and did not mention the resource
Quote
 
 
0 #3 ITSELF 2010-11-02 20:46
Safely stale from here
w3schools.com/.../...
Even the values ​​have not changed and did not mention the resource


Quote
 
 
-2 #4 max 2011-01-20 03:17
Safely stale from here
w3schools.com/.../...
Even the values ​​have not changed and did not mention the resource


This site is in the intermediate Jascha came first ..
Yuzayu furiously on it ukrlist.com.ua
Quote
 
 
0 #5 Marco 2011-02-13 12:14 SELECT SUM (OrderPrice) AS FROM Orders GROUP BY Customer Quote
 
 
+1 #6 Рамиль 2011-03-13 15:46 What vycheslit sum over different dates, each with the same date, a total of? Thanks in advance Quote
 
 
+2 #7 Рамиль 2011-04-27 12:02 Something I do not understand. Summarize the two columns 20 +5 I go 20 and 5 instead of 25. Somebody tell me .. like this byaku sum. Quote
 

Authorization

Nice Ajax Poll

Which one of my extensions is the best?

Statistics

Translate

русскийitalianoDeutschEnglishLATVIANукраїнськаfrançaispolski
1

Advertisement