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.
基本上我有一个包含某种日志的数据库,每条记录都有一个 IP 地址字段,我需要生成一份报告,找出在一小时内记录超过 10 次的任何 IP 地址。我以前还没有写过任何这样的查询,所以我想知道在我开始编写代码之前是否可以只写查询。
表列:
ip time
select distinct ip from logs_table group by ip, date_format(`time`, '%Y%M%d%H') having count(*) > 10