Q:

Getting unique values from a mySQL table between a date range

I have this table:

I need to query the table and ask the following questions:
How many rows matching uri 'x' exist with unique IP addresses between 'y' and 'z' dates.
I was experimenting with COUNTs but I couldn't seem to get the result I needed...

A:

Try using COUNT(DISTINCT())

Returns a count of the number of rows with different non-NULL expr  values.

So your query would be something like
SELECT COUNT( DISTINCT( user_ip ) ) 
FROM table 
WHERE timestamp BETWEEN Y and Z

