def sentence_preprocessing(sentence):
    """Prepossing the sentence for SQL query.
    
    Prepocessing the sentence for query:
    - Delete redundant space
    - Convert into lower case
    
    Args:
        sentence (str): the str to be processed
    
    Returns:
        str: the str after processing
    """

    while '  ' in sentence:
        sentence = sentence.replace('  ', ' ')
    if sentence[0] == ' ':
        sentence = sentence[1:]
    if sentence[-1] == ' ':
        sentence = sentence[:-1]
    sentence = sentence.lower()
    return sentence