我有这个查询..
SELECT DATE_FORMAT(utcdt,GET_FORMAT(DATE,'ISO')) as utcdt,
HOUR(utcdt) as hour,
country,
sum(impressions) as impressions
FROM rtb_impressions where campaign_id='cid2204184260'
GROUP BY utcdt, hour, country
这些是结果......
{'impressions': Decimal('1'), 'country': 'US', 'hour': 10L, 'utcdt': '2012-10-01'}
{'impressions': Decimal('40000'), 'country': 'US', 'hour': 9L, 'utcdt': '2012-10-02'}
{'impressions': Decimal('20000'), 'country': 'US', 'hour': 9L, 'utcdt': '2012-10-02'}
为什么我应该得到 2 行却得到了 3 行?012-10-02 应该已经相加。
谢谢