PL/SQL (MOSC)

MOSC Banner

SQL: Aggregate(s) for rows not being returned

edited Sep 29, 2009 7:55PM in PL/SQL (MOSC) 9 commentsAnswered ✓
I need some help with a SQL statement.  The query is an aggregation of detail values, but I need to ensure that I'm getting aggregations for rows that are not being returned in the query.  For example,
--ROADS
SELECT "principal_landuse",
       LTRIM(TO_CHAR(SUM(DECODE("county_quadrant", 'NORTH', "fee_amount", 0)), '$999G999G999D99')) AS "north_total",
       LTRIM(TO_CHAR(SUM(DECODE("county_quadrant", 'CENTRAL', "fee_amount", 0)), '$999G999G999D99')) AS "central_total",
       LTRIM(TO_CHAR(SUM(DECODE("county_quadrant", 'PALMER RANCH', "fee_amount", 0)), '$999G999G999D99')) AS "palmer_total",
       LTRIM(TO_CHAR(SUM(DECODE("county_quadrant", 'SOUTH', "fee_amount", 0)), '$999G999G999D99')) AS "south_total",

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center