Check out example codes for "Error Code: 1140. In aggregated query without GROUP BY, expression #2 of SELECT list contains nonaggregated column 'grepper_history.hosting_words.word'; this is incompatible with sql_mode=only_full_group_by". It will help you in understanding the concepts better.

Code Example 1

SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

Learn ReactJs, React Native from akashmittal.com