У меня есть этот оператор
cursor = connection.cursor() query = "SELECT * from table" cursor.execute(query) res = cursor.fetchall()