MySQL Forums
Forum List  »  Newbie

Re: Error:1248
Posted by: Phillip Ward
Date: July 18, 2018 08:05AM

What's wrong with ...

select avg(empsal) from Employee ;

... then put that into a variable and use it to do the second, real query?

select count( * ) c 
from Employee 
where empsal > ? ;

There's an awful lot to be said for keeping things simple.

Regards, Phill W.

Options: ReplyQuote


Subject
Written By
Posted
July 17, 2018 09:49PM
Re: Error:1248
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.