报表查询通过将数据行分组进行统计,语法为:[select ...] from ... [where ...] [ group by ... [having ... ]] [ order by ... ]。group by子句指定分组依据,having子句设置分组条件。报表查询中可使用SQL函数。