TSQL Homework tasks 1 to 7