Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to have computation in GROUP BY statement #18

Open
saklanipankaj opened this issue Jun 27, 2019 · 3 comments
Open

Unable to have computation in GROUP BY statement #18

saklanipankaj opened this issue Jun 27, 2019 · 3 comments

Comments

@saklanipankaj
Copy link

SELECT c, SUM(b/a)
FROM t1
GROUP BY c;

ERROR 13180 (HY000): Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'testdb.t1.b.ElGamal.Enc' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

unable to do group by when doing computation inside a SUM function

@cheziyi
Copy link
Member

cheziyi commented Jun 27, 2019

What is the schema of the table?

@saklanipankaj
Copy link
Author

+-------+--------------+------+------+-------------------+-------+------------------------------------------------+
| Field | Type | Null | Key | Default | Extra | Encryption |
+-------+--------------+------+------+-------------------+-------+------------------------------------------------+
| a | int | NO | | NULL | | Store, Addition, Multiplication, Search, Range |
| b | tinyint | NO | | NULL | | Store, Addition, Multiplication, Search, Range |
| c | varchar(100) | YES | | NULL | | None |
| d | datetime | NO | | CURRENT_TIMESTAMP | | None |
+-------+--------------+------+------+-------------------+-------+------------------------------------------------+
4 rows in set (0.00 sec)

@cheziyi
Copy link
Member

cheziyi commented Jun 28, 2019

Encrypted aggregation functions are currently does not support the GROUP BY clause, but will be supported in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants