Skip to content

LATERAL queries #31

Description

@Salva5297

LATERAL SPARQL queries can be done with SPARQL Anything in Java, but these types of queries cannot be executed properly using pysparql-anything.

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX fx:   <http://sparql.xyz/facade-x/ns/>
PREFIX xyz:  <http://sparql.xyz/facade-x/data/>

SELECT ?entity ?series
WHERE {
    SERVICE <x-sparql-anything:https://sparql-anything.cc/example1.json> {
        ?tvSeries xyz:name ?seriesName .
        ?tvSeries xyz:stars ?star .
        ?star fx:anySlot "Courteney Cox" .
    }
    
    BIND (STRLANG(?seriesName,"en") AS ?series)
    
    LATERAL {
        SERVICE <https://query.wikidata.org/sparql> {
          ?entity rdfs:label ?series
        }
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions