Sql Year Date Comparison Python Interpreter