User:Kghbln/queries: Difference between revisions

From Wikibase World
Jump to navigation Jump to search
(add)
(form)
Line 1: Line 1:
; Wikibase instances that are hosted independently
== Wikibase instances that are hosted independently ==
; query code
<syntaxhighlight lang=sparql>
<syntaxhighlight lang=sparql>
PREFIX wdt: <https://wikibase.world/prop/direct/>
PREFIX wdt: <https://wikibase.world/prop/direct/>
Line 11: Line 12:
}
}
</syntaxhighlight>
</syntaxhighlight>
; query result
[https://tinyurl.com/yn4la8dc tinyurl.com - short URL] / [https://wikibase.world/query/#PREFIX%20wdt%3A%20%3Chttps%3A%2F%2Fwikibase.world%2Fprop%2Fdirect%2F%3E%0APREFIX%20wd%3A%20%3Chttps%3A%2F%2Fwikibase.world%2Fentity%2F%3E%0A%0ASELECT%20%3Fitem%20%3FitemLabel%20%3Furl%0AWHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP2%20wd%3AQ5.%0A%20%20%20%20%3Fitem%20wdt%3AP1%20%3Furl%20.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D%0A wikibase.world/query/ - long URL]
[https://tinyurl.com/yn4la8dc tinyurl.com - short URL] / [https://wikibase.world/query/#PREFIX%20wdt%3A%20%3Chttps%3A%2F%2Fwikibase.world%2Fprop%2Fdirect%2F%3E%0APREFIX%20wd%3A%20%3Chttps%3A%2F%2Fwikibase.world%2Fentity%2F%3E%0A%0ASELECT%20%3Fitem%20%3FitemLabel%20%3Furl%0AWHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP2%20wd%3AQ5.%0A%20%20%20%20%3Fitem%20wdt%3AP1%20%3Furl%20.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D%0A wikibase.world/query/ - long URL]


; Wikibase instances that are hosted independently which are online
== Wikibase instances that are hosted independently which are online ==
; query code
<syntaxhighlight lang=sparql>
<syntaxhighlight lang=sparql>
SELECT ?item ?itemLabel ?website  
SELECT ?item ?itemLabel ?website  
Line 23: Line 26:
}
}
</syntaxhighlight>
</syntaxhighlight>
; query result
[https://tinyurl.com/yq35f7jg tinyurl.com - short URL] / [https://wikibase.world/query/#PREFIX%20wdt%3A%20%3Chttps%3A%2F%2Fwikibase.world%2Fprop%2Fdirect%2F%3E%0APREFIX%20wd%3A%20%3Chttps%3A%2F%2Fwikibase.world%2Fentity%2F%3E%0A%0ASELECT%20%3Fitem%20%3FitemLabel%20%3Furl%0AWHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP2%20wd%3AQ5.%0A%20%20%3Fitem%20wdt%3AP1%20%3Furl%20.%0A%20%20%3Fitem%20wdt%3AP13%20wd%3AQ54.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D%0A%0A wikibase.world/query/ - long URL]
[https://tinyurl.com/yq35f7jg tinyurl.com - short URL] / [https://wikibase.world/query/#PREFIX%20wdt%3A%20%3Chttps%3A%2F%2Fwikibase.world%2Fprop%2Fdirect%2F%3E%0APREFIX%20wd%3A%20%3Chttps%3A%2F%2Fwikibase.world%2Fentity%2F%3E%0A%0ASELECT%20%3Fitem%20%3FitemLabel%20%3Furl%0AWHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP2%20wd%3AQ5.%0A%20%20%3Fitem%20wdt%3AP1%20%3Furl%20.%0A%20%20%3Fitem%20wdt%3AP13%20wd%3AQ54.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D%0A%0A wikibase.world/query/ - long URL]


; Wikibase instances that are hosted independently which are online explicitly showing the status
== Wikibase instances that are hosted independently which are online explicitly showing the status ==
; query code
<syntaxhighlight lang=sparql>
<syntaxhighlight lang=sparql>
PREFIX wdt: <https://wikibase.world/prop/direct/>
PREFIX wdt: <https://wikibase.world/prop/direct/>
Line 38: Line 43:
}
}
</syntaxhighlight>
</syntaxhighlight>
; query result
[https://tinyurl.com/yruqcec2 tinyurl.com - short URL] / [https://wikibase.world/query/#PREFIX%20wdt%3A%20%3Chttps%3A%2F%2Fwikibase.world%2Fprop%2Fdirect%2F%3E%0APREFIX%20wd%3A%20%3Chttps%3A%2F%2Fwikibase.world%2Fentity%2F%3E%0A%0ASELECT%20%3Fitem%20%3FitemLabel%20%3Furl%20%3Fonline%0AWHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP2%20wd%3AQ5.%0A%20%20%3Fitem%20wdt%3AP1%20%3Furl%20.%0A%20%20%3Fitem%20wdt%3AP13%20%3Fonline.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D wikibase.world/query/ - long URL]
[https://tinyurl.com/yruqcec2 tinyurl.com - short URL] / [https://wikibase.world/query/#PREFIX%20wdt%3A%20%3Chttps%3A%2F%2Fwikibase.world%2Fprop%2Fdirect%2F%3E%0APREFIX%20wd%3A%20%3Chttps%3A%2F%2Fwikibase.world%2Fentity%2F%3E%0A%0ASELECT%20%3Fitem%20%3FitemLabel%20%3Furl%20%3Fonline%0AWHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP2%20wd%3AQ5.%0A%20%20%3Fitem%20wdt%3AP1%20%3Furl%20.%0A%20%20%3Fitem%20wdt%3AP13%20%3Fonline.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D wikibase.world/query/ - long URL]

Revision as of 12:36, 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
SELECT ?item ?itemLabel ?website 
WHERE {
  ?item wdt:P31 wd:Q47461344.
  ?item wdt:P856 ?website.
  ?item wdt:PXXX 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

tinyurl.com - short URL / wikibase.world/query/ - long URL