Small SQL fix
Graph scripts converted to PEP8