SQL build stuff updated