[jboss-user] [EJB 3.0] - An EJB-QL query with sorting on an aggregate function
adamw
do-not-reply at jboss.com
Mon Jul 17 11:48:45 EDT 2006
Hello,
I have a problem with constructing a query which uses group-by and sorts by an aggregate column. As I use MySQL, I can't just write "ORDER BY min(column)", so I try a different approach, which works in MySQL, but throws an exception when I try to use it in EJB3. My query looks like this:
| SELECT name, min(dateCreated) AS mdc FROM TagEntity
| GROUP BY name
| ORDER BY mdc
|
Any ideas how can I do it any other (working :) ) way?
--
Cheers,
Adam
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958511#3958511
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958511
More information about the jboss-user
mailing list