# Query Name : query4.1
# Query Type: 4, Historical single-version structured query
# Query Description :
# Retrieve the 10 most recent creative works, that are about or mention different topics of a specific past version.
# Query Answering Choke Points :
# - join ordering based on cardinality of functional property cwork:dateCreated
# Optimizer should use an efficient cost evaluation method for choosing the optimal join tree
# - OPTIONAL clauses (treated by query optimizer as nested sub-queries)
# Optimizer should decide to put optional triples on top of the join tree
# (i.e. delay their execution to the last possible moment) because OPTIONALs are treated as a left join
# - Reasoning: rdfs:subClassOf, rdf:type
PREFIX cwork:
SELECT ?creativeWork
FROM
WHERE {
?creativeWork cwork:mentions .
?creativeWork a cwork:CreativeWork ;
cwork:dateCreated ?dateCreated ;
cwork:description ?description ;
cwork:primaryFormat ?primaryFormat ;
cwork:title ?title .
OPTIONAL { ?creativeWork cwork:shortTitle ?shortTitle . }
OPTIONAL { ?creativeWork cwork:mentions ?mentions . }
OPTIONAL { ?creativeWork cwork:altText ?altText . }
}
ORDER BY DESC(?dateCreated)
LIMIT 10