Added join condition for Having_Count()