Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT v.numberplate, MIN(vd.gps_full_date)
- FROM vehicle v,
- vo_vehicle_category vc,
- vehicle_owner vo,
- vehicle_data vd,
- oc_poi op,
- vd_poi vp,
- person p
- WHERE vp.vehicle_data_id=vd.vehicle_data_id
- AND vd.person_id=v.person_id
- AND v.vehicle_id=vd.vehicle_id
- AND v.vo_vehicle_category_id=vc.vo_vehicle_category_id
- AND vc.vehicle_owner_id=vo.vehicle_owner_id
- AND vp.poi_id<>p.home_poi_id
- AND p.person_id=v.person_id(+)
- AND vd.gps_full_date = to_date('15-FEB-14')
- AND vo.vehicle_owner_id = 100573
- GROUP BY trunc(vd.gps_full_date), v.numberplate;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement