All ontologies sorted by creation date including contact name and number of terms only if these exist according to the ontology'name introduced (OPTIONAL clause).

Database: 
Statement: 

All ontologies sorted by creation date including contact name and number of terms only if these exist (OPTIONAL clause) according to the ontology's name introduced $name$ (e.g., Pathway ) A limit of results per page $number$ (e.g. 10)

Query: 
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX meta: <http://bioportal.bioontology.org/metadata/def/> PREFIX omv: <http://omv.ontoware.org/2005/05/ontology#> SELECT ?ont ?name ?acr ?creationDate ?contactName ?terms WHERE { ?ont a omv:Ontology; omv:acronym ?acr; omv:name ?name; meta:timestampCreation ?creationDate . OPTIONAL { ?ont meta:hasContactName ?contactName . } OPTIONAL { ?ont omv:numberOfClasses ?terms . } FILTER regex (?name, "??name") } ORDER BY DESC(xsd:dateTime(?creationDate)) limit ??number