I would like to filter post codes to show only the current active for today.
Problem is there are are cities with old post codes (Example).
My current query shows the old post codes:
SELECT ?city ?cityLabel ?postcode ?federal_stateLabel…
I am wondering why the following SPARQL query with a named subquery is slow on Blazegraph instance Wikidata Query Service. Taking out the subquery and executing that alone completes in around a second on the Wikidata Query Service, while the one…
My aim is to query wikidata using R. I just realized that Wikidata Query Service offers code examples in order to so:
Go to https://w.wiki/AkK
Execute query
Click on > Code next to the Download button
Select R. This gives the following…
In Wikidata (https://query.wikidata.org/), I tried the following simple SPARQL federated query with SERVICE.
I got the results back, but they do not seem to be what I expected. It seems that ?geonamesid (i.e. reference to the entity "London") is not…
I would like to access child properties of wikidata entities. An example may be property P1033, which is a child of P4952, for an entity such as Q49546. How can I do this dynamically in a SPARQL query?
Using the query builder provided by the online…
I am using the following query against wikidata;
SELECT ?country ?countryLabel
WHERE
{
?country wdt:P30 wd:Q46;
wdt:P31 wd:Q6256.
SERVICE wikibase:label { bd:serviceParam wikibase:language
…
How do I query wikidata for a list of scientists that died in a prime-numbered year, and also were born in a prime-numbered year, using SPARQL? Here is what I have so far, which returns no results, and I'm assuming that's because people don't die in…
I am trying to extract a subgraph from a large dataset (namely Wikidata, through their Query Service ). I have found pairs of nodes that are of my interest (uses a certain property) and now I would like to CONSTRUCT a new graph, that would contain…
Wikidata provides a tool for query building.
https://query.wikidata.org/
But I cannot find any shortcut in the editor to comment/uncomment in bulk (that is, comment/uncomment multiple lines at the same time).
Consider this SPARQL where datetime is a date in 36 BC:
SELECT ?date ?year WHERE {
wd:Q1180731 wdt:P577 ?datetime .
BIND(xsd:date(?datetime) AS ?date)
# BIND(YEAR(?datetime) AS ?year)
}
The xsd:date(?datetime) function fails on the Wikidata…
I am new to the Wikidata Query Service.
I want to find all the installed capacity of power stations.
I tried the following: Wikidata Query
SELECT ?power_station ?power_stationLabel ?installed_capacity WHERE {
SERVICE wikibase:label {…
How do I get unit type and date precision in the Wikidata Query service (https://query.wikidata.org) with SPARQL?
Below is example query looking at dimensions and inception of tapestries.
SELECT ?item ?itemLabel ?height ?width ?inception
WHERE
{
…
I have a query where I count with a grouping on years. For some of the years there is no items to count and thus no result. I would like to have SPARQL return a count of zero for such years.
I am using the Wikidata Query Service,…
I'm trying to retrieve entities as well as their properties that relate to Golden Gate Bridge. I used this query (https://query.wikidata.org/#SELECT%20%3Fp2%20%3Fs%0AWHERE%0A%7B%0A%20%20%09%3Fs%20%3Fp2%20wd%3AQ44440%20.%0A%7D):
SELECT ?p2…
I am trying to understand how to do filtering in SPARQL with combined AND and OR conditions.
I try to find all physicists living within Newton's lifetime via the Wikidata Query Service (query.wikidata.org). This is my query:
SELECT ?p1 ?p1Label…