zeusbart
9/30/2019 - 11:21 PM

cancelaciones menores a 20

SELECT pending_payment.appointment_id,pending_payment.create_dt,pending_payment.amount,slave.email,slave.phone,slave.first_name,slave.last_name  FROM `pending_payment` 
INNER JOIN slave on pending_payment.slave_id=slave.slave_id
where pending_payment.create_dt>"2019-01-01" and pending_payment.create_dt<"2019-09-01" and pending_payment.status=0 and  pending_payment.amount<=20 and slave.status!=5
ORDER BY `pending_payment`.`amount`  ASC