query-82dcb1a2fa016f7243db6008ec069e69

rq turtle/ttl

I'm not sure about completeness of "?periodicalType". The NY Times is listed as a "daily newspaper", Time is an instance of three types. How do I get all the newspapers and magazines regardless of their publishing cycle? 14:43, 24 May 2020 (UTC)) talk (AntonTarasenko

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
{
  ?periodical wdt:P31/wdt:P279* wd:Q1002697 .
  ?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 v2("?periodical"):::projected v3("?periodicalType") v4("?website"):::projected a1((" ")) c4(["wd:Q1002697"]):::iri c8(["bd:serviceParam"]):::iri c10(["en"]):::literal f0[["year-from-dateTime(?inception) < '1920^^xsd:integer'"]] f0 --> v1 v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c4 v2 --"wdt:P31"--> v3 v2 --"wdt:P571"--> v1 v2 --"wdt:P856"--> v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end