User:Lockal

From Wikidata
Jump to: navigation, search
Babel user information
ru-N Для этого участника русский язык является родным.
en-3 This user has advanced knowledge of English.
Logo fourth Wikidata Birthday cropped.png This user is celebrating Wikidata's 4th birthday.
Users by language

Wikipedia and Wikidata editor

Statements[edit]

instance of human (Q5)
sex or gender male (Q6581097)
native language Russian (Q7737)
field of work computer programming (Q80006)
programming language Python (Q28865)
C++ (Q2407)

Полезные ссылки под рукой[edit]

Queries[edit]

Items without P31 or P279[edit]

select ?item ?itemLabel {
  ?article schema:about ?item ; schema:inLanguage "ru" .
  filter (substr(str(?article), 1, 16) = "https://ru.wikip")
  minus { ?item wdt:P31 [] . }
  minus { ?item wdt:P279 [] . }
  minus { ?item wdt:P361 [] . }
  optional {
    ?item rdfs:label ?itemLabel .
    filter (lang(?itemLabel) = "ru")
  }
} limit 200

Try it!

Most commonly used external ids for genderless japanese people[edit]

select ?propertyLabel (count(?propertyLabel) as ?cnt)
  with {
    select ?item { ?item wdt:P31 wd:Q5 ; wdt:P27 wd:Q17 optional {?item wdt:P21 ?gender} filter (!bound(?gender)) }
  } as %items
{
  ?property wikibase:claim ?propertyclaim .
  ?item ?propertyclaim [] .
  ?property wikibase:propertyType wikibase:ExternalId .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }

  INCLUDE %items
}
group by ?propertyLabel
order by desc(?cnt)
limit 20

Try it!

P31 usage[edit]

#defaultView:LineChart
SELECT ?day ?count WITH { SELECT (".+\\|31=(\\d+).+" as ?r) ("|31=" as ?p)
  (IF(CONTAINS(?r1, ?p), xsd:integer(REPLACE(?r1, ?r, "$1")), -1) AS ?c1) (xsd:dateTime(?t1) AS ?d1)
  (IF(CONTAINS(?r2, ?p), xsd:integer(REPLACE(?r2, ?r, "$1")), -1) AS ?c2) (xsd:dateTime(?t2) AS ?d2)
  (IF(CONTAINS(?r3, ?p), xsd:integer(REPLACE(?r3, ?r, "$1")), -1) AS ?c3) (xsd:dateTime(?t3) AS ?d3)
  (IF(CONTAINS(?r4, ?p), xsd:integer(REPLACE(?r4, ?r, "$1")), -1) AS ?c4) (xsd:dateTime(?t4) AS ?d4)
  (IF(CONTAINS(?r5, ?p), xsd:integer(REPLACE(?r5, ?r, "$1")), -1) AS ?c5) (xsd:dateTime(?t5) AS ?d5)
  (IF(CONTAINS(?r6, ?p), xsd:integer(REPLACE(?r6, ?r, "$1")), -1) AS ?c6) (xsd:dateTime(?t6) AS ?d6)
  (IF(CONTAINS(?r7, ?p), xsd:integer(REPLACE(?r7, ?r, "$1")), -1) AS ?c7) (xsd:dateTime(?t7) AS ?d7)
  (IF(CONTAINS(?r8, ?p), xsd:integer(REPLACE(?r8, ?r, "$1")), -1) AS ?c8) (xsd:dateTime(?t8) AS ?d8)
  (IF(CONTAINS(?r9, ?p), xsd:integer(REPLACE(?r9, ?r, "$1")), -1) AS ?c9) (xsd:dateTime(?t9) AS ?d9)
  (IF(CONTAINS(?r10, ?p), xsd:integer(REPLACE(?r10, ?r, "$1")), -1) AS ?c10) (xsd:dateTime(?t10) AS ?d10)
  (IF(CONTAINS(?r11, ?p), xsd:integer(REPLACE(?r11, ?r, "$1")), -1) AS ?c11) (xsd:dateTime(?t11) AS ?d11)
  (IF(CONTAINS(?r12, ?p), xsd:integer(REPLACE(?r12, ?r, "$1")), -1) AS ?c12) (xsd:dateTime(?t12) AS ?d12)
  (IF(CONTAINS(?r13, ?p), xsd:integer(REPLACE(?r13, ?r, "$1")), -1) AS ?c13) (xsd:dateTime(?t13) AS ?d13)
  (IF(CONTAINS(?r14, ?p), xsd:integer(REPLACE(?r14, ?r, "$1")), -1) AS ?c14) (xsd:dateTime(?t14) AS ?d14)
  (IF(CONTAINS(?r15, ?p), xsd:integer(REPLACE(?r15, ?r, "$1")), -1) AS ?c15) (xsd:dateTime(?t15) AS ?d15)
  (IF(CONTAINS(?r16, ?p), xsd:integer(REPLACE(?r16, ?r, "$1")), -1) AS ?c16) (xsd:dateTime(?t16) AS ?d16)
  (IF(CONTAINS(?r17, ?p), xsd:integer(REPLACE(?r17, ?r, "$1")), -1) AS ?c17) (xsd:dateTime(?t17) AS ?d17)
  (IF(CONTAINS(?r18, ?p), xsd:integer(REPLACE(?r18, ?r, "$1")), -1) AS ?c18) (xsd:dateTime(?t18) AS ?d18)
  (IF(CONTAINS(?r19, ?p), xsd:integer(REPLACE(?r19, ?r, "$1")), -1) AS ?c19) (xsd:dateTime(?t19) AS ?d19)
  (IF(CONTAINS(?r20, ?p), xsd:integer(REPLACE(?r20, ?r, "$1")), -1) AS ?c20) (xsd:dateTime(?t20) AS ?d20)
  (IF(CONTAINS(?r21, ?p), xsd:integer(REPLACE(?r21, ?r, "$1")), -1) AS ?c21) (xsd:dateTime(?t21) AS ?d21)
  (IF(CONTAINS(?r22, ?p), xsd:integer(REPLACE(?r22, ?r, "$1")), -1) AS ?c22) (xsd:dateTime(?t22) AS ?d22)
  (IF(CONTAINS(?r23, ?p), xsd:integer(REPLACE(?r23, ?r, "$1")), -1) AS ?c23) (xsd:dateTime(?t23) AS ?d23)
  (IF(CONTAINS(?r24, ?p), xsd:integer(REPLACE(?r24, ?r, "$1")), -1) AS ?c24) (xsd:dateTime(?t24) AS ?d24)
  (IF(CONTAINS(?r25, ?p), xsd:integer(REPLACE(?r25, ?r, "$1")), -1) AS ?c25) (xsd:dateTime(?t25) AS ?d25)
  (IF(CONTAINS(?r26, ?p), xsd:integer(REPLACE(?r26, ?r, "$1")), -1) AS ?c26) (xsd:dateTime(?t26) AS ?d26)
  (IF(CONTAINS(?r27, ?p), xsd:integer(REPLACE(?r27, ?r, "$1")), -1) AS ?c27) (xsd:dateTime(?t27) AS ?d27)
  (IF(CONTAINS(?r28, ?p), xsd:integer(REPLACE(?r28, ?r, "$1")), -1) AS ?c28) (xsd:dateTime(?t28) AS ?d28)
  (IF(CONTAINS(?r29, ?p), xsd:integer(REPLACE(?r29, ?r, "$1")), -1) AS ?c29) (xsd:dateTime(?t29) AS ?d29)
  (IF(CONTAINS(?r30, ?p), xsd:integer(REPLACE(?r30, ?r, "$1")), -1) AS ?c30) (xsd:dateTime(?t30) AS ?d30)
  (IF(CONTAINS(?r31, ?p), xsd:integer(REPLACE(?r31, ?r, "$1")), -1) AS ?c31) (xsd:dateTime(?t31) AS ?d31)
  (IF(CONTAINS(?r32, ?p), xsd:integer(REPLACE(?r32, ?r, "$1")), -1) AS ?c32) (xsd:dateTime(?t32) AS ?d32)
  (IF(CONTAINS(?r33, ?p), xsd:integer(REPLACE(?r33, ?r, "$1")), -1) AS ?c33) (xsd:dateTime(?t33) AS ?d33)
  (IF(CONTAINS(?r34, ?p), xsd:integer(REPLACE(?r34, ?r, "$1")), -1) AS ?c34) (xsd:dateTime(?t34) AS ?d34)
  (IF(CONTAINS(?r35, ?p), xsd:integer(REPLACE(?r35, ?r, "$1")), -1) AS ?c35) (xsd:dateTime(?t35) AS ?d35)
  (IF(CONTAINS(?r36, ?p), xsd:integer(REPLACE(?r36, ?r, "$1")), -1) AS ?c36) (xsd:dateTime(?t36) AS ?d36)
  (IF(CONTAINS(?r37, ?p), xsd:integer(REPLACE(?r37, ?r, "$1")), -1) AS ?c37) (xsd:dateTime(?t37) AS ?d37)
  (IF(CONTAINS(?r38, ?p), xsd:integer(REPLACE(?r38, ?r, "$1")), -1) AS ?c38) (xsd:dateTime(?t38) AS ?d38)
  (IF(CONTAINS(?r39, ?p), xsd:integer(REPLACE(?r39, ?r, "$1")), -1) AS ?c39) (xsd:dateTime(?t39) AS ?d39)
  (IF(CONTAINS(?r40, ?p), xsd:integer(REPLACE(?r40, ?r, "$1")), -1) AS ?c40) (xsd:dateTime(?t40) AS ?d40)
  (IF(CONTAINS(?r41, ?p), xsd:integer(REPLACE(?r41, ?r, "$1")), -1) AS ?c41) (xsd:dateTime(?t41) AS ?d41)
  (IF(CONTAINS(?r42, ?p), xsd:integer(REPLACE(?r42, ?r, "$1")), -1) AS ?c42) (xsd:dateTime(?t42) AS ?d42)
  (IF(CONTAINS(?r43, ?p), xsd:integer(REPLACE(?r43, ?r, "$1")), -1) AS ?c43) (xsd:dateTime(?t43) AS ?d43)
  (IF(CONTAINS(?r44, ?p), xsd:integer(REPLACE(?r44, ?r, "$1")), -1) AS ?c44) (xsd:dateTime(?t44) AS ?d44)
  (IF(CONTAINS(?r45, ?p), xsd:integer(REPLACE(?r45, ?r, "$1")), -1) AS ?c45) (xsd:dateTime(?t45) AS ?d45)
  (IF(CONTAINS(?r46, ?p), xsd:integer(REPLACE(?r46, ?r, "$1")), -1) AS ?c46) (xsd:dateTime(?t46) AS ?d46)
  (IF(CONTAINS(?r47, ?p), xsd:integer(REPLACE(?r47, ?r, "$1")), -1) AS ?c47) (xsd:dateTime(?t47) AS ?d47)
  (IF(CONTAINS(?r48, ?p), xsd:integer(REPLACE(?r48, ?r, "$1")), -1) AS ?c48) (xsd:dateTime(?t48) AS ?d48)
  (IF(CONTAINS(?r49, ?p), xsd:integer(REPLACE(?r49, ?r, "$1")), -1) AS ?c49) (xsd:dateTime(?t49) AS ?d49)
  (IF(CONTAINS(?r50, ?p), xsd:integer(REPLACE(?r50, ?r, "$1")), -1) AS ?c50) (xsd:dateTime(?t50) AS ?d50)
  { SERVICE wikibase:mwapi {
      bd:serviceParam wikibase:api "Generator" ; wikibase:endpoint "www.wikidata.org" ; mwapi:generator "allpages" ;
                      mwapi:gapfrom "Property_uses" ; mwapi:gaplimit "1" ; mwapi:gapnamespace "10" ; mwapi:prop "revisions" ;
                      mwapi:rvprop "content|timestamp" ; mwapi:rvlimit "50" ; mwapi:rvuser "PLbot" .
      ?t1 wikibase:apiOutput "revisions/rev[1]/@timestamp" . ?r1 wikibase:apiOutput "revisions/rev[1]/text()" .
      ?t2 wikibase:apiOutput "revisions/rev[2]/@timestamp" . ?r2 wikibase:apiOutput "revisions/rev[2]/text()" .
      ?t3 wikibase:apiOutput "revisions/rev[3]/@timestamp" . ?r3 wikibase:apiOutput "revisions/rev[3]/text()" .
      ?t4 wikibase:apiOutput "revisions/rev[4]/@timestamp" . ?r4 wikibase:apiOutput "revisions/rev[4]/text()" .
      ?t5 wikibase:apiOutput "revisions/rev[5]/@timestamp" . ?r5 wikibase:apiOutput "revisions/rev[5]/text()" .
      ?t6 wikibase:apiOutput "revisions/rev[6]/@timestamp" . ?r6 wikibase:apiOutput "revisions/rev[6]/text()" .
      ?t7 wikibase:apiOutput "revisions/rev[7]/@timestamp" . ?r7 wikibase:apiOutput "revisions/rev[7]/text()" .
      ?t8 wikibase:apiOutput "revisions/rev[8]/@timestamp" . ?r8 wikibase:apiOutput "revisions/rev[8]/text()" .
      ?t9 wikibase:apiOutput "revisions/rev[9]/@timestamp" . ?r9 wikibase:apiOutput "revisions/rev[9]/text()" .
      ?t10 wikibase:apiOutput "revisions/rev[10]/@timestamp" . ?r10 wikibase:apiOutput "revisions/rev[10]/text()" .
      ?t11 wikibase:apiOutput "revisions/rev[11]/@timestamp" . ?r11 wikibase:apiOutput "revisions/rev[11]/text()" .
      ?t12 wikibase:apiOutput "revisions/rev[12]/@timestamp" . ?r12 wikibase:apiOutput "revisions/rev[12]/text()" .
      ?t13 wikibase:apiOutput "revisions/rev[13]/@timestamp" . ?r13 wikibase:apiOutput "revisions/rev[13]/text()" .
      ?t14 wikibase:apiOutput "revisions/rev[14]/@timestamp" . ?r14 wikibase:apiOutput "revisions/rev[14]/text()" .
      ?t15 wikibase:apiOutput "revisions/rev[15]/@timestamp" . ?r15 wikibase:apiOutput "revisions/rev[15]/text()" .
      ?t16 wikibase:apiOutput "revisions/rev[16]/@timestamp" . ?r16 wikibase:apiOutput "revisions/rev[16]/text()" .
      ?t17 wikibase:apiOutput "revisions/rev[17]/@timestamp" . ?r17 wikibase:apiOutput "revisions/rev[17]/text()" .
      ?t18 wikibase:apiOutput "revisions/rev[18]/@timestamp" . ?r18 wikibase:apiOutput "revisions/rev[18]/text()" .
      ?t19 wikibase:apiOutput "revisions/rev[19]/@timestamp" . ?r19 wikibase:apiOutput "revisions/rev[19]/text()" .
      ?t20 wikibase:apiOutput "revisions/rev[20]/@timestamp" . ?r20 wikibase:apiOutput "revisions/rev[20]/text()" .
      ?t21 wikibase:apiOutput "revisions/rev[21]/@timestamp" . ?r21 wikibase:apiOutput "revisions/rev[21]/text()" .
      ?t22 wikibase:apiOutput "revisions/rev[22]/@timestamp" . ?r22 wikibase:apiOutput "revisions/rev[22]/text()" .
      ?t23 wikibase:apiOutput "revisions/rev[23]/@timestamp" . ?r23 wikibase:apiOutput "revisions/rev[23]/text()" .
      ?t24 wikibase:apiOutput "revisions/rev[24]/@timestamp" . ?r24 wikibase:apiOutput "revisions/rev[24]/text()" .
      ?t25 wikibase:apiOutput "revisions/rev[25]/@timestamp" . ?r25 wikibase:apiOutput "revisions/rev[25]/text()" .
      ?t26 wikibase:apiOutput "revisions/rev[26]/@timestamp" . ?r26 wikibase:apiOutput "revisions/rev[26]/text()" .
      ?t27 wikibase:apiOutput "revisions/rev[27]/@timestamp" . ?r27 wikibase:apiOutput "revisions/rev[27]/text()" .
      ?t28 wikibase:apiOutput "revisions/rev[28]/@timestamp" . ?r28 wikibase:apiOutput "revisions/rev[28]/text()" .
      ?t29 wikibase:apiOutput "revisions/rev[29]/@timestamp" . ?r29 wikibase:apiOutput "revisions/rev[29]/text()" .
      ?t30 wikibase:apiOutput "revisions/rev[30]/@timestamp" . ?r30 wikibase:apiOutput "revisions/rev[30]/text()" .
      ?t31 wikibase:apiOutput "revisions/rev[31]/@timestamp" . ?r31 wikibase:apiOutput "revisions/rev[31]/text()" .
      ?t32 wikibase:apiOutput "revisions/rev[32]/@timestamp" . ?r32 wikibase:apiOutput "revisions/rev[32]/text()" .
      ?t33 wikibase:apiOutput "revisions/rev[33]/@timestamp" . ?r33 wikibase:apiOutput "revisions/rev[33]/text()" .
      ?t34 wikibase:apiOutput "revisions/rev[34]/@timestamp" . ?r34 wikibase:apiOutput "revisions/rev[34]/text()" .
      ?t35 wikibase:apiOutput "revisions/rev[35]/@timestamp" . ?r35 wikibase:apiOutput "revisions/rev[35]/text()" .
      ?t36 wikibase:apiOutput "revisions/rev[36]/@timestamp" . ?r36 wikibase:apiOutput "revisions/rev[36]/text()" .
      ?t37 wikibase:apiOutput "revisions/rev[37]/@timestamp" . ?r37 wikibase:apiOutput "revisions/rev[37]/text()" .
      ?t38 wikibase:apiOutput "revisions/rev[38]/@timestamp" . ?r38 wikibase:apiOutput "revisions/rev[38]/text()" .
      ?t39 wikibase:apiOutput "revisions/rev[39]/@timestamp" . ?r39 wikibase:apiOutput "revisions/rev[39]/text()" .
      ?t40 wikibase:apiOutput "revisions/rev[40]/@timestamp" . ?r40 wikibase:apiOutput "revisions/rev[40]/text()" .
      ?t41 wikibase:apiOutput "revisions/rev[41]/@timestamp" . ?r41 wikibase:apiOutput "revisions/rev[41]/text()" .
      ?t42 wikibase:apiOutput "revisions/rev[42]/@timestamp" . ?r42 wikibase:apiOutput "revisions/rev[42]/text()" .
      ?t43 wikibase:apiOutput "revisions/rev[43]/@timestamp" . ?r43 wikibase:apiOutput "revisions/rev[43]/text()" .
      ?t44 wikibase:apiOutput "revisions/rev[44]/@timestamp" . ?r44 wikibase:apiOutput "revisions/rev[44]/text()" .
      ?t45 wikibase:apiOutput "revisions/rev[45]/@timestamp" . ?r45 wikibase:apiOutput "revisions/rev[45]/text()" .
      ?t46 wikibase:apiOutput "revisions/rev[46]/@timestamp" . ?r46 wikibase:apiOutput "revisions/rev[46]/text()" .
      ?t47 wikibase:apiOutput "revisions/rev[47]/@timestamp" . ?r47 wikibase:apiOutput "revisions/rev[47]/text()" .
      ?t48 wikibase:apiOutput "revisions/rev[48]/@timestamp" . ?r48 wikibase:apiOutput "revisions/rev[48]/text()" .
      ?t49 wikibase:apiOutput "revisions/rev[49]/@timestamp" . ?r49 wikibase:apiOutput "revisions/rev[49]/text()" .
      ?t50 wikibase:apiOutput "revisions/rev[50]/@timestamp" . ?r50 wikibase:apiOutput "revisions/rev[50]/text()" .
    }
  }
} as %revs {
  {BIND(?c1 AS ?count) BIND(?d1 AS ?day) INCLUDE %revs} UNION
  {BIND(?c2 AS ?count) BIND(?d2 AS ?day) INCLUDE %revs} UNION
  {BIND(?c3 AS ?count) BIND(?d3 AS ?day) INCLUDE %revs} UNION
  {BIND(?c4 AS ?count) BIND(?d4 AS ?day) INCLUDE %revs} UNION
  {BIND(?c5 AS ?count) BIND(?d5 AS ?day) INCLUDE %revs} UNION
  {BIND(?c6 AS ?count) BIND(?d6 AS ?day) INCLUDE %revs} UNION
  {BIND(?c7 AS ?count) BIND(?d7 AS ?day) INCLUDE %revs} UNION
  {BIND(?c8 AS ?count) BIND(?d8 AS ?day) INCLUDE %revs} UNION
  {BIND(?c9 AS ?count) BIND(?d9 AS ?day) INCLUDE %revs} UNION
  {BIND(?c10 AS ?count) BIND(?d10 AS ?day) INCLUDE %revs} UNION
  {BIND(?c11 AS ?count) BIND(?d11 AS ?day) INCLUDE %revs} UNION
  {BIND(?c12 AS ?count) BIND(?d12 AS ?day) INCLUDE %revs} UNION
  {BIND(?c13 AS ?count) BIND(?d13 AS ?day) INCLUDE %revs} UNION
  {BIND(?c14 AS ?count) BIND(?d14 AS ?day) INCLUDE %revs} UNION
  {BIND(?c15 AS ?count) BIND(?d15 AS ?day) INCLUDE %revs} UNION
  {BIND(?c16 AS ?count) BIND(?d16 AS ?day) INCLUDE %revs} UNION
  {BIND(?c17 AS ?count) BIND(?d17 AS ?day) INCLUDE %revs} UNION
  {BIND(?c18 AS ?count) BIND(?d18 AS ?day) INCLUDE %revs} UNION
  {BIND(?c19 AS ?count) BIND(?d19 AS ?day) INCLUDE %revs} UNION
  {BIND(?c20 AS ?count) BIND(?d20 AS ?day) INCLUDE %revs} UNION
  {BIND(?c21 AS ?count) BIND(?d21 AS ?day) INCLUDE %revs} UNION
  {BIND(?c22 AS ?count) BIND(?d22 AS ?day) INCLUDE %revs} UNION
  {BIND(?c23 AS ?count) BIND(?d23 AS ?day) INCLUDE %revs} UNION
  {BIND(?c24 AS ?count) BIND(?d24 AS ?day) INCLUDE %revs} UNION
  {BIND(?c25 AS ?count) BIND(?d25 AS ?day) INCLUDE %revs} UNION
  {BIND(?c26 AS ?count) BIND(?d26 AS ?day) INCLUDE %revs} UNION
  {BIND(?c27 AS ?count) BIND(?d27 AS ?day) INCLUDE %revs} UNION
  {BIND(?c28 AS ?count) BIND(?d28 AS ?day) INCLUDE %revs} UNION
  {BIND(?c29 AS ?count) BIND(?d29 AS ?day) INCLUDE %revs} UNION
  {BIND(?c30 AS ?count) BIND(?d30 AS ?day) INCLUDE %revs} UNION
  {BIND(?c31 AS ?count) BIND(?d31 AS ?day) INCLUDE %revs} UNION
  {BIND(?c32 AS ?count) BIND(?d32 AS ?day) INCLUDE %revs} UNION
  {BIND(?c33 AS ?count) BIND(?d33 AS ?day) INCLUDE %revs} UNION
  {BIND(?c34 AS ?count) BIND(?d34 AS ?day) INCLUDE %revs} UNION
  {BIND(?c35 AS ?count) BIND(?d35 AS ?day) INCLUDE %revs} UNION
  {BIND(?c36 AS ?count) BIND(?d36 AS ?day) INCLUDE %revs} UNION
  {BIND(?c37 AS ?count) BIND(?d37 AS ?day) INCLUDE %revs} UNION
  {BIND(?c38 AS ?count) BIND(?d38 AS ?day) INCLUDE %revs} UNION
  {BIND(?c39 AS ?count) BIND(?d39 AS ?day) INCLUDE %revs} UNION
  {BIND(?c40 AS ?count) BIND(?d40 AS ?day) INCLUDE %revs} UNION
  {BIND(?c41 AS ?count) BIND(?d41 AS ?day) INCLUDE %revs} UNION
  {BIND(?c42 AS ?count) BIND(?d42 AS ?day) INCLUDE %revs} UNION
  {BIND(?c43 AS ?count) BIND(?d43 AS ?day) INCLUDE %revs} UNION
  {BIND(?c44 AS ?count) BIND(?d44 AS ?day) INCLUDE %revs} UNION
  {BIND(?c45 AS ?count) BIND(?d45 AS ?day) INCLUDE %revs} UNION
  {BIND(?c46 AS ?count) BIND(?d46 AS ?day) INCLUDE %revs} UNION
  {BIND(?c47 AS ?count) BIND(?d47 AS ?day) INCLUDE %revs} UNION
  {BIND(?c48 AS ?count) BIND(?d48 AS ?day) INCLUDE %revs} UNION
  {BIND(?c49 AS ?count) BIND(?d49 AS ?day) INCLUDE %revs} UNION
  {BIND(?c50 AS ?count) BIND(?d50 AS ?day) INCLUDE %revs}
  FILTER(?count != -1)
}

Try it!