query-0cb4346e5e90c99e3b5b5b652a485f0c
, which is only an instance of “film”, not of “work of art”. “film” is a subclass of “work of art”, but we need to tell SPARQL to take that into account when searching. Gone with the WindAs I’m writing this (October 2016), that query only returns 2,815 results – obviously, there are more works of art than that! The problem is that this misses items like subclass of “work of art”. (For exercise, try writing that query!) But that still has problems: some is an instance of Gone with the Wind syntax we talked about: []One possible solution to this is the is an animated film, which is a film, which is a work of art. In this case, we need to follow two “subclass of” statements – but it might also be three, four, five, any number really.Snow White and the Seven Dwarfs subclass of “work of art” – for example, otherWe’re still missing items that are instances of some subclass of some We’re no longer including items that are directly instances of work of art. . This means that there’s one “instance of” and then any number of “subclass of” statements between the item and the class. ?item wdt:P31/wdt:P279 ?classThe solution: , which is only an instance of “film”, not of “work of art”. “film” is a subclass of “work of art”, but we need to tell SPARQL to take that into account when searching. Gone with the WindAs I’m writing this (October 2016), that query only returns 2,815 results – obviously, there are more works of art than that! The problem is that this misses items like subclass of “work of art”. (For exercise, try writing that query!) But that still has problems: some is an instance of Gone with the Wind syntax we talked about: []One possible solution to this is the is an animated film, which is a film, which is a work of art. In this case, we need to follow two “subclass of” statements – but it might also be three, four, five, any number really.Snow White and the Seven Dwarfs subclass of “work of art” – for example, otherWe’re still missing items that are instances of some subclass of some We’re no longer including items that are directly instances of work of art.. This means that there’s one “instance of” and then any number of “subclass of” statements between the item and the class. ?item wdt:P31/wdt:P279 ?classThe solution: , which is only an instance of “film”, not of “work of art”. “film” is a subclass of “work of art”, but we need to tell SPARQL to take that into account when searching. Gone with the WindAs I’m writing this (October 2016), that query only returns 2,815 results – obviously, there are more works of art than that! The problem is that this misses items like subclass of “work of art”. (As an exercise, try writing that query!) But that still has problems: some is an instance of Gone with the Wind syntax we talked about: []One possible solution to this is the is an animated film, which is a film, which is a work of art. In this case, we need to follow two “subclass of” statements – but it might also be three, four, five, any number really.Snow White and the Seven Dwarfs subclass of “work of art” – for example, otherWe’re still missing items that are instances of some subclass of some We’re no longer including items that are directly instances of work of art.. This means that there’s one “instance of” and then any number of “subclass of” statements between the item and the class. ?item wdt:P31/wdt:P279 ?classThe solution: , which is only an instance of “film”, not of “work of art”. “film” is a subclass of “work of art”, but we need to tell SPARQL to take that into account when searching. Gone with the WindAs I’m writing this (October 2016), that query only returns 2,815 results – obviously, there are more works of art than that! The problem is that this misses items like subclass of “work of art”. (For exercise, try writing that query!) But that still has problems: some is an instance of Gone with the Wind syntax we talked about: []One possible solution to this is the is an animated film, which is a film, which is a work of art. In this case, we need to follow two “subclass of” statements – but it might also be three, four, five, any number really.Snow White and the Seven Dwarfs subclass of “work of art” – for example, otherWe’re still missing items that are instances of some subclass of some We’re no longer including items that are directly instances of work of art. . This means that there’s one “instance of” and then any number of “subclass of” statements between the item and the class. ?item wdt:P31/wdt:P279 ?classThe solution: , which is only an instance of “film”, not of “work of art”. “film” is a subclass of “work of art”, but we need to tell SPARQL to take that into account when searching. Gone with the WindAs I’m writing this (October 2016), that query only returns 2,815 results – obviously, there are more works of art than that! The problem is that this misses items like subclass of “work of art”. (For exercise, try writing that query!) But that still has problems: some is an instance of Gone with the Wind syntax we talked about: []One possible solution to this is the is an animated film, which is a film, which is a work of art. In this case, we need to follow two “subclass of” statements – but it might also be three, four, five, any number really.Snow White and the Seven Dwarfs subclass of “work of art” – for example, otherWe’re still missing items that are instances of some subclass of some We’re no longer including items that are directly instances of work of art. . This means that there’s one “instance of” and then any number of “subclass of” statements between the item and the class. ?item wdt:P31/wdt:P279 ?classThe solution: , which is only an instance of “film”, not of “work of art”. “film” is a subclass of “work of art”, but we need to tell SPARQL to take that into account when searching. Gone with the WindAs I’m writing this (October 2016), that query only returns 2,815 results – obviously, there are more works of art than that! The problem is that this misses items like subclass of “work of art”. (For exercise, try writing that query!) But that still has problems: some is an instance of Gone with the Wind syntax we talked about: []One possible solution to this is the is an animated film, which is a film, which is a work of art. In this case, we need to follow two “subclass of” statements – but it might also be three, four, five, any number really.Snow White and the Seven Dwarfs subclass of “work of art” – for example, otherWe’re still missing items that are instances of some subclass of some We’re no longer including items that are directly instances of work of art. . This means that there’s one “instance of” and then any number of “subclass of” statements between the item and the class. ?item wdt:P31/wdt:P279 ?classThe solution: , which is only an instance of “film”, not of “work of art”. “film” is a subclass of “work of art”, but we need to tell SPARQL to take that into account when searching. Gone with the WindAs I’m writing this (October 2016), that query only returns 2,815 results – obviously, there are more works of art than that! The problem is that this misses items like subclass of “work of art”. (For exercise, try writing that query!) But that still has problems: some is an instance of Gone with the Wind syntax we talked about: []One possible solution to this is the is an animated film, which is a film, which is a work of art. In this case, we need to follow two “subclass of” statements – but it might also be three, four, five, any number really.Snow White and the Seven Dwarfs subclass of “work of art” – for example, otherWe’re still missing items that are instances of some subclass of some We’re no longer including items that are directly instances of work of art. . This means that there’s one “instance of” and then any number of “subclass of” statements between the item and the class. ?item wdt:P31/wdt:P279 ?classThe solution: , which is only an instance of “film”, not of “work of art”. “film” is a subclass of “work of art”, but we need to tell SPARQL to take that into account when searching. Gone with the WindAs I’m writing this (October 2016), that query only returns 2,815 results – obviously, there are more works of art than that! The problem is that this misses items like subclass of “work of art”. (For exercise, try writing that query!) But that still has problems: some is an instance of Gone with the Wind syntax we talked about: []One possible solution to this is the is an animated film, which is a film, which is a work of art. In this case, we need to follow two “subclass of” statements – but it might also be three, four, five, any number really.Snow White and the Seven Dwarfs subclass of “work of art” – for example, otherWe’re still missing items that are instances of some subclass of some We’re no longer including items that are directly instances of work of art. . This means that there’s one “instance of” and then any number of “subclass of” statements between the item and the class. ?item wdt:P31/wdt:P279 ?classThe solution: , which is only an instance of “film”, not of “work of art”. “film” is a subclass of “work of art”, but we need to tell SPARQL to take that into account when searching. Gone with the WindAs I’m writing this (October 2016), that query only returns 2,815 results – obviously, there are more works of art than that! The problem is that this misses items like subclass of “work of art”. (For exercise, try writing that query!) But that still has problems: some is an instance of Gone with the Wind syntax we talked about: []One possible solution to this is the is an animated film, which is a film, which is a work of art. In this case, we need to follow two “subclass of” statements – but it might also be three, four, five, any number really.Snow White and the Seven Dwarfs subclass of “work of art” – for example, otherWe’re still missing items that are instances of some subclass of some We’re no longer including items that are directly instances of work of art. . This means that there’s one “instance of” and then any number of “subclass of” statements between the item and the class. ?item wdt:P31/wdt:P279 ?classThe solution: , which is only an instance of “film”, not of “work of art”. “film” is a subclass of “work of art”, but we need to tell SPARQL to take that into account when searching. Gone with the WindAs I’m writing this (October 2016), that query only returns 2,815 results – obviously, there are more works of art than that! The problem is that this misses items like subclass of “work of art”. (For exercise, try writing that query!) But that still has problems: some is an instance of Gone with the Wind syntax we talked about: []One possible solution to this is the is an animated film, which is a film, which is a work of art. In this case, we need to follow two “subclass of” statements – but it might also be three, four, five, any number really.Snow White and the Seven Dwarfs subclass of “work of art” – for example, otherWe’re still missing items that are instances of some subclass of some We’re no longer including items that are directly instances of work of art. . This means that there’s one “instance of” and then any number of “subclass of” statements between the item and the class. ?item wdt:P31/wdt:P279 ?classThe solution: , which is only an instance of “film”, not of “work of art”. “film” is a subclass of “work of art”, but we need to tell SPARQL to take that into account when searching. Gone with the WindAs I’m writing this (October 2016), that query only returns 2,815 results – obviously, there are more works of art than that! The problem is that this misses items like subclass of “work of art”. (For exercise, try writing that query!) But that still has problems: some is an instance of Gone with the Wind syntax we talked about: []One possible solution to this is the is an animated film, which is a film, which is a work of art. In this case, we need to follow two “subclass of” statements – but it might also be three, four, five, any number really.Snow White and the Seven Dwarfs subclass of “work of art” – for example, otherWe’re still missing items that are instances of some subclass of some We’re no longer including items that are directly instances of work of art. . This means that there’s one “instance of” and then any number of “subclass of” statements between the item and the class. ?item wdt:P31/wdt:P279* ?classThe solution:
Use at
- https://query.wikidata.org/sparql
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#>
SELECT ?work ?workLabel
WHERE
{
?work wdt:P31/wdt:P279* wd:Q838948. # instance of any subclass of work of art
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
Query found at
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial/da
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial/en
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial/en-gb
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial/hy
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial/lb
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial/pl
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial/ru
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial/sv
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial/szl
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial/tr
- https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial/uk