revise the sql query