query-c84ed6ce88b7c4dc34c75798fe7160d3

rq turtle/ttl

added before 2016-10

SELECT DISTINCT ?date_range ?date_update (count(?gene) as ?counts) (GROUP_CONCAT(?gene ;separator = "; ") as ?genes) (GROUP_CONCAT(?ncbi_gene ;separator = "; ") as ?gene_ids) WHERE { ?gene p:P351 ?ncbigene ; wdt:P351 ?ncbi_gene . ?ncbigene prov:wasDerivedFrom ?derivedFrom . ?derivedFrom pr:P813 ?date_update . BIND (now() - ?date_update as ?date_range) FILTER (?date_range > 31) } GROUP BY ?date_range ?date_update ORDER BY DESC(?counts) added before 2016-10

SELECT DISTINCT ?date_range ?date_update (count(?gene) as ?counts) (GROUP_CONCAT(?gene ;separator = "; ") as ?genes) (GROUP_CONCAT(?ncbi_gene ;separator = "; ") as ?gene_ids) WHERE { ?gene p:P351 ?ncbigene ; wdt:P351 ?ncbi_gene . ?ncbigene prov:wasDerivedFrom ?derivedFrom . ?derivedFrom pr:P813 ?date_update . BIND (now() - ?date_update as ?date_range) FILTER (?date_range > 31) } GROUP BY ?date_range ?date_update ORDER BY DESC(?counts) added before 2016-10

SELECT DISTINCT ?date_range ?date_update (count(?gene) as ?counts) (GROUP_CONCAT(?gene ;separator = "; ") as ?genes) (GROUP_CONCAT(?ncbi_gene ;separator = "; ") as ?gene_ids) WHERE { ?gene p:P351 ?ncbigene ; wdt:P351 ?ncbi_gene . ?ncbigene prov:wasDerivedFrom ?derivedFrom . ?derivedFrom pr:P813 ?date_update . BIND (now() - ?date_update as ?date_range) FILTER (?date_range > 31) } GROUP BY ?date_range ?date_update ORDER BY DESC(?counts) added before 2016-10

SELECT DISTINCT ?date_range ?date_update (count(?gene) as ?counts) (GROUP_CONCAT(?gene ;separator = "; ") as ?genes) (GROUP_CONCAT(?ncbi_gene ;separator = "; ") as ?gene_ids) WHERE { ?gene p:P351 ?ncbigene ; wdt:P351 ?ncbi_gene . ?ncbigene prov:wasDerivedFrom ?derivedFrom . ?derivedFrom pr:P813 ?date_update . BIND (now() - ?date_update as ?date_range) FILTER (?date_range > 31) } GROUP BY ?date_range ?date_update ORDER BY DESC(?counts) added before 2016-10

SELECT DISTINCT ?date_range ?date_update (count(?gene) as ?counts) (GROUP_CONCAT(?gene ;separator = "; ") as ?genes) (GROUP_CONCAT(?ncbi_gene ;separator = "; ") as ?gene_ids) WHERE { ?gene p:P351 ?ncbigene ; wdt:P351 ?ncbi_gene . ?ncbigene prov:wasDerivedFrom ?derivedFrom . ?derivedFrom pr:P813 ?date_update . BIND (now() - ?date_update as ?date_range) FILTER (?date_range > 31) } GROUP BY ?date_range ?date_update ORDER BY DESC(?counts) added before 2016-10

SELECT DISTINCT ?date_range ?date_update (count(?gene) as ?counts) (GROUP_CONCAT(?gene ;separator = "; ") as ?genes) (GROUP_CONCAT(?ncbi_gene ;separator = "; ") as ?gene_ids) WHERE { ?gene p:P351 ?ncbigene ; wdt:P351 ?ncbi_gene . ?ncbigene prov:wasDerivedFrom ?derivedFrom . ?derivedFrom pr:P813 ?date_update . BIND (now() - ?date_update as ?date_range) FILTER (?date_range > 31) } GROUP BY ?date_range ?date_update ORDER BY DESC(?counts) added before 2016-10

SELECT DISTINCT ?date_range ?date_update (count(?gene) as ?counts) (GROUP_CONCAT(?gene ;separator = "; ") as ?genes) (GROUP_CONCAT(?ncbi_gene ;separator = "; ") as ?gene_ids) WHERE { ?gene p:P351 ?ncbigene ; wdt:P351 ?ncbi_gene . ?ncbigene prov:wasDerivedFrom ?derivedFrom . ?derivedFrom pr:P813 ?date_update . BIND (now() - ?date_update as ?date_range) FILTER (?date_range > 31) } GROUP BY ?date_range ?date_update ORDER BY DESC(?counts) added before 2016-10

SELECT DISTINCT ?date_range ?date_update (count(?gene) as ?counts) (GROUP_CONCAT(?gene ;separator = "; ") as ?genes) (GROUP_CONCAT(?ncbi_gene ;separator = "; ") as ?gene_ids) WHERE { ?gene p:P351 ?ncbigene ; wdt:P351 ?ncbi_gene . ?ncbigene prov:wasDerivedFrom ?derivedFrom . ?derivedFrom pr:P813 ?date_update . BIND (now() - ?date_update as ?date_range) FILTER (?date_range > 31) } GROUP BY ?date_range ?date_update ORDER BY DESC(?counts) added before 2016-10

SELECT DISTINCT ?date_range ?date_update (count(?gene) as ?counts) (GROUP_CONCAT(?gene ;separator = "; ") as ?genes) (GROUP_CONCAT(?ncbi_gene ;separator = "; ") as ?gene_ids) WHERE { ?gene p:P351 ?ncbigene ; wdt:P351 ?ncbi_gene . ?ncbigene prov:wasDerivedFrom ?derivedFrom . ?derivedFrom pr:P813 ?date_update . BIND (now() - ?date_update as ?date_range) FILTER (?date_range > 31) } GROUP BY ?date_range ?date_update ORDER BY DESC(?counts) added before 2016-10

SELECT DISTINCT ?date_range ?date_update (count(?gene) as ?counts) (GROUP_CONCAT(?gene ;separator = "; ") as ?genes) (GROUP_CONCAT(?ncbi_gene ;separator = "; ") as ?gene_ids) WHERE { ?gene p:P351 ?ncbigene ; wdt:P351 ?ncbi_gene . ?ncbigene prov:wasDerivedFrom ?derivedFrom . ?derivedFrom pr:P813 ?date_update . BIND (now() - ?date_update as ?date_range) FILTER (?date_range > 31) } GROUP BY ?date_range ?date_update ORDER BY DESC(?counts)

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
#added before 2016-10

SELECT DISTINCT ?date_range ?date_update (count(?gene) as ?counts) (GROUP_CONCAT(?gene ;separator = "; ") as ?genes)  (GROUP_CONCAT(?ncbi_gene ;separator = "; ") as ?gene_ids) WHERE {
  ?gene p:P351 ?ncbigene ;
           wdt:P351 ?ncbi_gene .
  ?ncbigene prov:wasDerivedFrom ?derivedFrom  .
  ?derivedFrom pr:P813 ?date_update .
  BIND (now() - ?date_update as ?date_range)
  FILTER (?date_range > 31)
  }
GROUP BY ?date_range ?date_update
ORDER BY DESC(?counts)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?counts") v8("?date_range"):::projected v7("?date_update"):::projected v6("?derivedFrom") v3("?gene"):::projected v9("?gene_ids") v8("?genes") v5("?ncbi_gene"):::projected v4("?ncbigene") f0[["?date_range > '31^^xsd:integer'"]] f0 --> v8 v3 --"p:P351"--> v4 v3 --"p:direct/P351"--> v5 v4 --"prov:wasDerivedFrom"--> v6 v6 --"p:reference/P813"--> v7 bind1[/"NOW() - ?date_update"/] v7 --o bind1 bind1 --as--o v8 bind5[/"count(?gene)"/] v3 --o bind5 bind5 --as--o v8 bind6[/"?gene"/] v3 --o bind6 bind6 --as--o v8 bind7[/"?ncbi_gene"/] v5 --o bind7 bind7 --as--o v9