SELECT a.appointment_id,a.created_dt,a.status,a.amount,a.payment_type, w.unique_id,wt.type_name
FROM appointment a
left join master m on m.mas_id = a.mas_id
left join workplace w on m.workplace_assign_id = w.workplace_id
left join workplace_types wt on w.type_id = wt.type_id
WHERE a.status in (9,4) AND
a.payment_type in (1,2) AND a.amount>0
and duration < 2
and a.created_dt > '2018-11-19 00:00:00' AND a.created_dt < '2018-11-26 23:59:59'
ORDER BY a.created_dt ASC