SELECT data based on partitions
I know we have PARTITION clause in SELECT statement.
My requirement is i need to select data from Last two partitions in which data is available.
If we know the name of the 2 partitions then we can select and UNION ALL.
But In my case, i dont know the partitition names too,
I need to find out the names of the partitions using any subquery and i need to select from that.
May i know how can i achieve this?
Thanks