def fetchmany_query(columns, tablename, condition, rows=-1):
    """
    Function to process the query for fetch many process
    """
    if isinstance(columns, tuple) or isinstance(columns, list):
        pass
    else:
        raise ValueError('Columns argument must be iterator of Strings')
    if isinstance(columns[0], str):
        pass
    else:
        raise ValueError('Column names must be a String')
    if isinstance(tablename, str):
        pass
    else:
        raise ValueError('Tablename should be a String')
    if condition == None or isinstance(condition, str):
        pass
    else:
        raise ValueError('Condition can only be either None or String')
    if isinstance(rows, int) and (rows > 1 or rows == -1):
        pass
    else:
        raise ValueError('rows can only be a integer and not less than 1')
    if len(columns) > 1:
        cols = ''
        for i in columns:
            cols = cols + i + ','
        cols = cols[:len(cols) - 1]
    else:
        cols = str(columns[0])
    if condition == None:
        if rows == -1:
            query = 'Select ' + cols + ' from ' + tablename
        else:
            query = ('Select ' + cols + ' from ' + tablename +
                ' fetch first {} rows only'.format(rows))
    elif rows == -1:
        query = 'Select ' + cols + ' from ' + tablename + ' where ' + condition
    else:
        query = ('Select ' + cols + ' from ' + tablename + ' where ' +
            condition + ' fetch first {} rows only'.format(rows))
    return query
