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

  • SEARCH
  • Home
  • 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 9285845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T19:16:08+00:00 2026-06-18T19:16:08+00:00

I knew that normal columns followed by aggregate functions are allowed only if a

  • 0

I knew that normal columns followed by aggregate functions are allowed only if a Group By including them follows.
But then why is the following working?

mysql> select payee,sum(amount) from checks;  
+---------+-------------+  
| payee   | sum(amount) |  
+---------+-------------+  
| Ma Bell |      893.76 |  
+---------+-------------+  
1 row in set (0.00 sec)  
  • 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-06-18T19:16:09+00:00Added an answer on June 18, 2026 at 7:16 pm

    This behavior is an “extension” to MySql:

    MySQL extends the use of GROUP BY so that the select list can refer
    to nonaggregated columns not named in the GROUP BY clause.

    However, This behavior is actually a configurable setting in MySql:

    ONLY_FULL_GROUP_BY

    Do not permit queries for which the select list or (as of MySQL
    5.1.10) HAVING list refers to nonaggregated columns that are not named in the GROUP BY clause.

    It is best to respect the group by and add all non-aggregated columns, especially if there’s the possibility that you might someday migrate to a server that has ONLY_FULL_GROUP_BY turned on.

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

Sidebar

Related Questions

I knew that parcelable are hide something secret, but didn't thought that i need
I knew that when we allocate memory by using new/new[], then we should release
I knew that java.util.Calendar class method getInstance() returns a GregorianCalendar but how could i
I have some different Map/Reduces functions that I use in my project. But one
I knew that we can create child themes for wordpress. But i want to
I knew that we can set innodb as engine tables. But can we add
I knew that puts return always nil by itself. But knowing that fact already
I knew that Static variables are created and initialized only one time I.e when
facebook has the facebook credit and I knew that they are testing on pay
When I wanted to get Android source code, I knew that I have to

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.