yes, this indeed solved my problem. thanks a bunch.
On Wed, Feb 23, 2011 at 4:33 AM, wd wrote:
> yes, ip_number and session_id should not be in group by clause.
>
> 2011/2/22 Viral Bajaria
>>
>> I am guessing the following query should work too:
>> select item_sid, count(distinct ip_number, sess
yes, ip_number and session_id should not be in group by clause.
2011/2/22 Viral Bajaria
> I am guessing the following query should work too:
>
> select item_sid, count(distinct ip_number, session_id) from item_raw where
> date_day = '20110202' group by item_sid;
>
> On Mon, Feb 21, 2011 at 9:42
I am guessing the following query should work too:
select item_sid, count(distinct ip_number, session_id) from item_raw where
date_day = '20110202' group by item_sid;
On Mon, Feb 21, 2011 at 9:42 PM, Cam Bazz wrote:
> The query you have produced mulltiple item_sid's.
>
> This is rather what I h
The query you have produced mulltiple item_sid's.
This is rather what I have done:
select u.item_sid, count(*) cc from (select distinct item_sid,
ip_number, session_id from item_raw where date_day='20110202') u group
by u.eser_sid
date_day is a partition
and this produced the results i wanted,
May be
select item_sid, count(distinct ip_number, session_id) from item_raw group
by item_sid, ip_number, session_id (I've not test it, maybe it should be
concat(ip_number, session_id) instead of ip_number, session_id )
is what you want.
2011/2/21 Cam Bazz
> Hello,
>
> So I have table of item vi
Oh, I think I see what you are getting at .. basically you are getting
duplicate item_sids because they represent different views.
... try this:
select item_sid, ip_number,
session_id, count(*) from item_raw group by item_sid, ip_number,
session_id;
On Mon, Feb 21, 2011 at 11:54 AM, Cam Bazz
Hello,
I did not understand this:
when I do a:
select item_sid, count(*) from item_raw group by item_sid
i get hits per item.
how do we join this to the master table?
best regards,
-c.b.
On Mon, Feb 21, 2011 at 6:28 PM, Ajo Fod wrote:
> You can group by item_sid (drop session_id and ip_numb
You can group by item_sid (drop session_id and ip_number from group by
clause) and then join with the parent table to get session_id and
ip_number.
-Ajo
On Mon, Feb 21, 2011 at 3:07 AM, Cam Bazz wrote:
> Hello,
>
> So I have table of item views with item_sid, ip_number, session_id
>
> I know i