query-09957d8dd74f88c63076b8a8cba3a71a

rq turtle/ttl

principal areas of Wales - identifiers - Part 1 SELECT ?item ?itemLabel ?GSS_code__2011 ?GeoNames_ID ?_ISO_3166_2_code ?_Freebase_ID ?_FIPS_10_4__countries_and_regions ?MusicBrainz_area_ID ?_dmoz_ID WHERE { ?item wdt:P31 wd:Q15979307. SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } OPTIONAL { ?item wdt:P836 ?_GSS_code__2011. } OPTIONAL { ?item wdt:P1566 ?GeoNames_ID. } OPTIONAL { ?item wdt:P300 ?_ISO_3166_2_code. } OPTIONAL { ?item wdt:P646 ?_Freebase_ID. } OPTIONAL { ?item wdt:P901 ?_FIPS_10_4__countries_and_regions. } OPTIONAL { ?item wdt:P982 ?_MusicBrainz_area_ID. } OPTIONAL { ?item wdt:P998 ?_dmoz_ID. } }

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#principal areas of Wales - identifiers - Part 1
SELECT ?item ?itemLabel ?_GSS_code__2011_ ?_GeoNames_ID ?_ISO_3166_2_code ?_Freebase_ID ?_FIPS_10_4__countries_and_regions_ ?_MusicBrainz_area_ID ?_dmoz_ID WHERE {
  ?item wdt:P31 wd:Q15979307.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
  OPTIONAL { ?item wdt:P836 ?_GSS_code__2011_. }
  OPTIONAL { ?item wdt:P1566 ?_GeoNames_ID. }
  OPTIONAL { ?item wdt:P300 ?_ISO_3166_2_code. }
  OPTIONAL { ?item wdt:P646 ?_Freebase_ID. }
  OPTIONAL { ?item wdt:P901 ?_FIPS_10_4__countries_and_regions_. }
  OPTIONAL { ?item wdt:P982 ?_MusicBrainz_area_ID. }
  OPTIONAL { ?item wdt:P998 ?_dmoz_ID. }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?_FIPS_10_4__countries_and_regions_"):::projected v5("?_Freebase_ID"):::projected v2("?_GSS_code__2011_"):::projected v3("?_GeoNames_ID"):::projected v4("?_ISO_3166_2_code"):::projected v7("?_MusicBrainz_area_ID"):::projected v8("?_dmoz_ID"):::projected v1("?item"):::projected c2(["wd:Q15979307"]):::iri c6(["en"]):::literal c4(["bd:serviceParam"]):::iri v1 --"wdt:P31"--> c2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P836".-> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P1566".-> v3 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P300".-> v4 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P646".-> v5 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P901".-> v6 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P982".-> v7 end subgraph optional6["(optional)"] style optional6 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P998".-> v8 end