I have a situation like,
if I have multiple records exists on column
X
in the tableTAB
then I need to run "Query #1"if I have only one record exists on column
X
in the tableTAB
then I need to run "Query #2"
The selected columns are same but the condition is different.
I tried with case clause but it did not worked.
Is there any way to achieve in Hive ?
Can we use ”Query #” in case clause? If yes please suggest an example.