def METHOD_NAME(x_param, y_param, filters, tasks, dbname="results.db"):
    """
    Return a list of selected parameters and a data structure (list of list of tuples),
    - 1st index corresponds to the task,
    - 2nd index corresponds to the row,
    - 3rd index corresponds to the selected parameter.
    The key parameters that define a benchmark are always selected.
    """
    db = connect_db(dbname)
    data = []
    cols_to_select = [x_param.split()[0], y_param.split()[0]]
    # always pass shared primary key information (they define a distinct benchmark)
    primary_keys = []
    for t in range(len(tasks)):
        if t == 0:
            primary_keys = retrieve_primary_keys(tasks[t], db)
        else:
            primary_keys = intersection(primary_keys, retrieve_primary_keys(tasks[t], db))
    for key in primary_keys:
        if key not in cols_to_select:
            cols_to_select.append(key)
    # also pass filter parameter value in
    for f in filters:
        if f.param not in cols_to_select:
            cols_to_select.append(f.param)
    sql_val_args = []
    filter_command = ""
    for t in range(len(tasks)):
        select_command = "SELECT DISTINCT {} FROM {} ".format(
            ",".join(cols_to_select), task_name(tasks[t])
        )
        if filters:
            # first time, still need to populate sql_val_args and make filter_command
            if t == 0:
                filter_command = "WHERE "
                for f in range(len(filters)):
                    filter_command += str(filters[f])
                    sql_val_args.extend(filters[f].args)
                    if f < len(filters) - 1:
                        filter_command += " AND "
        select_command += filter_command
        select_command += ";"
        print(select_command)
        cursor = db.cursor()
        cursor.execute(select_command, sql_val_args)
        data.append(tuple(tuple(row) for row in cursor.fetchall()))
    return cols_to_select, data