从 HIVE 的列中查找最大值

Find Maximum from the column in HIVE

我是 HIVE 的新手。我正在使用 QLiksense 和 HIVE。 我有一个包含年、月、日的 table。 我加载了 table 并连接为

Load year&''&month''&day as concatdate;
SQL select * from HIVE. 'abc'. 'def'; 

Load ...
..
(the other fields)
..
..
SQL select * from HIVE. 'abc'. 'def';

现在我想找到 concatdate 的最大值并在 HIVE 中单独检索这些行。年月日为字符串类型

请帮忙。

一种方法使用子查询:

select h.*
from hive.abc.def h
where h.concatdate = (select max(h2.concatdate) from hive.abc.def h2);