SELECT obj_uri, MAX(tag_date) FROM tag_it.tag, tag_it.object, tag_it.user_app WHERE tag_obj_id = obj_id AND tag_user_app_id = usr_app_id AND tag_idx @@ 'google'::tsquery AND usr_app_brand = 1 GROUP BY obj_uri ORDER BY MAX(tag_date) DESC OFFSET 0 LIMIT 10; ----- SELECT obj_uri, tag_date FROM tag_it.tag, tag_it.object, tag_it.user_app WHERE tag_obj_id = obj_id AND tag_user_app_id = usr_app_id AND tag_idx @@ 'google'::tsquery AND usr_app_brand = 1 ORDER BY tag_date DESC OFFSET 0 LIMIT 10;