Replying again quickly, I found the issue. The named variable needs to be added separated by a comma. I did not know that and that is what was missing. This works: unix_time_now = time.time() unix_time_1hr_ago = unix_time_now-3600 # 3600 seconds is an hour values = (unix_time_1hr_ago,) c.execute('SELECT * FROM btc_price_table WHERE btc_price_timestamp > ?', values) I need to read up on why you need to add another layer of variable with values = (unix_time_1hr_ago, ) If I replace values with unix_time_1hr_ago it fails. I'll chalk it up to "this is how sqlite wants to hear it" so that's how I'll say it. Thank for all the feedback here.