fix sql query for register#3