ERROR: syntax error at or near "ORDER" LINE 4: ORDER BY C.priority ^