I have a dataframe (df) like below
df
MAX_TIMESTAMP
2020-01-24 03:07:40
I want to pass a value from dataframe column and apply greater than comparison the below query.
My query
cursor.execute("""SELECT * FROM ofs.ord_add oa
WHERE oa.is_active = 'Y' AND CREATE_TIMESTAMP > '2020-01-20 08:23:12'""")
data=cursor.fetchall()
columns = [column[0] for column in cursor.description]
status = pd.DataFrame(data,columns=columns)
How can I replace the hardcorded value with a parameter value for datetime coming from a dataframe ?