Written trial 2 queries
Corrected some errors in the scripts