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

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

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

 注:后面那个 as 必须要写

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

Mysql 聚合函数嵌套使用

相关文章:

  • 2021-11-30
  • 2021-05-28
  • 2021-12-06
  • 2021-11-30
  • 2021-11-30
  • 2021-08-30
  • 2021-08-30
  • 2021-08-30
猜你喜欢
  • 2021-12-26
  • 2021-08-30
  • 2021-06-01
  • 2021-11-30
  • 2018-09-27
  • 2021-08-30
  • 2021-11-30
  • 2021-11-30
相关资源
相似解决方案