WHERE clause, but you can in the HAVING clause. Ii. Example 1, list the number of employees and department numbers in each department with wages higher than the department's average salary, and sort by department number.CREATE TABLE EMP (ID int primary KEY auto_increment,Name varchar (50),Salary bigint,Deptin int);INSERT into EMP values (NULL, ' ZS ', 1000,1), (null, ' ls ', 1100,1), (null, ' WW ', 1100,1), (Null, ' Zl ', 900, 1),(NULL, ' Zs2 ', 1000,2), (null, ' LS2 ', 900,2), (null, '
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.