目的:Mysql 聚合函数嵌套使用

聚合函数不可以直接嵌套使用,比如: max(count(*))

但是可以嵌套子查询使用  eg:

 注:后面那个 as 必须要写

select  max(total) from ( select count(*) as total from blog group by btype) as aa;

Mysql 聚合函数嵌套使用

相关文章:

  • 2021-11-04
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2022-02-01
猜你喜欢
  • 2021-04-16
  • 2021-09-23
  • 2022-12-23
相关资源
相似解决方案