Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change SPARQL for control graph with path queries instead of graph queries #8

Open
fnielsen opened this issue Oct 30, 2019 · 0 comments

Comments

@fnielsen
Copy link
Owner

This query uses more properties.

#defaultView:Graph
PREFIX gas: <http://www.bigdata.com/rdf/gas#>

SELECT ?from ?from_image ?fromLabel ?to ?to_image ?toLabel
WITH {
  SELECT DISTINCT ?from ?to {
    { wd:Q66619204 (wdt:P1830 | ^wdt:P127 | ^wdt:P1037 | ^wdt:P169 | ^wdt:P3320 )* ?to . }
    UNION 
    { ?from (wdt:P1830 | ^wdt:P127 | ^wdt:P1037 | ^wdt:P169 | ^wdt:P3320 )* wd:Q66619204 . }
    ?from (wdt:P1830 | ^wdt:P127 | ^wdt:P1037 | ^wdt:P169 | ^wdt:P3320 ) ?to
  }
} AS %result 
WHERE {
  INCLUDE %result  
  OPTIONAL { ?from wdt:P18 ?from_image . }
  OPTIONAL { ?to wdt:P18 ?to_image . }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en" .  } 
}    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant