Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --3.2 Each technician is linked to the “Traxxeo install” event. It is possible that there is no bug and
- --some of our technicians are using the application wrong hence they are generating more
- --than one installation event for a vehicle. Can you check if this is the case?
- SELECT vehicle_id, CASE WHEN nn> 1 THEN 'Same technicians'
- ELSE 'Not the same technicians'
- END , person_id
- FROM(
- SELECT vehicle_id, person_id, COUNT(1) nn
- FROM generic_event g
- WHERE name LIKE 'Traxxeo install'
- AND vehicle_id IN (118735,118287,118045,118452,107668,117582,118456,117804,117926,117808,116703,
- 117494,118920,116524,117841,118535,117802,118375,116914,117305,117992,118192,118267,117418,117637,
- 117599,117487,118230,117943,118237,117560,117450,117638,116651,117149,116912,119337,119112,116673,
- 117352,117461,119208,118438,118065,117891,118330,118236,118205,117163,117208,116426,117316,116652,116043,117481,119108)
- GROUP BY vehicle_id, person_id
- ORDER BY 1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement