Table1
t1Id t1Name
Table2
t2Id t2Name
Table1_Table2_Mapping
t1Id t2Id
In this query below, as the second column in the output, I need 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.
source share