Remove double records. add group by