Это мой код. Я использовал агрегацию SUM (), но все равно не получилось с ошибкой «ORA-00979: не выражение GROUP BY». Может кто-нибудь помочь мне разобраться?
SELECT g.long_description as geography,
p.long_description as product,
t.long_description as "time",
SUM(s.sales) as sales,
SUM(s.SALES_YTD) as ytd
FROM product_standard_view p, geography_regional_view g,
time_calendar_view t,
sales_cube_view s,
channel_sales_channel_view c
WHERE p.dim_key = s.product
AND p.parent = 'ALL_PRODUCTS'
AND g.dim_key = s.geography
AND g.parent = 'ALL_REGIONS'
AND c.dim_key = s.channel
AND c.parent = 'ALL_CHANNELS'
AND t.dim_key = s.time
AND t.long_description IN ('CY2009', 'Q3-CY2009', 'Nov-2009')
GROUP BY t.long_description;