Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
GroupBy with union of ListSubQuery #282
It seems that I can't user a GroupBy after using union on ListSubQuery.
Hese is my code:
It's quite strange as I can order.
Another little question if I may...
I would be please if I can do something like:
I will add groupBy and having to Unions.
It's possible if you use the same alias, but that's probably not what you are after.
sgrainview and smortalityview are views and already have groupBy clause in their definition.
What I want to do is to group the results of the 2 views.
For the alias, do you really think it could work? And How would you use it?
added a commit
Nov 15, 2012
You can express now a query like this
I just realized that for Querydsl SQL the alias instances are strictly bound to the table they belong to. So sharing the where expression is difficult, unless you share also all the top level expressions that are used in the expression.
Where do you store the Snapshots?
For the where, the views (18 in fact) are all the same because when using a UNION, I should have the same columns...
If you have a solution, it will be welcome otherwise I'll continue doing something stupid like:
There are no automated snapshots, but I will make a release this weekend.
sgrainview and smortalityview are of different type?
You could instantiate them with the same alias and then use one expression for the where part like this
I didn't try this, but something like this should work.