Categories

Apr 24 in Big Data | Hadoop

Q:

Inner Join

The simplest join is an inner join. In this join, each row match of the input tables will be seen in output.

Let's take two tables sales (name, id of product) and the other product (id, name of the product)

hive> select * from sales;
John 5
Cena 2
Kurt 0
Angle 3
Raffle 4
hive> select * from product;
2 Coat
3 Pencil
4 Shirt
5 Shoes
hive> select sales.* , product.*
    > FROM sales JOIN product ON(sales.id=product.id);
John   5 5 Shoes
Cena   2 2 Coat
Angle  3 3 Pencil
Raffle 4 4 Shirt

Related questions

Madanswer
Apr 24 in Big Data | Hadoop
Apr 24 in Big Data | Hadoop
Apr 6 in Big Data | Hadoop
...