Showing results for 
Search instead for 
Did you mean: 

order by clause was not working for below query can anybody help me why its not working

Former Member
0 Kudos

Below Query

select {} , count({}) from {product},{catalogversion},{WishList2Entry},{wishlist2} where {}={product.catalogversion} and {WishList2Entry.product}={} and {catalogversion.version}='Online' and {WishList2Entry.wishlist}={} GROUP BY {} order by count({}) asc

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello ,

I tested on OOTB with the query on hAC, it ran successfully, no data return.

So I simplified the query to get any return values:

select {} , count({}) from {product} GROUP BY {} order by count({}) asc

The query ran successfully, and data return:

Please let me know what exactly you meant by the query not working. Did you get any exceptions? And please try the query on hAC.



Former Member
0 Kudos


Query working for , but order clause not working which means when I applied ASC or DESC it will not sorting please fine below result for the query, in the above query I was applied ASC but not displaying ascending order

Thanks Nagendra

0 Kudos

Normally order by doesn't work with Group By. The query should have Group By {} having count(