Relaying a question from a brief discussion on Twitter [1], I am curious to hear how people feel about the idea of creating a a "SPARQL query example" property for properties, modeled after "Wikidata property example" [2]?
This would allow people to discover queries that exemplify how the property is used in practice. Does the approach make sense or would it stretch too much the scope of properties of properties? Are there better ways to reference SPARQL examples and bring them closer to their source?
Dario
[1] https://twitter.com/ReaderMeter/status/768101464572997632 [2] https://www.wikidata.org/wiki/Property:P1855
Hi!
Relaying a question from a brief discussion on Twitter [1], I am curious to hear how people feel about the idea of creating a a "SPARQL query example" property for properties, modeled after "Wikidata property example" [2]?
Might be nice, but we need a good way to present the query in the UI (see below).
This would allow people to discover queries that exemplify how the property is used in practice. Does the approach make sense or would it stretch too much the scope of properties of properties? Are there better ways to reference SPARQL examples and bring them closer to their source?
I think it may be a good idea to start thinking about some way of storing queries on Wikidata maybe? On one hand, they are just strings, on the other hand, they are code - like CSS or Javascript - and storing them just as strings may be inconvenient. Maybe .sparql file extension handler like we have for .js and .json and so on?
On 23.08.2016 21:03, Stas Malyshev wrote:
Hi!
Relaying a question from a brief discussion on Twitter [1], I am curious to hear how people feel about the idea of creating a a "SPARQL query example" property for properties, modeled after "Wikidata property example" [2]?
Might be nice, but we need a good way to present the query in the UI (see below).
This would allow people to discover queries that exemplify how the property is used in practice. Does the approach make sense or would it stretch too much the scope of properties of properties? Are there better ways to reference SPARQL examples and bring them closer to their source?
I think it may be a good idea to start thinking about some way of storing queries on Wikidata maybe? On one hand, they are just strings, on the other hand, they are code - like CSS or Javascript - and storing them just as strings may be inconvenient. Maybe .sparql file extension handler like we have for .js and .json and so on?
If you could store queries, you could also store queries for each item that is about a list of things, so that the query returns exactly the things that should be in the list ... could be useful.
Markus
मा
-----Original Message----- From: "Stas Malyshev" smalyshev@wikimedia.org Sent: 24-08-2016 12:33 AM To: "Discussion list for the Wikidata project." wikidata@lists.wikimedia.org Subject: Re: [Wikidata] A property to exemplify SPARQL queries associated witha property
Hi!
Relaying a question from a brief discussion on Twitter [1], I am curious to hear how people feel about the idea of creating a a "SPARQL query example" property for properties, modeled after "Wikidata property example" [2]?
Might be nice, but we need a good way to present the query in the UI (see below).
This would allow people to discover queries that exemplify how the property is used in practice. Does the approach make sense or would it stretch too much the scope of properties of properties? Are there better ways to reference SPARQL examples and bring them closer to their source?
I think it may be a good idea to start thinking about some way of storing queries on Wikidata maybe? On one hand, they are just strings, on the other hand, they are code - like CSS or Javascript - and storing them just as strings may be inconvenient. Maybe .sparql file extension handler like we have for .js and .json and so on?
If you could store queries, you could also store queries for each item that is about a list of things, so that the query returns exactly the things that should be in the list ... could be useful.
This also applies to a huge number of Wikipedia categories (the non subjective ones). It would be extremely useful to have queries describing them attached to the Wikidata items for the categories.
On 24 August 2016 at 02:31, Ananth Subray ananth.subray@gmail.com wrote:
मा
From: Stas Malyshev smalyshev@wikimedia.org Sent: 24-08-2016 12:33 AM To: Discussion list for the Wikidata project. wikidata@lists.wikimedia.org Subject: Re: [Wikidata] A property to exemplify SPARQL queries associated witha property
Hi!
Relaying a question from a brief discussion on Twitter [1], I am curious to hear how people feel about the idea of creating a a "SPARQL query example" property for properties, modeled after "Wikidata property example" [2]?
Might be nice, but we need a good way to present the query in the UI (see below).
This would allow people to discover queries that exemplify how the property is used in practice. Does the approach make sense or would it stretch too much the scope of properties of properties? Are there better ways to reference SPARQL examples and bring them closer to their source?
I think it may be a good idea to start thinking about some way of storing queries on Wikidata maybe? On one hand, they are just strings, on the other hand, they are code - like CSS or Javascript - and storing them just as strings may be inconvenient. Maybe .sparql file extension handler like we have for .js and .json and so on?
-- Stas Malyshev smalyshev@wikimedia.org
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
example sparql queries alone can be very helpful but I would suggest that they can be accompanied with a short description explaining what the query does
On Wed, Aug 24, 2016 at 3:21 PM, Navino Evans navino@histropedia.com wrote:
If you could store queries, you could also store queries for each item
that is about a list of things, so that the query returns exactly the things that should be in the list ... could be useful.
This also applies to a huge number of Wikipedia categories (the non subjective ones). It would be extremely useful to have queries describing them attached to the Wikidata items for the categories.
On 24 August 2016 at 02:31, Ananth Subray ananth.subray@gmail.com wrote:
मा
From: Stas Malyshev smalyshev@wikimedia.org Sent: 24-08-2016 12:33 AM To: Discussion list for the Wikidata project. wikidata@lists.wikimedia.org Subject: Re: [Wikidata] A property to exemplify SPARQL queries associated witha property
Hi!
Relaying a question from a brief discussion on Twitter [1], I am curious to hear how people feel about the idea of creating a a "SPARQL query example" property for properties, modeled after "Wikidata property example" [2]?
Might be nice, but we need a good way to present the query in the UI (see below).
This would allow people to discover queries that exemplify how the property is used in practice. Does the approach make sense or would it stretch too much the scope of properties of properties? Are there better ways to reference SPARQL examples and bring them closer to their source?
I think it may be a good idea to start thinking about some way of storing queries on Wikidata maybe? On one hand, they are just strings, on the other hand, they are code - like CSS or Javascript - and storing them just as strings may be inconvenient. Maybe .sparql file extension handler like we have for .js and .json and so on?
-- Stas Malyshev smalyshev@wikimedia.org
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
-- ___________________________
The Timeline of Everything
www.histropedia.com
Twitter https://twitter.com/Histropedia Facebo https://www.facebook.com/Histropediaok https://www.facebook.com/Histropedia Google + https://plus.google.com/u/0/b/104484373317792180682/104484373317792180682/posts L http://www.linkedin.com/company/histropedia-ltdinke http://www.linkedin.com/company/histropedia-ltddIn http://www.linkedin.com/company/histropedia-ltd
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Stas:
I think it may be a good idea to start thinking about some way of
storing queries on Wikidata maybe? On one hand, they are just strings, on the other hand, they are code - like CSS or Javascript - and storing them just as strings may be inconvenient. Maybe .sparql file extension handler like we have for .js and .json and so on?
would that imply creating a new data type? This idea could be implemented today with direct links to WDQS but storing the SPARQL query in clear as a property value and using a URI formatter to point to the corresponding services sounds like the right approach.
On Wed, Aug 24, 2016 at 6:18 AM, Dimitris Kontokostas jimkont@gmail.com wrote:
example sparql queries alone can be very helpful but I would suggest that they can be accompanied with a short description explaining what the query does
On Wed, Aug 24, 2016 at 3:21 PM, Navino Evans navino@histropedia.com wrote:
If you could store queries, you could also store queries for each item
that is about a list of things, so that the query returns exactly the things that should be in the list ... could be useful.
This also applies to a huge number of Wikipedia categories (the non subjective ones). It would be extremely useful to have queries describing them attached to the Wikidata items for the categories.
On 24 August 2016 at 02:31, Ananth Subray ananth.subray@gmail.com wrote:
मा
From: Stas Malyshev smalyshev@wikimedia.org Sent: 24-08-2016 12:33 AM To: Discussion list for the Wikidata project. wikidata@lists.wikimedia.org Subject: Re: [Wikidata] A property to exemplify SPARQL queries associated witha property
Hi!
Relaying a question from a brief discussion on Twitter [1], I am
curious
to hear how people feel about the idea of creating a a "SPARQL query example" property for properties, modeled after "Wikidata property example" [2]?
Might be nice, but we need a good way to present the query in the UI (see below).
This would allow people to discover queries that exemplify how the property is used in practice. Does the approach make sense or would it stretch too much the scope of properties of properties? Are there
better
ways to reference SPARQL examples and bring them closer to their
source?
I think it may be a good idea to start thinking about some way of storing queries on Wikidata maybe? On one hand, they are just strings, on the other hand, they are code - like CSS or Javascript - and storing them just as strings may be inconvenient. Maybe .sparql file extension handler like we have for .js and .json and so on?
-- Stas Malyshev smalyshev@wikimedia.org
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
-- ___________________________
The Timeline of Everything
www.histropedia.com
Twitter https://twitter.com/Histropedia Facebo https://www.facebook.com/Histropediaok https://www.facebook.com/Histropedia Google + https://plus.google.com/u/0/b/104484373317792180682/104484373317792180682/posts L http://www.linkedin.com/company/histropedia-ltdinke http://www.linkedin.com/company/histropedia-ltddIn http://www.linkedin.com/company/histropedia-ltd
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
-- Kontokostas Dimitris
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Hoi, For many categories we have exactly that in Reasonator. This functionality is based on "is a list of". It functions not for all categories or all content for a category. Wikidata often shows more data particularly when the categories from "other" Wikipedias have been harvested.
It would be relatively easy to continuously harvest data from Wikipedias based on such categories. Thanks, GerardM
https://tools.wmflabs.org/reasonator/?q=Q8328346
On 24 August 2016 at 14:21, Navino Evans navino@histropedia.com wrote:
If you could store queries, you could also store queries for each item
that is about a list of things, so that the query returns exactly the things that should be in the list ... could be useful.
This also applies to a huge number of Wikipedia categories (the non subjective ones). It would be extremely useful to have queries describing them attached to the Wikidata items for the categories.
On 24 August 2016 at 02:31, Ananth Subray ananth.subray@gmail.com wrote:
मा
From: Stas Malyshev smalyshev@wikimedia.org Sent: 24-08-2016 12:33 AM To: Discussion list for the Wikidata project. wikidata@lists.wikimedia.org Subject: Re: [Wikidata] A property to exemplify SPARQL queries associated witha property
Hi!
Relaying a question from a brief discussion on Twitter [1], I am curious to hear how people feel about the idea of creating a a "SPARQL query example" property for properties, modeled after "Wikidata property example" [2]?
Might be nice, but we need a good way to present the query in the UI (see below).
This would allow people to discover queries that exemplify how the property is used in practice. Does the approach make sense or would it stretch too much the scope of properties of properties? Are there better ways to reference SPARQL examples and bring them closer to their source?
I think it may be a good idea to start thinking about some way of storing queries on Wikidata maybe? On one hand, they are just strings, on the other hand, they are code - like CSS or Javascript - and storing them just as strings may be inconvenient. Maybe .sparql file extension handler like we have for .js and .json and so on?
-- Stas Malyshev smalyshev@wikimedia.org
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
-- ___________________________
The Timeline of Everything
www.histropedia.com
Twitter https://twitter.com/Histropedia Facebo https://www.facebook.com/Histropediaok https://www.facebook.com/Histropedia Google + https://plus.google.com/u/0/b/104484373317792180682/104484373317792180682/posts L http://www.linkedin.com/company/histropedia-ltdinke http://www.linkedin.com/company/histropedia-ltddIn http://www.linkedin.com/company/histropedia-ltd
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
On 25.08.2016 07:40, Gerard Meijssen wrote:
Hoi, For many categories we have exactly that in Reasonator. This functionality is based on "is a list of".
Yes, I was thinking of this when making this proposal. The thing is that "is a list of" is not a very powerful way to describe lists. It can only do very simple things. Examples like the "list of inventors killed by their own invention", which are easy to do in SPARQL, are not possible there.
I should add that there are also problems with having arbitrary SPARQL queries. They are on the other end of the sprectrum from where "is a list of" is: they can express too much details (sorting order, label recall, query optimiser settings, etc.). When using SPARQL for list descriptions, the community should try to use the simplest query possible without any extras for formatting and sorting, or it will again be hard to use this.
Markus
It functions not for all categories or all content for a category. Wikidata often shows more data particularly when the categories from "other" Wikipedias have been harvested.
It would be relatively easy to continuously harvest data from Wikipedias based on such categories. Thanks, GerardM
https://tools.wmflabs.org/reasonator/?q=Q8328346
On 24 August 2016 at 14:21, Navino Evans <navino@histropedia.com mailto:navino@histropedia.com> wrote:
If you could store queries, you could also store queries for each item that is about a list of things, so that the query returns exactly the things that should be in the list ... could be useful. This also applies to a huge number of Wikipedia categories (the non subjective ones). It would be extremely useful to have queries describing them attached to the Wikidata items for the categories. On 24 August 2016 at 02:31, Ananth Subray <ananth.subray@gmail.com <mailto:ananth.subray@gmail.com>> wrote: मा ------------------------------------------------------------------------ From: Stas Malyshev <mailto:smalyshev@wikimedia.org> Sent: 24-08-2016 12:33 AM To: Discussion list for the Wikidata project. <mailto:wikidata@lists.wikimedia.org> Subject: Re: [Wikidata] A property to exemplify SPARQL queries associated witha property Hi! > Relaying a question from a brief discussion on Twitter [1], I am curious > to hear how people feel about the idea of creating a a "SPARQL query > example" property for properties, modeled after "Wikidata property > example" [2]? Might be nice, but we need a good way to present the query in the UI (see below). > This would allow people to discover queries that exemplify how the > property is used in practice. Does the approach make sense or would it > stretch too much the scope of properties of properties? Are there better > ways to reference SPARQL examples and bring them closer to their source? I think it may be a good idea to start thinking about some way of storing queries on Wikidata maybe? On one hand, they are just strings, on the other hand, they are code - like CSS or Javascript - and storing them just as strings may be inconvenient. Maybe .sparql file extension handler like we have for .js and .json and so on? -- Stas Malyshev smalyshev@wikimedia.org <mailto:smalyshev@wikimedia.org> _______________________________________________ Wikidata mailing list Wikidata@lists.wikimedia.org <mailto:Wikidata@lists.wikimedia.org> https://lists.wikimedia.org/mailman/listinfo/wikidata <https://lists.wikimedia.org/mailman/listinfo/wikidata> _______________________________________________ Wikidata mailing list Wikidata@lists.wikimedia.org <mailto:Wikidata@lists.wikimedia.org> https://lists.wikimedia.org/mailman/listinfo/wikidata <https://lists.wikimedia.org/mailman/listinfo/wikidata> -- ___________________________ The Timeline of Everything www.histropedia.com <http://www.histropedia.com/> Twitter <https://twitter.com/Histropedia> Facebo <https://www.facebook.com/Histropedia>ok <https://www.facebook.com/Histropedia> Google + <https://plus.google.com/u/0/b/104484373317792180682/104484373317792180682/posts> L <http://www.linkedin.com/company/histropedia-ltd>inke <http://www.linkedin.com/company/histropedia-ltd>dIn <http://www.linkedin.com/company/histropedia-ltd> _______________________________________________ Wikidata mailing list Wikidata@lists.wikimedia.org <mailto:Wikidata@lists.wikimedia.org> https://lists.wikimedia.org/mailman/listinfo/wikidata <https://lists.wikimedia.org/mailman/listinfo/wikidata>
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Hoi, It is particularly interesting to do this for categories or lists. In this way it is immediately obvious that queries are more inclusive than categories or lists. But that is not the only opportunity. When you consider the best practice that Reasonator offers, you will find that it show all the relations that exists to the item in question. So for an award it will show all the items that have "award received" for instance. Really useful as it also sorts them by date when there is a qualifier with "point in time" for it.
It would be good if Wikidata would consider these best practices. Thanks, GerardM
On 25 August 2016 at 08:37, Markus Kroetzsch <markus.kroetzsch@tu-dresden.de
wrote:
On 25.08.2016 07:40, Gerard Meijssen wrote:
Hoi, For many categories we have exactly that in Reasonator. This functionality is based on "is a list of".
Yes, I was thinking of this when making this proposal. The thing is that "is a list of" is not a very powerful way to describe lists. It can only do very simple things. Examples like the "list of inventors killed by their own invention", which are easy to do in SPARQL, are not possible there.
I should add that there are also problems with having arbitrary SPARQL queries. They are on the other end of the sprectrum from where "is a list of" is: they can express too much details (sorting order, label recall, query optimiser settings, etc.). When using SPARQL for list descriptions, the community should try to use the simplest query possible without any extras for formatting and sorting, or it will again be hard to use this.
Markus
It functions not for all
categories or all content for a category. Wikidata often shows more data particularly when the categories from "other" Wikipedias have been harvested.
It would be relatively easy to continuously harvest data from Wikipedias based on such categories. Thanks, GerardM
https://tools.wmflabs.org/reasonator/?q=Q8328346
On 24 August 2016 at 14:21, Navino Evans <navino@histropedia.com mailto:navino@histropedia.com> wrote:
If you could store queries, you could also store queries for each item that is about a list of things, so that the query returns exactly the things that should be in the list ... could be useful. This also applies to a huge number of Wikipedia categories (the non subjective ones). It would be extremely useful to have queries describing them attached to the Wikidata items for the categories. On 24 August 2016 at 02:31, Ananth Subray <ananth.subray@gmail.com <mailto:ananth.subray@gmail.com>> wrote: मा ------------------------------------------------------------
From: Stas Malyshev <mailto:smalyshev@wikimedia.org> Sent: 24-08-2016 12:33 AM To: Discussion list for the Wikidata project. <mailto:wikidata@lists.wikimedia.org> Subject: Re: [Wikidata] A property to exemplify SPARQL queries associated witha property Hi! > Relaying a question from a brief discussion on Twitter [1], I am curious > to hear how people feel about the idea of creating a a "SPARQL query > example" property for properties, modeled after "Wikidata
property > example" [2]?
Might be nice, but we need a good way to present the query in the
UI (see below).
> This would allow people to discover queries that exemplify how
the > property is used in practice. Does the approach make sense or would it > stretch too much the scope of properties of properties? Are there better > ways to reference SPARQL examples and bring them closer to their source?
I think it may be a good idea to start thinking about some way of storing queries on Wikidata maybe? On one hand, they are just strings, on the other hand, they are code - like CSS or Javascript - and storing them just as strings may be inconvenient. Maybe .sparql file extension handler like we have for .js and .json and so on? -- Stas Malyshev smalyshev@wikimedia.org <mailto:smalyshev@wikimedia.org> _______________________________________________ Wikidata mailing list Wikidata@lists.wikimedia.org <mailto:Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata <https://lists.wikimedia.org/mailman/listinfo/wikidata> _______________________________________________ Wikidata mailing list Wikidata@lists.wikimedia.org <mailto:Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata <https://lists.wikimedia.org/mailman/listinfo/wikidata> -- ___________________________ The Timeline of Everything www.histropedia.com <http://www.histropedia.com/> Twitter <https://twitter.com/Histropedia> Facebo <https://www.facebook.com/Histropedia>ok <https://www.facebook.com/Histropedia> Google + <https://plus.google.com/u/0/b/104484373317792180682/1044843
73317792180682/posts> L http://www.linkedin.com/company/histropedia-ltdinke http://www.linkedin.com/company/histropedia-ltddIn http://www.linkedin.com/company/histropedia-ltd
_______________________________________________ Wikidata mailing list Wikidata@lists.wikimedia.org <mailto:Wikidata@lists.wikimedia.org> https://lists.wikimedia.org/mailman/listinfo/wikidata <https://lists.wikimedia.org/mailman/listinfo/wikidata>
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Yes, I think this is a very good idea - a simple query to "generate items which fit the scope of this list" or "generate items which fit the scope of this category". It could be very useful for maintenance purposes (finding items in the list/category that don't have the right properties and flagging them). As they are directly linked to the topic, having them on the item page makes sense.
The more general question of "example queries for a property" (as in Dario's original suggestion) feels like it would be more at home on the talkpage than the property page - using the talkpage gives space for complexity and alternatives and commentary, and it fits very well alongside the constraints, which are also recorded there.
Andrew.
On 24 August 2016 at 13:21, Navino Evans navino@histropedia.com wrote:
If you could store queries, you could also store queries for each item
that is about a list of things, so that the query returns exactly the things that should be in the list ... could be useful.
This also applies to a huge number of Wikipedia categories (the non subjective ones). It would be extremely useful to have queries describing them attached to the Wikidata items for the categories.
On 24 August 2016 at 02:31, Ananth Subray ananth.subray@gmail.com wrote:
मा
From: Stas Malyshev smalyshev@wikimedia.org Sent: 24-08-2016 12:33 AM To: Discussion list for the Wikidata project. wikidata@lists.wikimedia.org Subject: Re: [Wikidata] A property to exemplify SPARQL queries associated witha property
Hi!
Relaying a question from a brief discussion on Twitter [1], I am curious to hear how people feel about the idea of creating a a "SPARQL query example" property for properties, modeled after "Wikidata property example" [2]?
Might be nice, but we need a good way to present the query in the UI (see below).
This would allow people to discover queries that exemplify how the property is used in practice. Does the approach make sense or would it stretch too much the scope of properties of properties? Are there better ways to reference SPARQL examples and bring them closer to their source?
I think it may be a good idea to start thinking about some way of storing queries on Wikidata maybe? On one hand, they are just strings, on the other hand, they are code - like CSS or Javascript - and storing them just as strings may be inconvenient. Maybe .sparql file extension handler like we have for .js and .json and so on?
-- Stas Malyshev smalyshev@wikimedia.org
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
-- ___________________________
The Timeline of Everything
www.histropedia.com
Twitter https://twitter.com/Histropedia Facebo https://www.facebook.com/Histropediaok https://www.facebook.com/Histropedia Google + https://plus.google.com/u/0/b/104484373317792180682/104484373317792180682/posts L http://www.linkedin.com/company/histropedia-ltdinke http://www.linkedin.com/company/histropedia-ltddIn http://www.linkedin.com/company/histropedia-ltd
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Dario Taraborelli, 23/08/2016 20:35:
would it stretch too much the scope of properties of properties?
One can always use the talk page, like with all the templates documenting usage and monitoring.
Nemo
Hi!
One can always use the talk page, like with all the templates documenting usage and monitoring.
True. With additional benefit that you can use nice templates like SPARQL and SPARQL2 to display the queries.
One can always use the talk page, like with all the templates documenting usage and monitoring.
True. With additional benefit that you can use nice templates like SPARQL and SPARQL2 to display the queries.
talk page templates are definitely a valid alternative. The main benefit I see in storing SPARQL query examples via a property of a property is that they'd become discoverable via SPARQL themselves, so for example you could allow users to find interested queries limited to a set of properties with given characteristics (basically allowing filtering on all properties of properties).
Might be nice, but we need a good way to present the query in the UI (see
below).
Agreed. I imagine, from a design perspective, these "helper" properties (like P1855) that are not really part of the data model could be grouped together and presented via a dedicated UI element, like we do for identifiers.
I think it may be a good idea to start thinking about some way of storing queries on Wikidata maybe? On one hand, they are just strings, on the other hand, they are code - like CSS or Javascript - and storing them just as strings may be inconvenient. Maybe .sparql file extension handler like we have for .js and .json and so on?
If you could store queries, you could also store queries for each item that
is about a list of things, so that the query returns exactly the things that should be in the list ... could be useful.
I hadn't thought of this use case, but I too see how it might be useful. Are there other good examples of properties that take code snippets as a value?