Open simongray opened 2 years ago
Ok, so I have a proof-of-concept going now which simply reuses the current entity page to present either [?p ?s]
triples (inverse relations for ?o
) or [?s ?o]
triples (connections via ?p
), but it suffers from some issues:
https://stackoverflow.com/questions/18212697/aggregating-results-from-sparql-query
A combination of GROUP BY
and GROUP_CONCAT
can be used to group directly in SPARQL. However,
LIMIT
(that only applies to the grouped-by column)http://example.com/resource
in the case of <http://example.com/resource>
.
I asked the following on the #RDF channel on Clojurians Slack:
anybody here have any experience using GROUP BY and GROUP_CONCAT(...) in SPARQL? My use case is returning limited results in alphanumeric order, but each row is a potential one-to-many relationship. Is it possibly more performant to skip grouping and just use ORDER BY along with a bunch of additional queries?
Unfortunately, it seems like GROUP_CONCAT basically just turns groups items into a concatenated string and even removes important information such as the enclosing <...> , which makes it a bit of a hack IMO.
Perhaps I need to stash the changes for now.
It would be beneficial to have an endpoint listing reverse relations for some key-value pair, e.g.
... is a key-value pair of :dn/synset-44357 (samle).
It would be interesting to have a link to a reverse relations page available for each value column, with perhaps some exceptions.