MySQL: Count the distinct rows per day

前端 未结 3 1823
庸人自扰
庸人自扰 2020-12-03 03:25

I have an interesting query I need to do. I have a table with an INT column containing ip address numbers (using INET_ATON), and a timestamp<

3条回答
  •  猫巷女王i
    2020-12-03 03:47

    SELECT  DATE(timestamp) Date, COUNT(DISTINCT ipNum) totalCOunt
    FROM    tableName
    GROUP   BY  DATE(timestamp)
    
    • SQLFiddle Demo

提交回复
热议问题