+ 1
how can we print max salary from different city with mysql
database
6 Respostas
+ 1
SELECT salary FROM table_name WHERE city_name = "City_name" ORDER BY salary DESC LIMIT = 1
//I need to check if its right .. haven't seen sql in ages. but it should be something like that.
0
sorry bt i want to ask for different city having higest salary with there full information
0
Can you explain more?
0
yes... i want to print full detail of employee who is having highest salary from each city...i have 5 city in my database and having 10 employees atleast
0
SELECT salary FROM table_name WHERE city_name IN ("City_name1", "City_name2", .........)ORDER BY salary DESC LIMIT = 1
0
it doesent worked bt i got a right query...i.e
select *from table_name where salary in (select max(salary) from table_name group by (city));
by the way thanks alot for ur effort...