Re: Group by with count

2012-12-27 Thread abhishek
Thanks for the reply , I got it Sent from my iPhone On Dec 27, 2012, at 2:31 PM, Jonathan Coveney wrote: > a = load 'tab1' as (col1, col2, col3); > b = group a by (col1, col2, col3); > c = foreach b generate FLATTEN(group), COUNT_STAR(a); > > > 2012/12/26 abhishek > >> Hi all, >> >> How ca

Re: Group by with count

2012-12-27 Thread abhishek
Thanks for the reply. Sent from my iPhone On Dec 27, 2012, at 3:14 PM, Russell Jurney wrote: > Shortened: > > b = foreach (group a by (col1, col2, col3)) generate FLATTEN(group), > COUNT_STAR(a); > On Dec 27, 2012 11:31 AM, "Jonathan Coveney" wrote: > >> a = load 'tab1' as (col1, col2, col3)

Re: Group by with count

2012-12-27 Thread Russell Jurney
Shortened: b = foreach (group a by (col1, col2, col3)) generate FLATTEN(group), COUNT_STAR(a); On Dec 27, 2012 11:31 AM, "Jonathan Coveney" wrote: > a = load 'tab1' as (col1, col2, col3); > b = group a by (col1, col2, col3); > c = foreach b generate FLATTEN(group), COUNT_STAR(a); > > > 2012/12/

Re: Group by with count

2012-12-27 Thread Jonathan Coveney
a = load 'tab1' as (col1, col2, col3); b = group a by (col1, col2, col3); c = foreach b generate FLATTEN(group), COUNT_STAR(a); 2012/12/26 abhishek > Hi all, > > How can I achieve above hive query in pig > > Create table x as select y.col1,y.col2,y.col3,count(*) as count from tab1 > y group by

Group by with count

2012-12-26 Thread abhishek
Hi all, How can I achieve above hive query in pig Create table x as select y.col1,y.col2,y.col3,count(*) as count from tab1 y group by y.col1,y.col2,y.col3 Regards Abhishek