Added missing file and change sql