Jennifer Narrowing a SELECT statement by multiple hits
Feb 12, 2014; 16:35
Jennifer
Narrowing a SELECT statement by multiple hits
Hello,
I have the following SQL statement that I'd like to add to. It's used to create a report that's emailed to me showing hits to our site that didn't provide a referrer. However, I only want to report on multiple hits from the same IP address - not just a single hit by someone.
How can I add a condition to only show hits by someone who's hit the site 2 or more times with the same IP? I tried GROUP BY but that didn't return all the hits - one one per IP.
SELECT `ip`,`page`,`url`,`time_stamp` FROM `ip_addresses` WHERE (`time_stamp` BETWEEN date_add( CURDATE(), INTERVAL -1 DAY ) AND CURDATE() - INTERVAL 1 SECOND) AND TRIM(`referrer`) LIKE '' ORDER BY INET_ATON(`ip`), `time_stamp`
I hope I'm explaining this correctly.
Thank you, Jenni
Superior Shelving Systems::::.... The (Storage|Office|Home|Warehouse) Shelving Specialists Since 1984
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql
Feb 12
Larry Martell Re: Narrowing a SELECT statement by multiple hits
Feb 12, 2014; 21:30
Larry Martell
Re: Narrowing a SELECT statement by multiple hits
Feb 17
Jennifer Re: Narrowing a SELECT statement by multiple hits
Feb 17, 2014; 08:42
Jennifer
Re: Narrowing a SELECT statement by multiple hits
Feb 17
Roy Lyseng Re: Narrowing a SELECT statement by multiple hits
Feb 17, 2014; 19:17
Roy Lyseng
Re: Narrowing a SELECT statement by multiple hits
Feb 17
Jennifer Re: Narrowing a SELECT statement by multiple hits
Feb 17, 2014; 12:11
Jennifer
Re: Narrowing a SELECT statement by multiple hits
Feb 17
Roy Lyseng Re: Narrowing a SELECT statement by multiple hits
Feb 17, 2014; 21:36
Roy Lyseng
Re: Narrowing a SELECT statement by multiple hits
Feb 17
shawn l.green Re: Narrowing a SELECT statement by multiple hits
Feb 17, 2014; 17:20
shawn l.green
Re: Narrowing a SELECT statement by multiple hits
Feb 17
Jennifer Re: Narrowing a SELECT statement by multiple hits
Feb 17, 2014; 16:46
Jennifer
Re: Narrowing a SELECT statement by multiple hits
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!