The question is for the example table structure:
mytable
fielda, fieldb
val1 valx
val2 valy
val3 valz
val1 vala
I want to select from mytable with a query:
fielda, fieldb
val1 valx
val1 vala
basically select * from table where fielda is duplicated.
then with a different query select from mytable
fielda, fieldb
val2 valy
val3 valz
val1 on fielda was encountered as a duplicate therefore it wasn’t selected and the rest were.
This query sorts the table which duplicated
fieldAare on top of the list.This query selects duplicate records only.
and this one, selects records which are not on the second query (above)