Corrected license, formatted SQL query
Syntax corrections