PG::Error: SELECT DISTINCT, ORDER BY expressions must appear in select list

ActionView::Template::Error (PG::Error: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list I'm creating an events website and I'm trying to sort the rendered rsvps by the...