← every query · class 09 · queries/ask-discontinued-product-without-replacement.rq

ASK · Is there a discontinued product nothing replaces?

The same answer in both regimes: this query asks only for what was written.

false
ASK

The query

# ASK: check a condition without retrieving data. The answer is true or false.
# "Is there a discontinued product that nothing replaces?"
PREFIX onto: <https://data.csoares.me/onto#>

ASK {
  ?d a onto:DiscontinuedProduct .
  # keep ?d only if there is NO ?s with "?s onto:replaces ?d"
  FILTER NOT EXISTS { ?s onto:replaces ?d }
}

Edit it in the query box →