|
EMP |
ID |
Name |
Country |
Salary |
1 |
Vijay |
India |
6000 |
2 |
Bill |
USA |
8000 |
3 |
Kris |
France |
3000 |
4 |
Bhagat |
India |
2000 |
5 |
Steve |
USA |
1000 |
|
SELECT Country, SUM(Salary) as 'Total Wages'
FROM EMP
GROUP BY Country
HAVING SUM(Salary) > 5000
|
Output |
Country |
Total Wages |
India |
8000 |
USA |
9000 |
|