query-6a0433a52a2396d7ca9f95a07ab596e6
Table of file formats, ordered by file format family, with extensions and IMEs
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 ?fileFormat ?fileFormatLabel
(GROUP_CONCAT(DISTINCT(?familyLabel); separator=", ") as ?familyList)
(GROUP_CONCAT(DISTINCT(?extension); separator=", ") as ?extensionList)
(GROUP_CONCAT(DISTINCT(?internetMediaType); separator=", ") as ?internetMediaTypeList)
WHERE {
?fileFormat wdt:P31/wdt:P279* wd:Q235557 .
?fileFormat rdfs:label ?fileFormatLabel filter (lang(?fileFormatLabel) = "en") .
OPTIONAL {
?fileFormat wdt:P361 ?family .
?family wdt:P31/wdt:P279* wd:Q26085352 .
?family rdfs:label ?familyLabel filter (lang(?familyLabel) = "en") } .
OPTIONAL {
?fileFormat wdt:P1195 ?extension } .
OPTIONAL {
?fileFormat wdt:P1163 ?internetMediaType } .
}
GROUP BY ?fileFormat ?fileFormatLabel
ORDER BY DESC(?familyList) ASC(?fileFormatLabel)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?extension"):::projected
v8("?extensionList")
v5("?family")
v3("?familyLabel"):::projected
v8("?familyList")
v4("?fileFormat"):::projected
v2("?fileFormatLabel"):::projected
v7("?internetMediaType"):::projected
v9("?internetMediaTypeList")
a1((" "))
a2((" "))
c4(["wd:Q235557"]):::iri
c7(["wd:Q26085352"]):::iri
f0[["?fileFormatLabel = 'en'"]]
f0 --> v2
v4 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c4
v4 --"rdfs:label"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P361".-> v5
v5 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c7
v5 --"rdfs:label"--> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P1195".-> v6
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P1163".-> v7
end
bind4[/"?familyLabel"/]
v3 --o bind4
bind4 --as--o v8
bind5[/"?extension"/]
v6 --o bind5
bind5 --as--o v8
bind6[/"?internetMediaType"/]
v7 --o bind6
bind6 --as--o v9