我的sqlite表中有两列,项目和日期。每个日期可能有很多项目。现在我想要取消。项目计数在给定日期范围之间的每个日期。我该怎么办?
答案 0 :(得分:0)
SELECT date,
COUNT(*) AS count
FROM MyTable
WHERE date BETWEEN ? AND ?
GROUP BY date;
答案 1 :(得分:0)
尝试这样的事情
SELECT Date,count(*) from Table WHERE date between ... AND ... GROUP BY Date