MySQL Forums
Forum List  »  Newbie

Error:1248
Posted by: Sai Krishna Tummala
Date: July 17, 2018 09:49PM

Hi,

I am trying to print the number of employees, whose salary is more than the average salary of the table. empsal column consists of salaries od employees.
but i am getting Error 1248 message. pls correct the query

select count(*) as 'no.of Employees with more than avg. salary' from
(select * from Employee where empsal>(select avg(empsal) from Employee));

Options: ReplyQuote


Subject
Written By
Posted
Error:1248
July 17, 2018 09:49PM
July 18, 2018 08:05AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.