Almeda:Sparql examples: Difference between revisions
add one sparql Tag: 2017 source edit |
No edit summary Tag: 2017 source edit |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
==== This page contains sparql examples for ALMEDA. ==== | ==== This page contains sparql examples for ALMEDA. ==== | ||
# Query the latest successful update by Updater. | |||
<syntaxhighlight lang="sparql"> | <syntaxhighlight lang="sparql"> | ||
PREFIX almeda: <https://wikibase.almeda.engelska.uu.se/entity/> | PREFIX almeda: <https://wikibase.almeda.engelska.uu.se/entity/> | ||
PREFIX almedat: <https://wikibase.almeda.engelska.uu.se/prop/direct/> | |||
PREFIX schema: <http://schema.org/> | PREFIX schema: <http://schema.org/> | ||
| Line 12: | Line 11: | ||
<https://wikibase.almeda.engelska.uu.se> schema:dateModified ?dateLast . | <https://wikibase.almeda.engelska.uu.se> schema:dateModified ?dateLast . | ||
} | } | ||
} | </syntaxhighlight> | ||
} | |||
< | [https://wdqs-frontend.almeda.engelska.uu.se/#prefix%20schema%3A%20%3Chttp%3A%2F%2Fschema.org%2F%3E%0A%0ASELECT%20%3FdateModified%20WHERE%20%7B%0A%20%20%3Chttps%3A%2F%2Fwikibase.almeda.engelska.uu.se%3E%20schema%3AdateModified%20%3FdateModified%20.%0A%7D Try it] | ||
# Query the subclass structure of almeda work or form of creative work (Q17719), or the class hierarchy (Q27753). | |||
<syntaxhighlight lang="sparql"> | |||
prefix almedat: <https://wikibase.almeda.engelska.uu.se/prop/direct/> | |||
prefix almeda: <https://wikibase.almeda.engelska.uu.se/entity/> | |||
#the subclass of almeda work, | |||
#since * means zero or further paths, the subsubclass Label shows the same label as | |||
#the subclass Label means the path is 0 and the subclass has no further subclasses. | |||
select ?rootLabel ?subclass ?subclassLabel ?subsubclass ?subsubclassLabel where { | |||
bind (almeda:Q27709 as ?root) | |||
?subclass almedat:P26 ?root. | |||
?subsubclass almedat:P26* ?subclass. | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } | |||
} | |||
order by ?subclassLabel ?subsubclassLabel | |||
</syntaxhighlight> | |||
[https://wdqs-frontend.almeda.engelska.uu.se/#prefix%20almedat%3A%20%3Chttps%3A%2F%2Fwikibase.almeda.engelska.uu.se%2Fprop%2Fdirect%2F%3E%0Aprefix%20almeda%3A%20%3Chttps%3A%2F%2Fwikibase.almeda.engelska.uu.se%2Fentity%2F%3E%0Aprefix%20schema%3A%20%3Chttp%3A%2F%2Fschema.org%2F%3E%0A%0A%23The%20subclasses%20of%20almeda%20work%2C%20%0A%23since%20%2a%20means%20zero%20or%20further%20paths%2C%20the%20subsubclassLabel%20shows%20the%20same%20label%20as%0A%23the%20subclassLabel%2C%20which%20means%20the%20path%20is%200%3B%20and%20the%20subclass%20has%20no%20further%20subclasses.%0Aselect%20%3FrootLabel%20%3Fsubclass%20%3FsubclassLabel%20%3Fsubsubclass%20%3FsubsubclassLabel%20where%20%7B%0A%20%20bind%20%28almeda%3AQ27709%20as%20%3Froot%29%0A%20%20%3Fsubclass%20almedat%3AP26%20%3Froot.%0A%20%20%3Fsubsubclass%20almedat%3AP26%2a%20%3Fsubclass.%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%0A%20%20%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20%7D%0A%20%20%7D%0Aorder%20by%20%3FsubclassLabel%20%3FsubsubclassLabel Try it] | |||
Latest revision as of 12:03, 1 September 2026
This page contains sparql examples for ALMEDA.
- Query the latest successful update by Updater.
PREFIX almeda: <https://wikibase.almeda.engelska.uu.se/entity/>
PREFIX almedat: <https://wikibase.almeda.engelska.uu.se/prop/direct/>
PREFIX schema: <http://schema.org/>
SELECT ?dateLast WHERE {
<https://wikibase.almeda.engelska.uu.se> schema:dateModified ?dateLast .
}
- Query the subclass structure of almeda work or form of creative work (Q17719), or the class hierarchy (Q27753).
prefix almedat: <https://wikibase.almeda.engelska.uu.se/prop/direct/>
prefix almeda: <https://wikibase.almeda.engelska.uu.se/entity/>
#the subclass of almeda work,
#since * means zero or further paths, the subsubclass Label shows the same label as
#the subclass Label means the path is 0 and the subclass has no further subclasses.
select ?rootLabel ?subclass ?subclassLabel ?subsubclass ?subsubclassLabel where {
bind (almeda:Q27709 as ?root)
?subclass almedat:P26 ?root.
?subsubclass almedat:P26* ?subclass.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
order by ?subclassLabel ?subsubclassLabel