You are on page 1of 1

Hive databases Name: Selling

Hive table Name: Product

Question1: Please provide the Hive syntax to use the above


databases.
Answer: The Hive syntax to use the above database are:

hive> SHOW DATABASE;


hive> USE Selling;

Question 2: Please provide the Hive syntax to select the


records whose product name is “Notebook”.
Answer: The hive syntax to select the records whose product name is
Notebook are:

USE Selling;
SELECT Notebook
FROM Product
LIMIT 1;

Question 3: Please provide the Hive syntax to select the


records whose pages view times is greater than 2000.
Answer: The Hive syntax to select the records whose page view times is
greater than 200 are:

USE Selling;
SELECT Product
WHERE Page views > 2000

This study source was downloaded by 100000814636672 from CourseHero.com on 08-07-2022 01:57:36 GMT -05:00

https://www.coursehero.com/file/159613655/HiveAssigmentdocx/
Powered by TCPDF (www.tcpdf.org)

You might also like