--查询大于同一类别平均价的产品信息 select product_id,product_type_id,name,price from products p1 where price > (select avg(price) from products p2 where p2.product_type_id = p1.product_type_id); --查询(没)有下级的雇员 select * from employee e1 where (not) exists(select employee_id from employees e2 where e1.employee_id = e2.manager_id);