Talk:Wikidata Query Service/User Manual

Item count
How can I just count the number of items that match a certain query? I mean, I get the total with the result set, but if the total is very large, the browser tab explodes, and loading the entire dataset is unnecessary anyway, since all I want is the number.

I tried to use SPARQL's COUNT but got a syntax error. grepping the User Manual for 'count' returned no results either. I'm guessing this is a FAQ, so perhaps an answer should be added to the manual, even if it is "currently you can't". Ijon (talk) 22:01, 30 October 2015 (UTC)

This is standard SPARQL. Try something like: SELECT (COUNT(DISTINCT ?x) AS ?count) WHERE { ... } Cheers, Bovlb (talk) 01:59, 17 October 2016 (UTC)

ranks
Is there a way to take ranks into account, like ignoring deprecated statements in d:Wikidata:Database reports/items with P569 greater than P570. --Zolo (talk) 08:16, 27 January 2016 (UTC)

Sitelinks
The manual is still missing how to get sitelinks. And is it possible to get only the sitelinks of a certain namespace? --Tobias1984 (talk) 13:05, 27 May 2016 (UTC)
 * I remember writing such a query and posting it to the #wikidata IRC channel, but I couldn't easily recreate it. The problem is that the contains function does not directly work on the URLs. Currently I'm a bit too swamped to search in the logs. -- Jan Zerebecki 14:30, 1 June 2016 (UTC)

Translations
Hi

Thank you for this amazing tool!

In order to make it easier to use, have you considered to mark that manual for translation?

Thanks, Trizek (talk) 13:29, 18 June 2016 (UTC)

Invalid example
The example "showing the list of US presidents and their spouses" (section "Label service") results in the following error (when trying to evaluate it following the link "Try it"):

The prefix "v" is not defined in the menu "Prefixes" in the query tool, and I cannot find it in this page either.

--FGeorges (talk) 05:49, 6 October 2016 (UTC)
 * I have fixed it. It should have been ps: .  Bovlb (talk) 02:10, 17 October 2016 (UTC)

Map view, multiple columns
For the map view, when there are multiple co-ordinate columns, it would be good to display them in distinct colors. Example query - http://tiny url.com/h35p92u Bovlb (talk) 01:57, 17 October 2016 (UTC)