简单实现一下
比如:
[销售表]
[销售编号] [销售人员] [销售额] [销售数量] [销售时间]
1 XXX 200 1 2009-03-31 08:14:23
2 XXX 352 2 2009-03-31 08:24:33
3 XXX 400 3 2009-03-31 08:29:36
4 XXX 200 1 2009-03-31 09:10:07
5 XXX 100 1 2009-03-31 09:30:12
6 XXX 300 1 2009-03-31 10:04:53
SQL语句:
Code
查询结果:
[销售时段] [销售总额] [销售总数]
08 952 6
09 300 2
10 300 1