async def get_top_civilization(database, user_id, platform_id):
    """Get top civilizations for user."""
    query = """
        select civilization_id as id, civilizations.name, civilizations.dataset_id
        from players join civilizations on players.dataset_id=civilizations.dataset_id and players.civilization_id=civilizations.id
        where user_id=:id and platform_id=:platform_id and winner=true and human=true
        group by civilization_id, civilizations.name, civilizations.dataset_id
        order by count(match_id) desc limit 1
    """
    top = await database.fetch_one(query, values={'id': user_id, 'platform_id': platform_id})
    if top:
        return dict(top)
    return None