I have data in a table like so:
+---------+----------------------------------------------------+
| videoid | ips |
+---------+----------------------------------------------------+
| 22 | 192.168.1.1,192.168.1.2,192.168.1.3,192.168.1.5 |
| 22 | 192.168.1.10 |
| 22 | 192.168.1.1 |
| 3 | 192.168.1.4 |
+---------+----------------------------------------------------+
4 rows in set (0.00 sec)
I need to get the result like so, cnt is the unique count of ips for each videoid:
+---------+-------+
| videoid | cnt |
+---------+-------+
| 22 | 5 |
| 3 | 1 |
+---------+-------+
2 row in set (0.52 sec)
thank you.