query-0bee2ca5816d280a9a8addad4453de21
rq turtle/ttl
As above, batch size one
Demo version showing neglected disease impact on MEDDATE
SELECT DISTINCT ?article ?articleLabel ?journal ?journalLabel ?bound ?medrsyear ?ynow
WHERE {
VALUES ?article
{wd:Q60919743}
?journal wdt:P31 wd:Q5633421;
wdt:P123 ?publisher;
wdt:P1055 [ ].
?publisher wdt:P31/wdt:P279* wd:Q2085381.
?article wdt:P5008 wd:Q55439927;
wdt:P1433 ?journal;
wdt:P577 ?date;
wdt:P31 wd:Q7318358;
wdt:P1476 [ ].
{?journal wdt:P31 wd:Q5953270}
UNION {VALUES ?journal {wd:Q546003 wd:Q2928049 wd:Q5030320 wd:Q5690746 wd:Q6047666
wd:Q26841926 wd:Q1763668 wd:Q2025726 wd:Q15724513 wd:Q2456339
wd:Q27722384 wd:Q27667673}
}
UNION {?journal wdt:P5115 [ ].}
MINUS {
{?article wdt:P31 wd:Q45182324}
UNION
{?article wdt:P5824 [ ]}
UNION
{VALUES ?publisher {wd:Q52636754 wd:Q52635805 wd:Q4689899 wd:Q52620137 wd:Q4732612
wd:Q43080819 wd:Q30270870 wd:Q30297686 wd:Q52661346 wd:Q52636079
wd:Q52557383 wd:Q54958933 wd:Q2896740 wd:Q63254475 wd:Q18712923
wd:Q52609680 wd:Q52609536 wd:Q52636154 wd:Q52609215 wd:Q80796
wd:Q52636535 wd:Q52633727 wd:Q52636944 wd:Q63254434 wd:Q52637577
wd:Q52665969 wd:Q52660711 wd:Q52659576 wd:Q56979398 wd:Q52670242
wd:Q29891111 wd:Q52619294 wd:Q52662151 wd:Q7072722 wd:Q52609375
wd:Q7259709 wd:Q52636843 wd:Q45251004 wd:Q52637573 wd:Q52662489
wd:Q52635330 wd:Q47116994 wd:Q30267116 wd:Q24706265 wd:Q52620720
wd:Q52633876 wd:Q56416796 wd:Q52660351 wd:Q52635690 wd:Q7433770
wd:Q27991304 wd:Q55566796 wd:Q52619286 wd:Q30265175 wd:Q8035326}
}
UNION
{VALUES ?article {wd:Q26746153}
}
}
OPTIONAL {VALUES ?mainsubject {wd:Q949694 wd:Q2447562 wd:Q649558 wd:Q326071 wd:Q203133
wd:Q842428 wd:Q11679861 wd:Q2264130 wd:Q2360849 wd:Q1345113
wd:Q1597571 wd:Q2841329 wd:Q2665559 wd:Q30953 wd:Q738292
wd:Q154874 wd:Q2859732 wd:Q39222 wd:Q326638 wd:Q162272
wd:Q809561 wd:Q18975737 wd:Q1017169 wd:Q12090 wd:Q327298
wd:Q326648 wd:Q18975220 wd:Q36956 wd:Q155098 wd:Q690032
wd:Q193216 wd:Q682798 wd:Q922029 wd:Q41083 wd:Q76973
wd:Q16877704 wd:Q247096 wd:Q167178 wd:Q304601 wd:Q331283
wd:Q1475667 wd:Q388646 wd:Q777087 wd:Q1102300 wd:Q1048084
wd:Q719656 wd:Q2528129 wd:Q1760607 wd:Q192100 wd:Q1137321
wd:Q221159 }
?article wdt:P921 ?mainsubject.}
BIND(xsd:boolean(COALESCE(BOUND(?mainsubject),"false")) AS ?bound)
BIND(year(?date) AS ?ydate)
BIND(year(now()) AS ?ynow)
BIND((IF(?bound,?ydate+8,?ydate+5)) AS ?medrsyear)
FILTER(?medrsyear >= ?ynow)#Remove this filter line to see the medrsyear variable displayed
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".}
}
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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#>
#As above, batch size one
#Demo version showing neglected disease impact on MEDDATE
SELECT DISTINCT ?article ?articleLabel ?journal ?journalLabel ?bound ?medrsyear ?ynow
WHERE {
VALUES ?article
{wd:Q60919743}
?journal wdt:P31 wd:Q5633421;
wdt:P123 ?publisher;
wdt:P1055 [ ].
?publisher wdt:P31/wdt:P279* wd:Q2085381.
?article wdt:P5008 wd:Q55439927;
wdt:P1433 ?journal;
wdt:P577 ?date;
wdt:P31 wd:Q7318358;
wdt:P1476 [ ].
{?journal wdt:P31 wd:Q5953270}
UNION {VALUES ?journal {wd:Q546003 wd:Q2928049 wd:Q5030320 wd:Q5690746 wd:Q6047666
wd:Q26841926 wd:Q1763668 wd:Q2025726 wd:Q15724513 wd:Q2456339
wd:Q27722384 wd:Q27667673}
}
UNION {?journal wdt:P5115 [ ].}
MINUS {
{?article wdt:P31 wd:Q45182324}
UNION
{?article wdt:P5824 [ ]}
UNION
{VALUES ?publisher {wd:Q52636754 wd:Q52635805 wd:Q4689899 wd:Q52620137 wd:Q4732612
wd:Q43080819 wd:Q30270870 wd:Q30297686 wd:Q52661346 wd:Q52636079
wd:Q52557383 wd:Q54958933 wd:Q2896740 wd:Q63254475 wd:Q18712923
wd:Q52609680 wd:Q52609536 wd:Q52636154 wd:Q52609215 wd:Q80796
wd:Q52636535 wd:Q52633727 wd:Q52636944 wd:Q63254434 wd:Q52637577
wd:Q52665969 wd:Q52660711 wd:Q52659576 wd:Q56979398 wd:Q52670242
wd:Q29891111 wd:Q52619294 wd:Q52662151 wd:Q7072722 wd:Q52609375
wd:Q7259709 wd:Q52636843 wd:Q45251004 wd:Q52637573 wd:Q52662489
wd:Q52635330 wd:Q47116994 wd:Q30267116 wd:Q24706265 wd:Q52620720
wd:Q52633876 wd:Q56416796 wd:Q52660351 wd:Q52635690 wd:Q7433770
wd:Q27991304 wd:Q55566796 wd:Q52619286 wd:Q30265175 wd:Q8035326}
}
UNION
{VALUES ?article {wd:Q26746153}
}
}
OPTIONAL {VALUES ?mainsubject {wd:Q949694 wd:Q2447562 wd:Q649558 wd:Q326071 wd:Q203133
wd:Q842428 wd:Q11679861 wd:Q2264130 wd:Q2360849 wd:Q1345113
wd:Q1597571 wd:Q2841329 wd:Q2665559 wd:Q30953 wd:Q738292
wd:Q154874 wd:Q2859732 wd:Q39222 wd:Q326638 wd:Q162272
wd:Q809561 wd:Q18975737 wd:Q1017169 wd:Q12090 wd:Q327298
wd:Q326648 wd:Q18975220 wd:Q36956 wd:Q155098 wd:Q690032
wd:Q193216 wd:Q682798 wd:Q922029 wd:Q41083 wd:Q76973
wd:Q16877704 wd:Q247096 wd:Q167178 wd:Q304601 wd:Q331283
wd:Q1475667 wd:Q388646 wd:Q777087 wd:Q1102300 wd:Q1048084
wd:Q719656 wd:Q2528129 wd:Q1760607 wd:Q192100 wd:Q1137321
wd:Q221159 }
?article wdt:P921 ?mainsubject.}
BIND(xsd:boolean(COALESCE(BOUND(?mainsubject),"false")) AS ?bound)
BIND(year(?date) AS ?ydate)
BIND(year(now()) AS ?ynow)
BIND((IF(?bound,?ydate+8,?ydate+5)) AS ?medrsyear)
FILTER(?medrsyear >= ?ynow)#Remove this filter line to see the medrsyear variable displayed
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?article"):::projected
v8("?bound"):::projected
v6("?date")
v7("?journal"):::projected
v7("?mainsubject")
v10("?medrsyear"):::projected
v7("?publisher")
v9("?ydate")
v10("?ynow"):::projected
a1((" "))
a3((" "))
a4((" "))
a5((" "))
a2((" "))
c8(["wd:Q55439927"]):::iri
c6(["wd:Q2085381"]):::iri
c11(["wd:Q7318358"]):::iri
c2(["wd:Q5633421"]):::iri
c19(["bd:serviceParam"]):::iri
c13(["wd:Q5953270"]):::iri
c15(["wd:Q45182324"]):::iri
c21(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["?medrsyear >= ?ynow"]]
f0 --> v10
f0 --> v10
bind1[/VALUES ?article/]
bind1-->v7
bind10(["wd:Q60919743"])
bind10 --> bind1
v7 --"wdt:P31"--> c2
v7 --"wdt:P123"--> v7
v7 --"wdt:P1055"--> a1
v7 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c6
v7 --"wdt:P5008"--> c8
v7 --"wdt:P1433"--> v7
v7 --"wdt:P577"--> v6
v7 --"wdt:P31"--> c11
v7 --"wdt:P1476"--> a3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
v7 --"wdt:P5115"--> a4
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
bind2[/VALUES ?journal/]
bind2-->v7
bind20(["wd:Q546003"])
bind20 --> bind2
bind21(["wd:Q2928049"])
bind21 --> bind2
bind22(["wd:Q5030320"])
bind22 --> bind2
bind23(["wd:Q5690746"])
bind23 --> bind2
bind24(["wd:Q6047666"])
bind24 --> bind2
bind25(["wd:Q26841926"])
bind25 --> bind2
bind26(["wd:Q1763668"])
bind26 --> bind2
bind27(["wd:Q2025726"])
bind27 --> bind2
bind28(["wd:Q15724513"])
bind28 --> bind2
bind29(["wd:Q2456339"])
bind29 --> bind2
bind210(["wd:Q27722384"])
bind210 --> bind2
bind211(["wd:Q27667673"])
bind211 --> bind2
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v7 --"wdt:P31"--> c13
end
union0r <== or ==> union0l
end
subgraph minus3["MINUS"]
style minus3 stroke-width:6px,fill:pink,stroke:red;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
subgraph union3[" Union "]
subgraph union3l[" "]
style union3l fill:#abf,stroke-dasharray: 3 3;
subgraph union4[" Union "]
subgraph union4l[" "]
style union4l fill:#abf,stroke-dasharray: 3 3;
bind4[/VALUES ?article/]
bind4-->v7
bind40(["wd:Q26746153"])
bind40 --> bind4
end
subgraph union4r[" "]
style union4r fill:#abf,stroke-dasharray: 3 3;
bind5[/VALUES ?publisher/]
bind5-->v7
bind50(["wd:Q52636754"])
bind50 --> bind5
bind51(["wd:Q52635805"])
bind51 --> bind5
bind52(["wd:Q4689899"])
bind52 --> bind5
bind53(["wd:Q52620137"])
bind53 --> bind5
bind54(["wd:Q4732612"])
bind54 --> bind5
bind55(["wd:Q43080819"])
bind55 --> bind5
bind56(["wd:Q30270870"])
bind56 --> bind5
bind57(["wd:Q30297686"])
bind57 --> bind5
bind58(["wd:Q52661346"])
bind58 --> bind5
bind59(["wd:Q52636079"])
bind59 --> bind5
bind510(["wd:Q52557383"])
bind510 --> bind5
bind511(["wd:Q54958933"])
bind511 --> bind5
bind512(["wd:Q2896740"])
bind512 --> bind5
bind513(["wd:Q63254475"])
bind513 --> bind5
bind514(["wd:Q18712923"])
bind514 --> bind5
bind515(["wd:Q52609680"])
bind515 --> bind5
bind516(["wd:Q52609536"])
bind516 --> bind5
bind517(["wd:Q52636154"])
bind517 --> bind5
bind518(["wd:Q52609215"])
bind518 --> bind5
bind519(["wd:Q80796"])
bind519 --> bind5
bind520(["wd:Q52636535"])
bind520 --> bind5
bind521(["wd:Q52633727"])
bind521 --> bind5
bind522(["wd:Q52636944"])
bind522 --> bind5
bind523(["wd:Q63254434"])
bind523 --> bind5
bind524(["wd:Q52637577"])
bind524 --> bind5
bind525(["wd:Q52665969"])
bind525 --> bind5
bind526(["wd:Q52660711"])
bind526 --> bind5
bind527(["wd:Q52659576"])
bind527 --> bind5
bind528(["wd:Q56979398"])
bind528 --> bind5
bind529(["wd:Q52670242"])
bind529 --> bind5
bind530(["wd:Q29891111"])
bind530 --> bind5
bind531(["wd:Q52619294"])
bind531 --> bind5
bind532(["wd:Q52662151"])
bind532 --> bind5
bind533(["wd:Q7072722"])
bind533 --> bind5
bind534(["wd:Q52609375"])
bind534 --> bind5
bind535(["wd:Q7259709"])
bind535 --> bind5
bind536(["wd:Q52636843"])
bind536 --> bind5
bind537(["wd:Q45251004"])
bind537 --> bind5
bind538(["wd:Q52637573"])
bind538 --> bind5
bind539(["wd:Q52662489"])
bind539 --> bind5
bind540(["wd:Q52635330"])
bind540 --> bind5
bind541(["wd:Q47116994"])
bind541 --> bind5
bind542(["wd:Q30267116"])
bind542 --> bind5
bind543(["wd:Q24706265"])
bind543 --> bind5
bind544(["wd:Q52620720"])
bind544 --> bind5
bind545(["wd:Q52633876"])
bind545 --> bind5
bind546(["wd:Q56416796"])
bind546 --> bind5
bind547(["wd:Q52660351"])
bind547 --> bind5
bind548(["wd:Q52635690"])
bind548 --> bind5
bind549(["wd:Q7433770"])
bind549 --> bind5
bind550(["wd:Q27991304"])
bind550 --> bind5
bind551(["wd:Q55566796"])
bind551 --> bind5
bind552(["wd:Q52619286"])
bind552 --> bind5
bind553(["wd:Q30265175"])
bind553 --> bind5
bind554(["wd:Q8035326"])
bind554 --> bind5
end
union4r <== or ==> union4l
end
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
v7 --"wdt:P5824"--> a5
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v7 --"wdt:P31"--> c15
end
union2r <== or ==> union2l
end
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
bind6[/VALUES ?mainsubject/]
bind6-->v7
bind60(["wd:Q949694"])
bind60 --> bind6
bind61(["wd:Q2447562"])
bind61 --> bind6
bind62(["wd:Q649558"])
bind62 --> bind6
bind63(["wd:Q326071"])
bind63 --> bind6
bind64(["wd:Q203133"])
bind64 --> bind6
bind65(["wd:Q842428"])
bind65 --> bind6
bind66(["wd:Q11679861"])
bind66 --> bind6
bind67(["wd:Q2264130"])
bind67 --> bind6
bind68(["wd:Q2360849"])
bind68 --> bind6
bind69(["wd:Q1345113"])
bind69 --> bind6
bind610(["wd:Q1597571"])
bind610 --> bind6
bind611(["wd:Q2841329"])
bind611 --> bind6
bind612(["wd:Q2665559"])
bind612 --> bind6
bind613(["wd:Q30953"])
bind613 --> bind6
bind614(["wd:Q738292"])
bind614 --> bind6
bind615(["wd:Q154874"])
bind615 --> bind6
bind616(["wd:Q2859732"])
bind616 --> bind6
bind617(["wd:Q39222"])
bind617 --> bind6
bind618(["wd:Q326638"])
bind618 --> bind6
bind619(["wd:Q162272"])
bind619 --> bind6
bind620(["wd:Q809561"])
bind620 --> bind6
bind621(["wd:Q18975737"])
bind621 --> bind6
bind622(["wd:Q1017169"])
bind622 --> bind6
bind623(["wd:Q12090"])
bind623 --> bind6
bind624(["wd:Q327298"])
bind624 --> bind6
bind625(["wd:Q326648"])
bind625 --> bind6
bind626(["wd:Q18975220"])
bind626 --> bind6
bind627(["wd:Q36956"])
bind627 --> bind6
bind628(["wd:Q155098"])
bind628 --> bind6
bind629(["wd:Q690032"])
bind629 --> bind6
bind630(["wd:Q193216"])
bind630 --> bind6
bind631(["wd:Q682798"])
bind631 --> bind6
bind632(["wd:Q922029"])
bind632 --> bind6
bind633(["wd:Q41083"])
bind633 --> bind6
bind634(["wd:Q76973"])
bind634 --> bind6
bind635(["wd:Q16877704"])
bind635 --> bind6
bind636(["wd:Q247096"])
bind636 --> bind6
bind637(["wd:Q167178"])
bind637 --> bind6
bind638(["wd:Q304601"])
bind638 --> bind6
bind639(["wd:Q331283"])
bind639 --> bind6
bind640(["wd:Q1475667"])
bind640 --> bind6
bind641(["wd:Q388646"])
bind641 --> bind6
bind642(["wd:Q777087"])
bind642 --> bind6
bind643(["wd:Q1102300"])
bind643 --> bind6
bind644(["wd:Q1048084"])
bind644 --> bind6
bind645(["wd:Q719656"])
bind645 --> bind6
bind646(["wd:Q2528129"])
bind646 --> bind6
bind647(["wd:Q1760607"])
bind647 --> bind6
bind648(["wd:Q192100"])
bind648 --> bind6
bind649(["wd:Q1137321"])
bind649 --> bind6
bind650(["wd:Q221159"])
bind650 --> bind6
v7 -."wdt:P921".-> v7
end
bind7[/"http://www.w3.org/2001/XMLSchema#boolean(bound(?mainsubject)'false')"/]
v7 --o bind7
bind7 --as--o v8
bind8[/"year-from-dateTime(?date)"/]
v6 --o bind8
bind8 --as--o v9
bind9[/"year-from-dateTime(NOW())"/]
bind9 --as--o v10
bind10[/"if(?bound,?ydate + '+8^^xsd:integer',?ydate + '+5^^xsd:integer')"/]
v8 --o bind10
v9 --o bind10
bind10 --as--o v10
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c19 --"wikibase:language"--> c21
end