Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
每个人,
我有一个按 postid 检索所有日期组的 sql,如下所示:
Select * from table group by postid;
但我需要计算总组。下面对我不起作用,它列出了每个组的计数!但我需要总组数!
Select count(*) from table group by postid;
如何获取此 sql 的所有行号?(按postid从表组中选择*;)
谢谢!
SELECT COUNT(DISTINCT postid) FROM `table`