query-6bfd40cc97343df9af22ea0cc7912949

rq turtle/ttl

title: Works not tagged as being within scope of the WikiProject but citing AND cited from works that are PREFIX target: http://www.wikidata.org/entity/Q56241615

SELECT DISTINCT ?cited_work ?title ?count (REPLACE(STR(?cited_work), ".Q", "Q") AS ?qid) ("P6104" AS ?property) (REPLACE(STR(target:), ".Q", "Q") AS ?target) ("S887" AS ?heuristic) ("Q69652283" AS ?deduced)

WITH { SELECT (count(?work) as ?count) ?cited_work WHERE { ?work wdt:P6104 target: . ?work wdt:P2860 ?cited_work . } GROUP BY ?cited_work ORDER BY DESC(?count) LIMIT 20000 } AS %result WHERE { INCLUDE %result FILTER (?count > 20) FILTER NOT EXISTS {?cited_work wdt:P6104 target: } ?cited_work wdt:P1476 ?title . ?cited_work wdt:P2860 [wdt:P6104 wd:Q56241615 ] . SERVICE wikibase:label { bd:serviceParam wikibase:language "en,da,de,es,fr,jp,nl,no,ru,sv,zh" . } } ORDER BY DESC(?count) LIMIT 200

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#>
#title: Works not tagged as being within scope of the WikiProject but citing AND cited from works that are
PREFIX target: <http://www.wikidata.org/entity/Q56241615>

SELECT DISTINCT
  ?cited_work ?title ?count
  (REPLACE(STR(?cited_work), ".*Q", "Q") AS ?qid) 
  ("P6104" AS ?property)
  (REPLACE(STR(target:), ".*Q", "Q") AS ?target) 
  ("S887" AS ?heuristic)
  ("Q69652283" AS ?deduced)

WHERE {
   {
  SELECT (count(?work) as ?count) ?cited_work WHERE {
    ?work wdt:P6104 target: .
    ?work wdt:P2860 ?cited_work .
  }
  GROUP BY ?cited_work
  ORDER BY DESC(?count)
  LIMIT 20000
}  FILTER (?count > 20)
  FILTER NOT EXISTS {?cited_work wdt:P6104 target: }
  ?cited_work wdt:P1476 ?title .
  ?cited_work wdt:P2860 [wdt:P6104 wd:Q56241615 ] .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,da,de,es,fr,jp,nl,no,ru,sv,zh" . } 
}
ORDER BY DESC(?count)
LIMIT 200

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?cited_work"):::projected v4("?count"):::projected v9("?deduced") v8("?heuristic") v6("?property") v5("?qid") v7("?target") v4("?title"):::projected v3("?work") a1((" ")) c9(["en,da,de,es,fr,jp,nl,no,ru,sv,zh"]):::literal c7(["bd:serviceParam"]):::iri c2(["wd:Q56241615"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P6104"--> e0c2 e0v1("?cited_work"):::projected e0c2(["wd:Q56241615"]):::iri end f0--EXISTS--> f0e0 f0 --> v2 f0 --> c1 f0 --> c2 v2 --"wdt:P6104"--> c2 f1[["?count > '20^^xsd:integer'"]] f1 --> v4 v3 --"wdt:P6104"--> c2 v3 --"wdt:P2860"--> v2 bind3[/"count(?work)"/] v3 --o bind3 bind3 --as--o v4 v2 --"wdt:P1476"--> v4 a1 --"wdt:P6104"--> c2 v2 --"wdt:P2860"--> a1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end bind4[/"replace(str(?cited_work),'.*Q','Q')"/] v2 --o bind4 bind4 --as--o v5 bind5[/"'P6104'"/] bind5 --as--o v6 bind6[/"replace(str('wd:Q56241615'),'.*Q','Q')"/] bind6 --as--o v7 bind7[/"'S887'"/] bind7 --as--o v8 bind8[/"'Q69652283'"/] bind8 --as--o v9