SQL finished

Bonus to come