SQL Giving #1055 error when using GROUP_CONCAT

308 Views Asked by At

I am trying to apply this SQL code to my MySQL databse.

SELECT GROUP_CONCAT( `choice` ), `choice_id`, `is_right_choice`
FROM Question_choices
GROUP BY `choice`

However, when I try to implement it, I get this error:

1055 - Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'Wine.Question_choices.choice_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

Here is the structure and contents of my database. enter image description here

enter image description here

I have almost no experience databasing, so I'm not really sure where to start fixing this.

0

There are 0 best solutions below