Sql Basic Certification Hackerrank Solution Python