我在 MSaccess 中有下表,我需要通过加入 2 列进行分组,并在某个日期/时间范围内,以及如果可能的类型和城市,给出重复的计数,但这不是强制性的。
LocationX LocationY DateTimeStamp, City Type
100 150 08/01/2013 8:59:44 Brisbane RadioJob
101 155 08/01/2013 9:56:01 Brisbane RadioJob
100 150 08/01/2013 8:49:39 Brisbane RadioJob
103 150 08/01/2013 8:55:13 Brisbane RadioJob
我需要将第 0 列和第 1 列连接在一起并进行计数,但只能选择特定时间范围内的位置。
例如,如果我在 08/01/2013 8:49:00 和 08/01/2013 8:59:59 之间选择,我应该得到下表:
LocationX LocationY CountOfLocation City Type
100 150 2 Brisbane RadioJob
103 150 1 Brisbane RadioJob
就目前而言,我在 MSaccess 中使用设计视图编写了 2 个查询以使其正常工作,但我想尝试并学习如何在一个 SQL 语句中执行此操作。
提前致谢,
麦克风