-2

SQL query to find out Avg Salary location wise ?

Name|Location|Salary
====|========|======
a   |Bombay  |4000
b   |Bombay  |5000
c   |Delhi   |3000
d   |Delhi   |6000
e   |Chennai |700
f   |Chennai |9000
osiris_v6
  • 452
  • 2
  • 9

1 Answers1

0

use average and group by to get your result.

 select location , avg(salary) as Average from table group by location

You may find this link for more info link.

DarkRob
  • 3,843
  • 1
  • 10
  • 27