Forum Moderators: open
As is normal with log files, each visitor has several entries. Since these logs comprise visits from PPC campaigns, each record includes:
id, ip_address, tracking_code
I'd like to run a query that gets a count of how many visitors came into the site by using any single PPC code.
Here are some example table entries:
0, 123.123.123.1, GOOGLE45
1, 123.123.123.1, GOOGLE45
2, 123.123.123.1, GOOGLE45
3, 12.12.12.2, GOOGLE45
4, 12.12.12.2, GOOGLE45
5, 234.234.234.45, YAHOO12
6, 145.145.145.145, YAHOO13
7, 145.145.145.145, YAHOO13
What I want to end up with is:
2 visitors came in with GOOGLE45 codes.
1 visitor came in with YAHOO12 code.
1 visitor came in with YAHOO13 code.
Would someone please get me on the right road, SELECT UNIQUE-wise ... or whatever the syntax will be? I'd really appreciate it. TIA.
I have a new issue, and since it seems to be related to PHP query and result code, I have posted it here [webmasterworld.com].
If you have any illumination, I would be grateful for it.