Hello, I have this select : select word, count(*) mostpopular from table group by word order by mostpopular DESC LIMIT 0 , 50 Code (markup): My table is like that : word ¦ date ¦ author Actually my select select the most popular words in my table. I'd like that it select the mostpopular words but with a filter on the authors : I 'd like that if a word has the same poster twice it count for 1 only. Bonus : Then I 'd like to select only after a xx date. I know how to do this (hopefully ;-). But is it possible to set this at the same time I set a different time "inteval" for the "same poster" filter. For example : select the most popular words in the past 3 days where same posters count for 1 for 6 hours. I really don't know how to manage this :-?
This works in SQL Server and is supposed to work in later versions of MySQL: Change count(*) to count(distinct author)