Latest sql in case needed