I'm wondering if there is a way, other than sub-queries and temp tables, to count how many repeat values are in the rows you've grouped.
For example, it's easy to get a UNIQUE value count, but I want to get a count of values that appear more than once.
Example:
SELECT url, HOUR(dttm), COUNT(DISTINCT visitorIP) UniqueVisitors,
COUNT("visitorIPs that visited more than once") RepeatVisitors
FROM table
GROUP BY url, HOUR(dttm)
Any ideas? All I can think of is sub-queries or another table.