Is there a stormic way to execute the following SQL statement? store.execute("""SELECT MAX(id) FROM gear.op WHERE CAST(id AS character) LIKE '9%';""").get_one() I'm using postgres. Thank you. Eduardo Willians