I did similar operations on UPDATE instead of SELECT, and it works there. Maybe my mind is fried right now, but I can't figure out the solution...
so maybe I should rename my post: cannot use =, < with (?) in SELECT WHERE query ? -- https://mail.python.org/mailman/listinfo/python-list