Hadoop Hive: Correlating expression cannot contain unqualified column references

0 votes

I have this schema in Hive:

table1(a,b,c)
table2(b,d,e)

And I am running this Query: 

Select a,b,c from table where a in (0,100) AND b in (select b from table2
 
where d>2 GROUP BY 1 ) LIMIT 1;

But I get this error:

Unsupported SubQuery Expression 'b': Correlating expression cannot contain unqualified column references.
Dec 4, 2018 in Big Data Hadoop by digger
• 26,550 points
598 views

1 answer to this question.

0 votes

Try the following command and see if it works:

Select a,b,c from table1 where a in (0,100) AND table1.b in (select b from table2
  where d>2 GROUP BY 1 ) LIMIT 1;
answered Dec 4, 2018 by Omkar
• 67,480 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Setting Hive/Hadoop property using Hive Query

You can set Hadoop & Hive conf ...READ MORE

answered Apr 18, 2018 in Big Data Hadoop by Shubham
• 13,290 points
222 views
0 votes
1 answer

Installing Hive & Hadoop in VM

For Hadoop installation, I would recommend you ...READ MORE

answered Apr 19, 2018 in Big Data Hadoop by Shubham
• 13,290 points
995 views
0 votes
1 answer
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,670 points
2,741 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,670 points
289 views
0 votes
10 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
13,581 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,240 points
996 views
0 votes
1 answer

Hadoop: How to get the column name along with the output in Hive?

You can get the column names by ...READ MORE

answered Nov 20, 2018 in Big Data Hadoop by Omkar
• 67,480 points
246 views
0 votes
1 answer

Hadoop: How to keep duplicates in Hive using collect_set()?

SELECT hash_id, COLLECT_LIST(num_of_cats) AS ...READ MORE

answered Nov 2, 2018 in Big Data Hadoop by Omkar
• 67,480 points
247 views