先过滤后联表。
from 和 join支持子查询的嵌套,
where中不支持子查询嵌套,
having不支持子查询。
where 不能使用select中的别名,having可以。
HQL中select distinct不能和group by 共用 = 不推荐使用distinct去重,因为distinct会走一个reduce