SELECT test2.user_id,myTable1.myCol1 FROM testingtable2 test2 LATERAL VIEW
explode(test2.purchased_item.product_id) myTable1 AS myCol1;
I am getting the below output result using the above query.
USER_ID | myCol1
-------------+---------------
1015826235 220003038067
1015826235 300003861266
1015826235 140002997245
1015826235 200002448035
If you compare the above output from the query with the below Table2
data, then the last line from Table2
data is missing in the above query output.
And this is the second Table2.
BUYER_ID | ITEM_ID | CREATED_TIME
-------------+--------------------+--------------------------
1015826235 220003038067 2012-06-21 07:57:39
1015826235 300003861266 2012-06-21 21:11:12
1015826235 140002997245 2012-06-14 20:10:16
1015826235 200002448035 2012-06-08 22:02:17
*1015826235* *260003553381* *2002-01-30 23:12:18*
I need to print the last line basically using the JOIN
, so the output should be like this after the JOIN
between the query I wrote above and Table2
data.
*1015826235* *260003553381* *2002-01-30 23:12:18*
So I need to do the JOIN
between the above query I wrote and Table2
data and get all the data that is not there in the output from the above query data. Any suggestion?
Just to add myCol1
and ITEM_ID
are same thing and USER_ID
and BUYER_ID
are same thing.
P.S- I need to use my above query to make the JOIN with Table2.