SQUALL to SPARQL Translator

Your SQUALL sentence:

Does the TelevisionShow that is a dbp:tv of res:Battlestar_Galactica and with the latest releaseDate have a greater numberOfEpisodes than the TelevisionShow that is a dbp:tv of res:Battlestar_Galactica and with the earliest releaseDate?

The SPARQL translation:

ASK {
{
SELECT DISTINCT ?x6 WHERE {
?x1 a :TelevisionShow .
res:Battlestar_Galactica dbp:tv ?x1 .
?x1 :releaseDate ?x6 .
} ORDER BY DESC(?x6) LIMIT 1} { SELECT DISTINCT ?x5 WHERE { ?x2 a :TelevisionShow .
res:Battlestar_Galactica dbp:tv ?x2 .
?x2 :releaseDate ?x5 .
} ORDER BY ASC(?x5) LIMIT 1
} FILTER (?x1 != ?x2) .
?x1 :numberOfEpisodes ?x3 .
?x2 :numberOfEpisodes ?x4 .
FILTER (?x3 > ?x4) .
}

Run at DBpedia SPARQL endpoint (assuming prefixes res: for resources, : and dbo: for ontology, and dbp: for properties in addition to DBpedia namespace definitions).

Load in DBpedia SPARQL Explorer (assuming the same prefixes as above).


Enter a SQUALL sentence: