cursor.execute(sql)
return cursor.fetchall()

def using_sqlite_dates():
    sql = """
        SELECT p.price, t.date
        FROM ( SELECT date from dates ) t
        LEFT JOIN price p
        ON p.date = t.date
    """
cursor.execute(sql)
return cursor.fetchall()
Query Sqlite for multiple arguments at once and handling missing values