我想在单个查询中检索uniqie视图和视图。 我当前对retrive视图的查询看起来像这样,但我也想用它检索唯一的视图。
IP地址的字段称为IP
SELECT `time` - `time` % 86400 AS Date, count(*) AS Views
FROM `bvcms_pageviews`
WHERE 1=1
GROUP BY Date
祝你好运
答案 0 :(得分:1)
独特的IP视图数据?选择'Distinct'会对此有所帮助
SELECT DISTINCT IP, `time` - `time` % 86400 AS Date, count(IP) AS
Views FROM `bvcms_pageviews` WHERE 1=1 GROUP BY Date