Advanced SQL tasks 1 to 28