| Smalyshev added a comment. |
I did a quick check and the first query form resolves 44326 labels, 23178 of them unique, even though it only needs 100 in the second form. The problem is, the query semantics is different there - there's no way to know which labels should be in those 100 selected, and also the label may have participate in projections, conditionals etc. which could influence the result.
This form:
SELECT ?entity ?entityLabel ?count WHERE {
{
SELECT ?entity (COUNT(?statement) AS ?count) WHERE {
hint:Query hint:optimizer "None".
?statement wikibase:rank wikibase:DeprecatedRank.
?entity ?p ?statement.
}
GROUP BY ?entity ?entityLabel
HAVING(?count > 10)
ORDER BY DESC(?count)
LIMIT 100
OFFSET 0
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
} ORDER BY DESC(?count)Does not require named subquery and also produces the same result. I'm not sure though how to automatically and cleanly extract label service outside. I'll think about it.
TASK DETAIL
EMAIL PREFERENCES
To: Smalyshev
Cc: Smalyshev, Aklapper, Lucas_Werkmeister_WMDE, Jonas, GoranSMilovanovic, QZanden, EBjune, merbst, Avner, debt, Gehel, FloNight, Xmlizer, Izno, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331
Cc: Smalyshev, Aklapper, Lucas_Werkmeister_WMDE, Jonas, GoranSMilovanovic, QZanden, EBjune, merbst, Avner, debt, Gehel, FloNight, Xmlizer, Izno, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
