Your server probably has ONLY_FULL_GROUP_BY turned on. You can either turn it off or add each of your selected fields to the group by.
More Related Contents:
- Group by month and year in MySQL
- Mysql: how to select groups having certain values?
- Selecting all corresponding fields using MAX and GROUP BY
- MySQL GROUP BY behavior
- You can’t specify target table for update in FROM clause
- MySQL Query GROUP BY day / month / year
- Generating a range of numbers in MySQL
- must appear in the GROUP BY clause or be used in an aggregate function
- How do I make a row generator in MySQL?
- MySQL INSERT INTO table VALUES.. vs INSERT INTO table SET
- MySQL number of items within “in clause”
- Error 1046 No database Selected, how to resolve?
- JOIN two SELECT statement results
- What’s the difference between VARCHAR and CHAR?
- Alter a MySQL column to be AUTO_INCREMENT
- Is there something wrong with joins that don’t use the JOIN keyword in SQL or MySQL?
- single fixed table with multiple columns vs flexible abstract tables
- MySQL remove duplicates from big database quick
- mysql, iterate through column names
- How to delete Duplicates in MySQL table
- SQL to Entity Framework Count Group-By
- mySQL Returning the top 5 of each category
- Selecting Random Rows in MySQL
- Use A Union Or A Join – What Is Faster [closed]
- MySQL – how to front pad zip code with “0”?
- Find the number of columns in a table
- Mysql strip time component from datetime
- How to return a incremental group number per group in SQL
- How to do a case sensitive GROUP BY?
- In SQL how do I get the maximum value for an integer?