Re: subquery in select

2012-05-27 Thread shan s
I transled it to below, but I am getting an error. FAILED: Parse Error: line 6:50 mismatched input ',' expecting EOF near 'a' select a.category, a.count, a.count/b.totalCount as percentageValue from (select category, count(*) as count from gt group by cat) a, (select count(*) as totalCount from g

table design and performance questions

2012-05-27 Thread Avdeev V . M .
Question from novice. Where I can read table design best practices? I have a measure table with millions of rows and many dimension tables with less than 1000 rows each. I can't find out the way to get optimal design of both kind of tables. Is there performance tuning guides or performance FAQ?

Is hive-0.9.0 is compatible with hadoo-2.0.0..?

2012-05-27 Thread rohithsharma
Hi All, Can I run Hive-0.9.0 with hadoop-2.0.0..? Regards Rohith Sharma K S

Re: subquery in select

2012-05-27 Thread wd
select a.id, a.count, a.count/b.val from (select id, count(*) as count from data group by id) a, (select val from tableY ) b You don't have a join condition, this maybe output very large data. On Mon, May 28, 2012 at 11:45 AM, shan s wrote: > Thanks Edward. But I didn't get the trick yet. >

Re: subquery in select

2012-05-27 Thread shan s
Thanks Edward. But I didn't get the trick yet. I was able to use FROM with multiple group bys. But failed to see what to replace the subquery with... Could you please give an example for my use case below. Select id, count(*), count(*)/ (select val from tableY where name like ‘xyzdivisor’) >From