db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Enyedi <robert.eny...@intland.com>
Subject How to emulate multiple DISTINCT aggregates?
Date Mon, 28 Aug 2006 15:58:15 GMT
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

Mime
View raw message