How Sort By order will work in hive?

0 votes

Hi,

I am new to hive and not able to understand and solve all the keywords. Can anyone help how Sort By keyword works?

May 16 by rana
12 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hey,

Sort by clause performs on column names of Hive tables to sort the output, We can mention DESC for sorting the order in descending order and mention ASC for Ascending order of the sort.

For instance, if column types are numeric it will sort in numeric order if the columns types are string it will sort in lexicographical order.

Query you can use:

SELECT * from table_name SORT BY Id DESC;
answered May 16 by Gitika
• 8,980 points

Related Questions

0 votes
1 answer

How to sort a data frame by columns in R?

You can just use the order function ...READ MORE

answered Apr 10, 2018 in Data Analytics by darklord
• 6,140 points
54 views
0 votes
2 answers

How to sort an ArrayList of custom object by property in Java?

You can Sort using java 8 yourList.sort(Comparator.comparing(Classname::getName)); or  yourList.stream().forEach(a -> ...READ MORE

answered Aug 13, 2018 in Java by samarth295
• 2,190 points
45 views
0 votes
2 answers

How to sort array in descending order

there are some traditional ways that you ...READ MORE

answered Jul 4, 2018 in Java by Priyaj
• 56,120 points
23 views
0 votes
1 answer

If there are two joins in hive, how many mapreduce jobs will run?

There are two conditions for no. of ...READ MORE

answered Dec 19, 2018 in Big Data Hadoop by Omkar
• 66,050 points
54 views
0 votes
1 answer

How to sort by any measure in a Tableau table?

Hi Sindhu, Once you have created a bar ...READ MORE

answered Mar 8 in Tableau by CHERUKURI
• 13,940 points
67 views
0 votes
0 answers
0 votes
1 answer

How Impala is fast compared to Hive in terms of query response?

Impala provides faster response as it uses MPP(massively ...READ MORE

answered Mar 21, 2018 in Big Data Hadoop by nitinrawat895
• 9,070 points
175 views
0 votes
1 answer

How to join two tables (tibbles) by *list* columns in R

You can use the hash from digest ...READ MORE

answered Apr 5, 2018 in Data Analytics by kappa3010
• 2,010 points
37 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.