Hi,

When trying to use multiple DISTINCT aggregates in Derby:

/SELECT COUNT(distinct editable), COUNT( distinct visible )
FROM item/

the following error is reported:

/ERROR 42Z02: Multiple DISTINCT aggregates are not supported at this time./

For a simple query one could write:

/SELECT COUNT(distinct editable) AS editable_count, COUNT( (SELECT DISTINCT visible FROM item) )
FROM item/

but this is actually pretty uncomfortable and unmaintainable in a larger query.

Does anyone know an elegant overcome for this Derby limitation?

Thanks,
Robert

Reply via email to