Support for SELECT DISTINCT