Fix build SQL