def remove_white_space(query: str) -> str:
    """Remove unnecessary white space from scrapped schema, if exists.

    Args:
        query: The SQL Schema for the leetcode problem as one string.
    Returns:
        The SQL Schema with unnecessary space removed.
    """
    query_lines = query.split("\n")
    query_lines = [x.strip() for x in query_lines if x.strip() != ""]
    return "\n".join(query_lines)