This query returns the answered FAQ entries (questions and answers) of an entity, including source nanopub and date. Entries currently typed as gen:UnansweredQuestion (placeholder stubs) are excluded. When several nanopubs declare the same FAQ entry, only the most recent one is returned.
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix dct: <http://purl.org/dc/terms/> prefix np: <http://www.nanopub.org/nschema#> prefix npa: <http://purl.org/nanopub/admin/> prefix npx: <http://purl.org/nanopub/x/> prefix schema: <http://schema.org/> prefix gen: <https://w3id.org/kpxl/gen/terms/> select ?title ?content ?date ?faq ?np where { graph npa:graph { ?np npa:hasValidSignatureForPublicKeyHash ?pubkey . filter not exists { ?npx npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?pubkey . } ?np dct:created ?date . ?np np:hasAssertion ?a . } graph ?a { ?faq rdf:type schema:Question . ?faq rdfs:label ?title . ?faq gen:hasContent ?content . values ?_resource_multi_iri {} ?faq dct:isPartOf ?_resource_multi_iri . filter not exists { ?faq rdf:type gen:UnansweredQuestion } optional { ?faq gen:hasPositionString ?position } } filter not exists { graph npa:graph { ?np2 npa:hasValidSignatureForPublicKeyHash ?pubkey2 . filter not exists { ?npx2 npx:invalidates ?np2 ; npa:hasValidSignatureForPublicKeyHash ?pubkey2 . } ?np2 dct:created ?date2 . ?np2 np:hasAssertion ?a2 . filter (?date2 > ?date) } graph ?a2 { ?faq rdf:type schema:Question . } } } order by ?position ?title