WikidataFacts added a comment.

Note that this can also occur on grouping queries:

SELECT ?x (COUNT(*) AS ?total) (SUM(?y) AS ?ys) (?ys/?total AS ?ratio) WHERE {
  ?x wdt:P31 wd:Q1.
  BIND(1 AS ?y)
}
GROUP BY ?x

And an alternative workaround is to inline the variables into the SELECT, i. e. (SUM(?y)/COUNT(*) AS ?ratio). The advantage of this is that you can still use ?ratio in a HAVING clause on the grouping query (a FILTER in the outer query is less efficient).


TASK DETAIL
https://phabricator.wikimedia.org/T172113

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: WikidataFacts
Cc: WikidataFacts, Esc3300, Aklapper, Smalyshev, Lucas_Werkmeister_WMDE, PokestarFan, GoranSMilovanovic, QZanden, EBjune, merbst, Avner, debt, Gehel, Jonas, FloNight, Xmlizer, Izno, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331, Krenair
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to