优化一下我的sql语句:WITH t1 AS ( SELECT *, row_number() OVER (PARTITION BY user_id) rn FROM web_operation ) SELECT log_time,count(1) cnt FROM t1 WHERE rn =1 GROUP BY log_time;
时间: 2023-03-13 14:26:07 浏览: 97
如何优化sql语句[文].pdf
我可以尝试优化你的SQL语句:SELECT log_time, COUNT(1) cnt FROM web_operation WHERE user_id IN (SELECT user_id FROM web_operation GROUP BY user_id) GROUP BY log_time;
阅读全文