Develop SQL part