getting one record difference form department group by and all columns group by
I'm running a query with two different collums list -
one - col1, col2, col3, col4 and a businsess unit name group by all these columns
two - business unit name group by business unit
but i'm getting 1 record difference b/w them, ideally it should give same sum/count
could someone pls help me with this?
below are the queries -
Output is 6
SELECT
SUM(
CASE
WHEN T5.Column_1 LIKE 'X%' THEN
T6.Column_2
END
) AS c1,
T1.business_unit_name AS c2
FROM
Table_A T1,
Table_B T2 ,
Table_A T3,
Table_C T4,
Table_D T5,