SQL SELECT Group by 2 conditions
I have a table which stores search phrases and IP addresses. I want to execute a query that will give me each search phrase along with the number of unique IPs associated with that phrase. How can I accomplish this "nested" group by?
Code:
SELECT search_phrase, COUNT(*) as c FROM search_tracking GROUP BY search_phrase ORDER BY c DESC |
Would SELECT DISTINCT... help you here?
|
All times are GMT -5. The time now is 07:00 PM. |