User:Kghbln/queries: Difference between revisions
Jump to navigation
Jump to search
(form) |
|||
Line 18: | Line 18: | ||
; query code | ; query code | ||
<syntaxhighlight lang=sparql> | <syntaxhighlight lang=sparql> | ||
SELECT ?item ?itemLabel ? | PREFIX wdt: <https://wikibase.world/prop/direct/> | ||
PREFIX wd: <https://wikibase.world/entity/> | |||
SELECT ?item ?itemLabel ?url | |||
WHERE { | WHERE { | ||
?item wdt: | ?item wdt:P2 wd:Q5. | ||
?item wdt: | ?item wdt:P1 ?url . | ||
?item wdt: | ?item wdt:P13 wd:Q54. | ||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | ||
} | } |
Revision as of 12:37, 13 September 2023
Wikibase instances that are hosted independently
- query code
PREFIX wdt: <https://wikibase.world/prop/direct/>
PREFIX wd: <https://wikibase.world/entity/>
SELECT ?item ?itemLabel ?url
WHERE {
?item wdt:P2 wd:Q5.
?item wdt:P1 ?url .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
- query result
tinyurl.com - short URL / wikibase.world/query/ - long URL
Wikibase instances that are hosted independently which are online
- query code
PREFIX wdt: <https://wikibase.world/prop/direct/>
PREFIX wd: <https://wikibase.world/entity/>
SELECT ?item ?itemLabel ?url
WHERE {
?item wdt:P2 wd:Q5.
?item wdt:P1 ?url .
?item wdt:P13 wd:Q54.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
- query result
tinyurl.com - short URL / wikibase.world/query/ - long URL
Wikibase instances that are hosted independently which are online explicitly showing the status
- query code
PREFIX wdt: <https://wikibase.world/prop/direct/>
PREFIX wd: <https://wikibase.world/entity/>
SELECT ?item ?itemLabel ?url ?online
WHERE {
?item wdt:P2 wd:Q5.
?item wdt:P1 ?url .
?item wdt:P13 ?online.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
- query result