I have a hive table with below partitions:
part_date='07-12-2016'
part_date='04-12-2016'
part_date='01-12-2016'
Now how can I get the first partition which is less than the most recent partition in hive query. Assuming the partition values are the date when the data is ingested into the table. In this case it should be part_date='04-12-2016'.
so the query should be like:
select part_date from table_A where part_date > second_last_partition(ie 04-12-2016);
Thanks in advance