Minor changes in SQL request