Strata based sampling from database into a dataframe

How can I sample data from a database strata by date.

Table a, partitioned by date. I need to do a sampling of the table with more latest record and less older record and move it into a panda dataframe.