for a comment table
There are the following requirements:
Query how many comments each user has posted since a certain time
You can use the following SQL to query:
select
user_id,
count(*)
from
comment
where
created_at > '2022-06-20'
group by
user_id;
There is a new requirement:
How many users have commented since the query
select
count(*)
from
(
select
user_id
from
comment
where
created_at > '2022-06-20'
group by
user_id
) as user_id_group_by
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。