Hits Table:
hid | lid | IP
1 | 1 | 123.123.123.123
2 | 1 | 123.123.123.123
3 | 2 | 123.123.123.123
4 | 2 | 123.123.123.123
5 | 2 | 123.123.123.124
6 | 2 | 123.123.123.124
7 | 3 | 123.123.123.124
8 | 3 | 123.123.123.124
9 | 3 | 123.123.123.124
As you can see, there following are the unique hits for the various lid:
lid 1: 1 unique hit
lid 2: 2 unique hits
lid 3: 1 unique hit
So basically, I need a query that will return the following:
lid | uhits |
1 | 1 |
2 | 2 |
3 | 1 |
Anybody know how to get that?