iI just need a little help about sqlSQL queries
heresHere's the situation
ID FIRST_NAME LAST_NAME START_DAT END_DATE SALARY CITY DESCRIPTION
---- ---------- ---------- --------- --------- ---------- ---------- ---------------
01 Jason Martin 25-JUL-96 25-JUL-06 1234.56 Toronto Programmer
02 Alison Mathews 21-MAR-76 21-FEB-86 6661.78 Vancouver Tester
03 James Smith 12-DEC-78 15-MAR-90 6544.78 Vancouver Tester
04 Celia Rice 24-OCT-82 21-APR-99 2344.78 Vancouver Manager
05 Robert Black 15-JAN-84 08-AUG-98 2334.78 Vancouver Tester
06 Linda Green 30-JUL-87 04-JAN-96 4322.78 New York Tester
07 David Larry 31-DEC-90 12-FEB-98 7897.78 New York Manager
08 James Cat 17-SEP-96 15-APR-02 1232.78 Vancouver Tester
8 rows selected.
SQL> -- GROUP BY clause and AVG() function
SQL> SELECT city, AVG(salary)
2 FROM employee
3 GROUP BY city;
CITY AVG(SALARY)
---------- -----------
New York 6110.28
Toronto 1234.56
Vancouver 3823.78
theThe problem is i cantI can't find a way to extract those names having higher salaries from each avg(salary)avg(salary) for city
example
Example: vancouver
Vancouver has avg(salary)avg(salary) of 3823.78 so iI should get the name of 2 people:alison alison and james bcozbecause they have higher salary than the avg(salary)avg(salary) of new york
forFor now iI only go to this query but not working
hopeHope someone can help me