+----------+---------------------+------------+--------------------+
|wage_id | full_name | wage | date_added |
+----------+---------------------+------------+--------------------+
| 1 | Unknown | 123 | 2001-12-22 |
+----------+---------------------+------------+--------------------+
| 2 | Unknown2 | 321 | 2007-06-17 |
+----------+---------------------+------------+--------------------+

how to count sum pf values in wage column?
123+321= 444 <---- that way :)

Member Avatar for iamthwee

+----------+---------------------+------------+--------------------+
|wage_id | full_name | wage | date_added |
+----------+---------------------+------------+--------------------+
| 1 | Unknown | 123 | 2001-12-22 |
+----------+---------------------+------------+--------------------+
| 2 | Unknown2 | 321 | 2007-06-17 |
+----------+---------------------+------------+--------------------+

how to count sum pf values in wage column?
123+321= 444 <---- that way :)

Thank you for help, i've found the answer :


mysql> select sum(wage) from name_of_table;
+------------+
|sum(wage)|
+------------+
| 444 |
+------------+

:$ it was simple :$

Member Avatar for iamthwee

No probs, wait till you have to do a query with joins, ordering and wat not. =)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.