我有表受众:id(int),unixtime(int),国家(int),城市(int),观众(int)。
表格的任命 - 为不同城市和国家的一些抽象受众保留统计数据。每天在不同时间针对不同城市和国家收集数次统计数据。
在撰写查询时需要帮助,该查询应显示每个跨国和城市的受众
- 第一个和最后一个日期
- 在特定的日期期间
输出应包含
- country1, city1, unixtime, 观众 - min(unixtime)
- country1, city1, unixtime, 观众 - max(unixtime)
- country1, city2, unixtime, 观众 - min(unixtime)
- 国家 1、城市 2、unixtime、观众 - max(unixtime)
- ...
或者:
- country1, city1, begin_unixtime, begin_audience, end_unixtime, end_audience
- country1、city2、begin_unixtime、begin_audience、end_unixtime、end_audience
- ...
在此先感谢您的帮助。