Actually, look at the syntax error that you got in namliam's sample. Do you have spaces or other characters that might not read as a full field name? It might be that the field name you replace for 'distinct group' needs to be put in brackets. It just worked for me.
compare syntax:
SELECT...