Questions tagged [mysql-error-1055]

50 questions
503
votes
18 answers

Error related to only_full_group_by when executing a query in MySql

I have upgraded my system and have installed MySql 5.7.9 with php for a web application I am working on. I have a query that is dynamically created, and when run in older versions of MySQL it works fine. Since upgrading to 5.7 I get this…
Dan Bemowski
  • 5,305
  • 3
  • 14
  • 10
405
votes
31 answers

SELECT list is not in GROUP BY clause and contains nonaggregated column .... incompatible with sql_mode=only_full_group_by

I'm using MySQL 5.7.13 on my windows PC with WAMP Server My problem is while executing this query SELECT * FROM `tbl_customer_pod_uploads` WHERE `load_id` = '78' AND `status` = 'Active' GROUP BY `proof_type` I'm getting always error like…
Dhanu K
  • 11,288
  • 6
  • 24
  • 38
75
votes
13 answers

#1055 - Expression of SELECT list is not in GROUP BY clause and contains nonaggregated column this is incompatible with sql_mode=only_full_group_by

my Query : select libelle,credit_initial,disponible_v,sum(montant) as montant FROM fiche,annee,type where type.id_type=annee.id_type and annee.id_annee=fiche.id_annee and annee = year(current_timestamp) GROUP BY libelle order by libelle…
Miloud BAKTETE
  • 2,404
  • 3
  • 19
  • 30
43
votes
2 answers

SELECT list is not in GROUP BY clause and contains nonaggregated column

Receiving the following error: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'world.country.Code' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with…
Danny J. Williams
  • 431
  • 1
  • 4
  • 3
36
votes
10 answers

Error Code: 1055 incompatible with sql_mode=only_full_group_by

I have been having issues switching to an offline version of the Lahman SQL baseball database. I was using a terminal embed into an EDX course. This command runs fine on the web terminal: SELECT concat(m.nameFirst,concat(" ",m.nameLast)) as Player, …
Frydaddy07
  • 363
  • 1
  • 3
  • 4
28
votes
5 answers

MySQL : isn't in GROUP BY

The site produces results, but with SELECT COUNT and SELECT query with GROUP BY having two different result counts. This is likely due to the error that is displaying in phpmyadmin but not on the site. The Queries: SELECT count(DISTINCT `name`) as…
James Cordeiro
  • 521
  • 1
  • 5
  • 8
18
votes
3 answers

Is there ANY_VALUE capability for mysql 5.6?

currently im working with mysql 5.7 in development, and 5.6 in production. Each time i run a query with a group by in development i get some error like "Error Code: 1055. Expression #1 of SELECT list is not in GROUP BY " Here is the query. SELECT…
Tim
  • 585
  • 1
  • 5
  • 14
6
votes
1 answer

How to fix query group with only_full_group_by

I have a basic key-value table, that has some data in it for each user. With the updated mysql it has the sql_mode set to only_full_group_by (new default) when you do a group by. When I try to run this simple query: select * from user_features where…
Get Off My Lawn
  • 34,175
  • 38
  • 176
  • 338
6
votes
3 answers

Select list contains nonaggregated column

Since updating MySQL I've noticed the following query fails SELECT u.*, p.name as plan, COUNT(u.id) as totalprojects FROM users u LEFT JOIN plans p ON p.id = access LEFT JOIN maps m ON m.user_id = u.id WHERE u.email = 'john@doe.com' In aggregated…
user6885115
6
votes
3 answers

Laravel SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #2

This might be obvious, and I may be completely missing the point, but I've got a table which contains multiple rows with user_id, site_id, e.g. ldstaff | ld_site ____________________ 3 1 3 2 4 1 A MySQL query…
Rlemm1991
  • 505
  • 1
  • 7
  • 20
5
votes
3 answers

MySql 5.7 ORDER BY clause is not in GROUP BY clause and contains nonaggregated column

I'm trying to figure out without disabling "only_full_group_by" in my.ini here is my query: SELECT p.title, COUNT(t.qty) AS total FROM payments t LEFT JOIN products AS p ON p.id = t.item WHERE t.user = 1 GROUP BY t.item ORDER BY…
Alko
  • 1,421
  • 5
  • 25
  • 51
5
votes
3 answers

MySQL Error 1055 information_schema.PROFILING.SEQ on every query

I'm using a recent install of mysql from the mysql repository, installed on Ubuntu 14.04. Every query I run results in the error below and I have been unable to find anything that discusses this via google or here. For example, this (obviously for…
AndrewG
  • 51
  • 1
  • 3
3
votes
2 answers

MySQL error "Expression #1 of ORDER BY clause is not in GROUP BY clause"

I am trying to fetch total number of records from a table and using the following MySQL query: SELECT COUNT(*) AS cnt FROM `info` WHERE 1 GROUP BY FROM_UNIXTIME(signup_date, '%Y-%m-%d') ORDER BY signup_date DESC but it is resulting in the following…
Amrinder Singh
  • 5,300
  • 12
  • 46
  • 88
3
votes
1 answer

October CMS - SQL request incompatible with sql_mode=only_full_group_by

i have a strange issue in my local environment : wamp64 mysql 5.7.14 OctoberCMS 382 this encountered in several plugins, For example, this one that attempts to display a list of slides in the backend Syntax error or access violation: 1055…
pat-och
  • 345
  • 3
  • 17
3
votes
4 answers

MySQL Error: SELECT list is not in GROUP BY clause

I have a problem with my query and mysql throws the following error: #1055 - Expression #66 of SELECT list is not in GROUP BY clause and contains nonaggregated column 's.status' which is not functionally dependent on columns in GROUP BY clause;…
kurama
  • 677
  • 3
  • 8
  • 16
1
2 3 4