Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 482797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T01:07:56+00:00 2026-05-13T01:07:56+00:00

Hi wondering if perhaps someone could shed some light on the below error. The

  • 0

Hi wondering if perhaps someone could shed some light on the below error. The sql works fine locally but i get the the below error remotely.

SQL query:

   SELECT COUNT(node.nid), 
          node.nid AS nid, 
          node_data_field_update_date.field_update_date_value AS node_data_field_update_date_field_update_date_value
     FROM node node
LEFT JOIN content_type_update node_data_field_update_date ON node.vid = node_data_field_update_date.vid
    WHERE node.type IN ('update')
ORDER BY node_data_field_update_date_field_update_date_value DESC

MySQL said:

#1140 – Mixing of GROUP columns (MIN(),MAX(),COUNT(),…) with no
GROUP columns is illegal if there is
no GROUP BY clause`

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T01:07:56+00:00Added an answer on May 13, 2026 at 1:07 am

    The reason a single column using an aggregate function works while the version with columns not using aggregate functions doesn’t is because you need to specify a GROUP BY clause. Here’s what your query should look resemble:

       SELECT COUNT(n.nid), 
              n.nid, 
              ctu.field_update_date_value
         FROM NODE n
    LEFT JOIN CONTENT_TYPE_UPDATE ctu ON ctu.vid = n.vid
        WHERE n.type IN ('update')
     GROUP BY n.nid, ctu.field_update_date_value
     ORDER BY field_update_date_value DESC
    

    I changed out your table aliases for shorter ones – easier to read. Here’s the meat of your issue:

       SELECT n.nid,
              COUNT(n.fake_example_column),                
              ctu.field_update_date_value
          ...
     GROUP BY n.nid, ctu.field_update_date_value
    

    I altered the example to use a fake column in order to highlight how the GROUP BY needs to be defined. Any column you reference without wrapping in an aggregate function should to be mentioned in the GROUP BY. I say should because MySQL is the only db I’m aware of that supports a GROUP BY where you can selectively omit columns – there are numerous SO questions about why queries work on MySQL but can’t be ported without change to other dbs. Apparently in your case, you still need to define at least one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good day, I was wondering if you could perhaps help me, I was reading
Wondering if someone could please explain the difference between these two queries and advise
Wondering if someone could help me. I have next to no knowledge with Ajax,
I started playing with Postsharp but cannot get past the first step. Someone else
I was wondering if someone could help me with the performance of this code
I was wondering if someone could point me in the right direction with this
I have done this several times before but am wondering if perhaps there is
Wondering if there is any way to get the lambda expressions that result from
wondering if some of you know what javascript framework facebook is using ? Thanks
I was wondering if anyone knows of some good community distributed custom DDL templates

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.