Jobs in sql-queries, python