sql for asb