Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column

NoSuchKey