Group By Query

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Group By Query

kranti
Hi,

I need to do a query which will group by a particular element,
like i need a count of all the male and female customers for my store.
How do i do that?

Regards,
Kranti Agrawal
Student, IIIT Bangalore
krantiagrawal.blogspot.com
Reply | Threaded
Open this post in threaded view
|

Re: Group By Query

Atul Vani
hi Kranti,

you might wanna use setGroupBy function from DynamicViewEntity.java

--
Thanks & Regards
Atul Vani
Jr. Software Developer
HotWax Media Pvt. Ltd.
http://www.hotwaxmedia.com/


Kranti Agrawal wrote:

> Hi,
>
> I need to do a query which will group by a particular element,
> like i need a count of all the male and female customers for my store.
> How do i do that?
>
> Regards,
> Kranti Agrawal
> Student, IIIT Bangalore
> krantiagrawal.blogspot.com
>
>  

Reply | Threaded
Open this post in threaded view
|

Re: Group By Query

kranti
Thanks Atul, I'll have a look at it.

Regards,
Kranti Agrawal
Student, IIIT Bangalore
krantiagrawal.blogspot.com


On Fri, May 14, 2010 at 4:01 PM, Atul Vani <[hidden email]>wrote:

> hi Kranti,
>
> you might wanna use setGroupBy function from DynamicViewEntity.java
>
> --
> Thanks & Regards
> Atul Vani
> Jr. Software Developer
> HotWax Media Pvt. Ltd.
> http://www.hotwaxmedia.com/
>
>
>
> Kranti Agrawal wrote:
>
>> Hi,
>>
>> I need to do a query which will group by a particular element,
>> like i need a count of all the male and female customers for my store.
>> How do i do that?
>>
>> Regards,
>> Kranti Agrawal
>> Student, IIIT Bangalore
>> krantiagrawal.blogspot.com
>>
>>
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Group By Query

Atul Vani
hi Kranthi,

to think of it again,
when we use aggregate functions (like sum, average, count etc) on any column
it's sort of rule to include all other columns in the groupBy clause,

as these aggregate functions can be used using (and other) functions of  
GenericDelegator class, i think the groupBy is taken care of too.

--
Thanks & Regards
Atul Vani
Jr. Software Developer
HotWax Media Pvt. Ltd.
http://www.hotwaxmedia.com/


Kranti Agrawal wrote:

> Thanks Atul, I'll have a look at it.
>
> Regards,
> Kranti Agrawal
> Student, IIIT Bangalore
> krantiagrawal.blogspot.com
>
>
> On Fri, May 14, 2010 at 4:01 PM, Atul Vani <[hidden email]>wrote:
>
>  
>> hi Kranti,
>>
>> you might wanna use setGroupBy function from DynamicViewEntity.java
>>
>> --
>> Thanks & Regards
>> Atul Vani
>> Jr. Software Developer
>> HotWax Media Pvt. Ltd.
>> http://www.hotwaxmedia.com/
>>
>>
>>
>> Kranti Agrawal wrote:
>>
>>    
>>> Hi,
>>>
>>> I need to do a query which will group by a particular element,
>>> like i need a count of all the male and female customers for my store.
>>> How do i do that?
>>>
>>> Regards,
>>> Kranti Agrawal
>>> Student, IIIT Bangalore
>>> krantiagrawal.blogspot.com
>>>
>>>
>>>
>>>      
>>    
>
>