Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Apache Hive Essentials. - Second Edition

You're reading from  Apache Hive Essentials. - Second Edition

Product type Book
Published in Jun 2018
Publisher Packt
ISBN-13 9781788995092
Pages 210 pages
Edition 2nd Edition
Languages
Author (1):
Dayong Du Dayong Du
Profile icon Dayong Du

Table of Contents (12) Chapters

Preface Overview of Big Data and Hive Setting Up the Hive Environment Data Definition and Description Data Correlation and Scope Data Manipulation Data Aggregation and Sampling Performance Considerations Extensibility Considerations Security Considerations Working with Other Tools Other Books You May Enjoy

Filtering data with conditions

It is quite common to narrow down the result set by using a condition clause, such as LIMIT, WHERE, IN/NOT IN, and EXISTS/NOT EXISTS. The LIMIT keyword limits the specified number of rows returned randomly. Compared with LIMIT, WHERE is a more powerful and generic condition clause to limit the returned result set by expressions, functions, and nested queries as in the following examples:

> SELECT name FROM employee LIMIT 2;
+----------+
| name |
+----------+
| Lucy |
| Michael |
+----------+
2 rows selected (71.125 seconds)


> SELECT name, work_place FROM employee WHERE name = 'Michael';
+----------+------------------------+
| name | work_place |
+----------+------------------------+
| Michael | ["Montreal","Toronto"] |
+----------+------------------------+
1 row selected (38.107 seconds)

-- All...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}