my2iu / Jinq

LINQ-style queries for Java 8
Other
659 stars 71 forks source link

How to get the number of groups by issuing a separate query after group by? #108

Closed zdu-strong closed 1 year ago

zdu-strong commented 1 year ago

I'm preparing to use the spanner database, but I've encountered a problem, please help me.

my2iu commented 1 year ago

I’ve never used Spanner, and I’m not sure if Jinq even works with Spanner. But assuming Spanner is supposed to work like SQL, then you can

zdu-strong commented 1 year ago

Thank you for your help.

zdu-strong commented 1 year ago

Sharing my experience, I am collecting information and have not verified it yet. Spanner database supports PostgreSQL dialect, and PostgreSQL supports the method of obtaining the total number of records. It may be used to solve the problem of getting the total number of the groups.

PostgreSQL