I have a SQL query which I want to iterate using python for loop. Is there a way where I can define a variable inside the sql query and update it’s value with each python loop? date1 = datetime.date(2017, 1, 1) date2 = datetime.date(2017, 12, 31) for d in daterange(date1, date2): SQL = “SELECT * FROM table WHERE TABLE.CREATED_AT =