表名:product
表结构:
表数据:
如果使用日期查询的话:
sql: SELECT QUARTER(create_time) AS '季度',AVG(seller) AS '平均值' FROM product GROUP BY QUARTER(create_time);
如果按月份查询的话:
sql:SELECT FLOOR((mouth+2)/3) AS '季度',AVG(seller)AS'平均值' FROM product GROUP BY FLOOR((mouth+2)/3);