def suggest_output_filename(meta_data):
    """Generate a recommended filename if `title`, `dataset` and `version` exist in `meta_data`,
    otherwise suggest `abc.sql`"""
    for item in meta_data:
        if 'name' in item and 'value' in item:
            if item['name'].lower() == 'title':
                title = item['value']
            if item['name'].lower() == 'dataset':
                dataset = item['value']
            if item['name'].lower() == 'version':
                version = str(item['value'])
    try:
        return '{title} - {dataset} Dataset - v{version}.sql'.format(title=
            title, dataset=dataset, version=version)
    except UnboundLocalError:
        return 'abc.sql'
