But for count distinct the concatenation may not work correctly. B(id=1, name="1name") would be treated as a duplicate of B(id=11, name="name").