Data source: ISO

20 rows where country_code = "PT"

View and edit SQL

Link country_code code_31662 name local_variant language_code romanization_system parent_subdivision
PT PT-01 Aveiro   pt    
PT PT-02 Beja   pt    
PT PT-03 Braga   pt    
PT PT-04 Bragança   pt    
PT PT-05 Castelo Branco   pt    
PT PT-06 Coimbra   pt    
PT PT-07 Évora   pt    
PT PT-08 Faro   pt    
PT PT-09 Guarda   pt    
PT PT-10 Leiria   pt    
PT PT-11 Lisboa   pt    
PT PT-12 Portalegre   pt    
PT PT-13 Porto   pt    
PT PT-14 Santarém   pt    
PT PT-15 Setúbal   pt    
PT PT-16 Viana do Castelo   pt    
PT PT-17 Vila Real   pt    
PT PT-18 Viseu   pt    
PT PT-20 Região Autónoma dos Açores   pt    
PT PT-30 Região Autónoma da Madeira   pt    

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE subdivisions (
    country_code text NOT NULL
    , code_31662 text NOT NULL
    , name text
    , local_variant text
    , language_code text
    , romanization_system text
    , parent_subdivision text
    , PRIMARY KEY (country_code , code_31662)
    , FOREIGN KEY (country_code) REFERENCES countries (alpha_2_code) ON DELETE CASCADE
    , FOREIGN KEY (language_code) REFERENCES languages (alpha_2_code) ON DELETE CASCADE
);