I have a database which print me all employees of countries.
|Year|Country1|Country2|Country3|Country4|All
This is table, only with 25 countries and year from 2000 to now. In Internet I found only information for sum(country4) for example, but how can use sum with all fields exclude Year and All.
Updated:
Year | ZA | NA | BW | MG | ZW | AO | ZM | KE | NG | CF | GH | CM | CD | ET | UG | EG | DZ | MA | MR | NE | SD | TN | SO | All
------+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+-----
2000 | 10 | 10 | 5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25
2001 | 25 | 10 | 8 | 5 | 5 | 9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 62
This is database and I need the sum from ZA to SO without year
and All
. All
is the result of the sum, but I think SQLite or PHP can build sum without me doing it manually?
When I search in internet I found only example for sum of one column but not for rows.