Hi Team,
I am trying to use a simple Group by code as shown, ...But don't need to do a Group BY on ISIN..(Varchar)...But when I remove that...I get error saying not a Groupby function...Can I just do a group by based on first two columns. ?
select distinct G.CLIENT_ID,G.YEARMONTH, D.ISIN,SUM(G.ACCOUNT_CBV) as ACCOUNT_CBV, SUM(G.TOTAL_REVENUES) as TOTAL_REVENUES from GMIS G, DEPOT D where G.CLIENT_ID = D.CLIENT_ID GROUP BY G.CLIENT_ID,G.YEARMONTH,D.ISIN order by Client_ID;
using two queries on the same table is needlessly expensive, even if there are indexes
also, using a left join changes the functionality of the query
Flex Tron
ASKER
The Issue is that the tables have different levels of granularity. In that way, it's always challenging. Will keep researching on this...but sure the answers help a ton.
also, using a left join changes the functionality of the query