query-a030ad80338bef8d96a490a6b90bf39c

rq turtle/ttl

Find all periodicals older than a certain ageI've made a query to get all the periodicals and their websites that meet a certain criteria (age in this case):

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?periodical ?periodicalLabel ?periodicalTypeLabel ?inception ?website WHERE {
  VALUES ?periodicalType {
    wd:Q11032    # newspaper
    wd:Q1110794  # daily newspaper
    wd:Q2305295  # weekly newspaper
    wd:Q41298    # magazine
  }.
  ?periodical wdt:P31 ?periodicalType.
  ?periodical wdt:P571 ?inception.
  ?periodical wdt:P856 ?website.
  FILTER (YEAR(?inception) < 1920).
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?inception"):::projected v3("?periodical"):::projected v2("?periodicalType") v4("?website"):::projected c6(["bd:serviceParam"]):::iri c8(["en"]):::literal f0[["year-from-dateTime(?inception) < '1920^^xsd:integer'"]] f0 --> v1 bind1[/VALUES ?periodicalType/] bind1-->v2 bind10(["wd:Q11032"]) bind10 --> bind1 bind11(["wd:Q1110794"]) bind11 --> bind1 bind12(["wd:Q2305295"]) bind12 --> bind1 bind13(["wd:Q41298"]) bind13 --> bind1 v3 --"wdt:P31"--> v2 v3 --"wdt:P571"--> v1 v3 --"wdt:P856"--> v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end