Formatted the sql