SELECT user(), MAX(salary) FROM users GROUP BY user() HAVING MAX(salary) > 10
info at phpclasses dot org