Hello Pierre,

In the next release of Virtuoso Open Source that should happen during
this weekend, the following query will work:

SELECT count (?g) ?g WHERE { graph ?g {?s ?p ?o}} order by (count(?g))

Note parentheses around (count(?g)) after order by. 
Depending on version you're using now, the query with fixed syntax may
work as well. It may be convenient for you to specify server version and
copy error message verbatim so you can get more accurate hints. It could
be convenient to set CallstackOnException=2 in [Parameters] section of
your virtuoso configuration file (virtuoso.ini or the like) so you get
place where the error is signalled while you debug your application.
(but set CallstackOnException=0 for publicly available installations to
hide internals from attackers)

Best Regards,
Ivan Mikhailov,
OpenLink Software.

On Fri, 2008-02-01 at 15:12 +0100, Pierre De Wilde wrote:
> Hi,
> 
>  
> I would like to get a list of named graphs ordered by number of
> triples per graph. So, I try (without success):
> 
> 
> sparql select count(?g) ?g where {graph ?g {?s ?p ?o}} order by
> count(?g);
> 
> 
> Is there a way to sort on aggregates in Virtuoso SPARQL?
> 
> 
> 
> 
> Pierre
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________ Virtuoso-users mailing list 
> Virtuoso-users@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users


Reply via email to