Good afternoon, I need help to be able to "inactivate" a line, for my result these lines are duplicated, and I only need 1 of them, I have several examples like this, this is only 1 of the cases
SELECT p.cd_key, r.nm_lane, to_char(r.dt_record_pass, 'yyyyMMdd HH24:MI:SS'),
r.ds_license_plate, r.vl_speed FROM tbgen_rdo r, tbgen_processor p, tbgen_equipment e
WHERE p.id_processor = r.id_processor AND p.id_equipment = e.id_equipment
and r.dt_record_pass between '2021-09-27 10:13:00' and '2021-09-27 10:13:01' and
r.ds_license_plate ='KRR1000'
resulted:
| cd_key | nm_lane | to_char | ds_license_plate | vl_speed |
|---|---|---|---|---|
| 1516617158432 | A | 20210927 10:13:00 | KRR1000 | 33 |
| 1516617158432 | B | 20210927 10:13:00 | KRR1000 | 34 |
I consider this value doubled because I look only at the ds_license_plate and the date (to_char) vl_speed and nm_lane don't matter in this case, I only need to bring 1 record of this
I always consider the shortest lane, in this case lane A