I am querying for ids using a for-loop. So multiple selects are being used. Is there a better way to do this to have a single select statement for all ids?
for id in aoi_ids: sql = """SELECT id, date, col3 FROM table1 WHERE id=%s""" params = [id] return helper_func_to_execute_query(sql, params)
I know once way is to use another table. Any other faster way to do it?