query-cf50203b425c7d606c330abe58e84f20
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?nOficial ?bandera ?escudo ?gob ?cargojefe ?jefe ?cargojefe2 ?jefe2 ?capital ?idioma ?cont ?sup (group_concat(distinct ?lim;separator=", ") as ?lim) ?pob (group_concat(distinct ?gent;separator=", ") as ?gent) ?loc ?web ?commons WHERE{
?q wdt:P31 wd:Q6256.
?q rdfs:label "México"@es.
OPTIONAL{?q wdt:P1448 ?nOficial. FILTER(LANG(?nOficial)='es').}
OPTIONAL{?q wdt:P41 ?bandera.}
OPTIONAL{?q wdt:P94 ?escudo.}
OPTIONAL{?q wdt:P122 [rdfs:label ?gob]. FILTER(LANG(?gob)='es').}
OPTIONAL{?q wdt:P1906 [rdfs:label ?cargojefe]. FILTER(LANG(?cargojefe)='es').}
OPTIONAL{?q wdt:P35 [rdfs:label ?jefe]. FILTER(LANG(?jefe)='es').}
OPTIONAL{?q wdt:P1313 [rdfs:label ?cargojefe2]. FILTER(LANG(?cargojefe2)='es').}
OPTIONAL{?q wdt:P6 [rdfs:label ?jefe2]. FILTER(LANG(?jefe2)='es').}
OPTIONAL{?q wdt:P36 [rdfs:label ?capital]. FILTER(LANG(?capital)='es').}
OPTIONAL{?q wdt:P37 [rdfs:label ?idioma]. FILTER(LANG(?idioma)='es').}
OPTIONAL{?q wdt:P30 [rdfs:label ?cont]. FILTER(LANG(?cont)='es').}
OPTIONAL{?q wdt:P2046 ?sup.}
OPTIONAL{?q wdt:P47 [rdfs:label ?lim]. FILTER(LANG(?lim)='es').}
OPTIONAL{?q wdt:P1082 ?pob.}
OPTIONAL{?q wdt:P1549 ?gent. FILTER(LANG(?gent)='es').}
OPTIONAL{?q wdt:P242 ?loc.}
OPTIONAL{?q wdt:P856 ?web.}
OPTIONAL{?q wdt:P373 ?commons.}
} GROUP BY ?nOficial ?bandera ?escudo ?gob ?cargojefe ?jefe ?cargojefe2 ?jefe2 ?capital ?idioma ?cont ?sup ?pob ?loc ?web ?commons
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v13("?bandera"):::projected
v5("?capital"):::projected
v9("?cargojefe"):::projected
v7("?cargojefe2"):::projected
v19("?commons"):::projected
v3("?cont"):::projected
v14("?escudo"):::projected
v20("?gent"):::projected
v10("?gob"):::projected
v4("?idioma"):::projected
v8("?jefe"):::projected
v6("?jefe2"):::projected
v20("?lim"):::projected
v17("?loc"):::projected
v11("?nOficial"):::projected
v16("?pob"):::projected
v12("?q")
v15("?sup"):::projected
v18("?web"):::projected
a1((" "))
a2((" "))
a3((" "))
a4((" "))
a5((" "))
a6((" "))
a7((" "))
a8((" "))
a9((" "))
c5([sMéxico^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString>"]):::literal
c3(["wd:Q6256"]):::iri
v12 --"wdt:P31"--> c3
v12 --"rdfs:label"--> c5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v12 -."wdt:P1448".-> v11
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v12 -."wdt:P41".-> v13
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v12 -."wdt:P94".-> v14
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
a1 -."rdfs:label".-> v10
v12 --"wdt:P122"--> a1
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
a2 -."rdfs:label".-> v9
v12 --"wdt:P1906"--> a2
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
a3 -."rdfs:label".-> v8
v12 --"wdt:P35"--> a3
end
subgraph optional6["(optional)"]
style optional6 fill:#bbf,stroke-dasharray: 5 5;
a4 -."rdfs:label".-> v7
v12 --"wdt:P1313"--> a4
end
subgraph optional7["(optional)"]
style optional7 fill:#bbf,stroke-dasharray: 5 5;
a5 -."rdfs:label".-> v6
v12 --"wdt:P6"--> a5
end
subgraph optional8["(optional)"]
style optional8 fill:#bbf,stroke-dasharray: 5 5;
a6 -."rdfs:label".-> v5
v12 --"wdt:P36"--> a6
end
subgraph optional9["(optional)"]
style optional9 fill:#bbf,stroke-dasharray: 5 5;
a7 -."rdfs:label".-> v4
v12 --"wdt:P37"--> a7
end
subgraph optional10["(optional)"]
style optional10 fill:#bbf,stroke-dasharray: 5 5;
a8 -."rdfs:label".-> v3
v12 --"wdt:P30"--> a8
end
subgraph optional11["(optional)"]
style optional11 fill:#bbf,stroke-dasharray: 5 5;
v12 -."wdt:P2046".-> v15
end
subgraph optional12["(optional)"]
style optional12 fill:#bbf,stroke-dasharray: 5 5;
a9 -."rdfs:label".-> v20
v12 --"wdt:P47"--> a9
end
subgraph optional13["(optional)"]
style optional13 fill:#bbf,stroke-dasharray: 5 5;
v12 -."wdt:P1082".-> v16
end
subgraph optional14["(optional)"]
style optional14 fill:#bbf,stroke-dasharray: 5 5;
v12 -."wdt:P1549".-> v20
end
subgraph optional15["(optional)"]
style optional15 fill:#bbf,stroke-dasharray: 5 5;
v12 -."wdt:P242".-> v17
end
subgraph optional16["(optional)"]
style optional16 fill:#bbf,stroke-dasharray: 5 5;
v12 -."wdt:P856".-> v18
end
subgraph optional17["(optional)"]
style optional17 fill:#bbf,stroke-dasharray: 5 5;
v12 -."wdt:P373".-> v19
end
bind2[/"?lim"/]
v20 --o bind2
bind2 --as--o v20
bind3[/"?gent"/]
v20 --o bind3
bind3 --as--o v20