def df_compiler(d: list, m: str='all', dist: str='') ->list:
    """    Collect essential information for transferring samples to the destination folder
    on AWS.

    :param d:
        Sample ids
    :param m:
        Mode of operation, one of `all`, or `hashtags`
    :param dist:
        Target folder destination for transfer, which is the parent directory where
        projects and samples are stored, for a particular sample.

    :return:
        Statement results
    """
    statement = {'all':
        "SELECT a.id, a.Sample, a.request_id, a.projectData_id, b.projectShortName AS project, a.processed, c.PI_email, a.AWS_storage, '{}' AS destination, 'sample_data stats_data' AS `table`, s.Run_Name, a.processed FROM sample_data AS a JOIN project_data AS b ON a.projectData_id=b.id JOIN lab AS c ON b.lab_id=c.id JOIN genome_index AS g ON g.id=a.genomeIndex_id JOIN sc_tech AS s ON s.id=g.scTech_id WHERE a.id='{}'"
        , 'hashtags':
        "SELECT a.id, d.Sample, a.request_id, a.projectData_id, b.projectShortName AS project, a.processed, c.PI_email, d.AWS_storage, '{}' AS destination, 'hashtag_lib' AS `table`, s.Run_Name, d.`status` FROM sample_data AS a JOIN project_data AS b ON a.projectData_id=b.id JOIN lab AS c ON b.lab_id=c.id JOIN hashtag_lib AS d ON d.sampleData_id=a.id JOIN genome_index AS g ON g.id=d.genomeIndex_id JOIN sc_tech AS s ON s.id=g.scTech_id WHERE a.id='{}'"
        }
    statements = []
    for i in d:
        statements.append(statement[m].format(dist, i))
    return statements
