Table1
t1Id
t1Name
Table2
t2Id
t2Name
Table1_Table2_Mapping
t1Id
t2Id
In this below query, as a second column in output, I want the t2Name Column where Having COUNT(t1Id) = 1 and I want some fixed value (‘Common’) where Having COUNT(t1Id) > 1
Select t1Id
from Table1_Table2_Mapping
Group By t1Id
Thanks in advance.
1 Answer