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

    i am dividing in the case statement.

    It would help if you could describe what you trying to do in some more detail,

    i am trying to compare records in the query.

    if record 1 says 14.50 i want it to search the next row to see if it has the same value

    including providing the DDL scripts for the table, and INSERT statements to insert some test data into that table.

    there are no scripts to the table, no insert statements, this is querying a table for data not inserting into the table