• You have a GROUP BY clause but since you have no aggregate functions its only effect is to eliminate duplicate rows.

    It would help if you could describe what you trying to do in some more detail, including providing the DDL scripts for the table, and INSERT statements to insert some test data into that table.