Advertisement
Guest User

Untitled

a guest
Aug 26th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. select a.id adjustmentid, a.created_at adjustmentCreatedAt, b.id orderid, CONCAT(b.date, " ", b.time) orderDateTime, DATEDIFF(a.created_at, CONCAT(b.date, " ", b.time)) daysToCreateAdjustment from hd_rental_service_adjustment a
  2. inner join hd_rental_service b on a.hd_rental_service_id = b.id
  3. where a.id not in (
  4. select hd_rental_service_adjustment_id from driver_balance where hd_rental_service_adjustment_id is not null
  5. )
  6. and a.driver_amount is not null
  7. and b.status not in (0, 1, 5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement