def query_admins(admins: List[str]=[], admin_ids: List[str]=[], debug=False) -> List[Region]:
    where = region_where_clause('s_region_label.text', admins, 'e_region.node1', admin_ids, 's_region_alias.text')
    query = f'''
    SELECT e_region.node1 AS admin_id, s_region_label.text AS admin, e_region.node2 AS region_type,
        e_country.node2 AS country_id, s_country_label.text AS country,
        e_admin1.node2 AS admin1_id, s_admin1_label.text AS admin1,
        e_admin2.node2 AS admin2_id, s_admin2_label.text AS admin2,
        'POINT(' || c_coordinate.longitude || ' ' || c_coordinate.latitude || ')' as region_coordinate,
        s_region_alias.text AS alias
        FROM edges e_region
        JOIN edges e_region_label ON (e_region_label.node1=e_region.node1 AND e_region_label.label='label')
        JOIN strings s_region_label ON (e_region_label.id=s_region_label.edge_id)
        JOIN edges e_country
            JOIN edges e_country_label
                JOIN strings s_country_label
                ON (s_country_label.edge_id=e_country_label.id)
            ON (e_country.node2=e_country_label.node1 AND e_country_label.label='label')
        ON (e_region.node1=e_country.node1 AND e_country.label='P17')
        LEFT JOIN edges e_admin1
            JOIN edges e_admin1_label
                JOIN strings s_admin1_label
                ON (s_admin1_label.edge_id=e_admin1_label.id)
            ON (e_admin1.node2=e_admin1_label.node1 AND e_admin1_label.label='label')
        ON (e_region.node1=e_admin1.node1 AND e_admin1.label='P2006190001')
        LEFT JOIN edges e_admin2
            JOIN edges e_admin2_label
                JOIN strings s_admin2_label
                ON (s_admin2_label.edge_id=e_admin2_label.id)
            ON (e_admin2.node2=e_admin2_label.node1 AND e_admin2_label.label='label')
        ON (e_region.node1=e_admin2.node1 AND e_admin2.label='P2006190002')
        LEFT JOIN edges e_coordinate
            JOIN coordinates c_coordinate
            ON (c_coordinate.edge_id=e_coordinate.id)
        ON (e_region.node1=e_coordinate.node1 AND e_coordinate.label='P625')
        LEFT JOIN edges e_region_alias
            JOIN strings s_region_alias
            ON (s_region_alias.edge_id=e_region_alias.id)
          ON (e_region.node1=e_region_alias.node1 AND e_region_alias.label='alias')
    WHERE e_region.label='P31' AND e_region.node2 IN ('Q6256', 'Q10864048', 'Q13220204', 'Q13221722') AND {where}
    '''
    if debug:
        print(query)
    return _query_regions(query)
def query_admins(admins: List[str]=[], admin_ids: List[str]=[], debug=False) -> List[Region]:
    where = region_where_clause('s_region_label.text', admins, 'e_region.node1', admin_ids, 's_region_alias.text')
    query = f'
    SELECT e_region.node1 AS admin_id, s_region_label.text AS admin, e_region.node2 AS region_type,
        e_country.node2 AS country_id, s_country_label.text AS country,
        e_admin1.node2 AS admin1_id, s_admin1_label.text AS admin1,
        e_admin2.node2 AS admin2_id, s_admin2_label.text AS admin2,
        'POINT(' || c_coordinate.longitude || ' ' || c_coordinate.latitude || ')' as region_coordinate,
        s_region_alias.text AS alias
        FROM edges e_region
        JOIN edges e_region_label ON (e_region_label.node1=e_region.node1 AND e_region_label.label='label')
        JOIN strings s_region_label ON (e_region_label.id=s_region_label.edge_id)
        JOIN edges e_country
            JOIN edges e_country_label
                JOIN strings s_country_label
                ON (s_country_label.edge_id=e_country_label.id)
            ON (e_country.node2=e_country_label.node1 AND e_country_label.label='label')
        ON (e_region.node1=e_country.node1 AND e_country.label='P17')
        LEFT JOIN edges e_admin1
            JOIN edges e_admin1_label
                JOIN strings s_admin1_label
                ON (s_admin1_label.edge_id=e_admin1_label.id)
            ON (e_admin1.node2=e_admin1_label.node1 AND e_admin1_label.label='label')
        ON (e_region.node1=e_admin1.node1 AND e_admin1.label='P2006190001')
        LEFT JOIN edges e_admin2
            JOIN edges e_admin2_label
                JOIN strings s_admin2_label
                ON (s_admin2_label.edge_id=e_admin2_label.id)
            ON (e_admin2.node2=e_admin2_label.node1 AND e_admin2_label.label='label')
        ON (e_region.node1=e_admin2.node1 AND e_admin2.label='P2006190002')
        LEFT JOIN edges e_coordinate
            JOIN coordinates c_coordinate
            ON (c_coordinate.edge_id=e_coordinate.id)
        ON (e_region.node1=e_coordinate.node1 AND e_coordinate.label='P625')
        LEFT JOIN edges e_region_alias
            JOIN strings s_region_alias
            ON (s_region_alias.edge_id=e_region_alias.id)
          ON (e_region.node1=e_region_alias.node1 AND e_region_alias.label='alias')
    WHERE e_region.label='P31' AND e_region.node2 IN ('Q6256', 'Q10864048', 'Q13220204', 'Q13221722') AND {where}
    '
    if debug:
        print(query)
    return _query_regions(query)