consult range of dates within a join in SQL

0

I need to filter my query for a specific day and along with other ranges within a join, I have this query, I hope someone can help me, thanks.

select r.application as "Fecha transacción", r.id as "Id transacción",
r.type_movement as "Tipo transacción",
p.payment_method_id as "Via de acceso",
(cast(p.amount as double precision) + p.extra_amount) as "Monto total", p.extra_amount as "Comisión",
p.payment_id as "Número de autorización", p.amount as "Monto Deposito",
u.name as "Nombre", u.phone as "Telefóno", u.email as "Mail"
from records as r
inner join payments as p on p.payment_id = r.reference
left join users as u on u.id = r.user_id
order by r.application;
    
asked by Issra Zappa 01.06.2018 в 23:11
source

1 answer

0

If the date is "r.application" and it is in date format. Then you can add the following:

WHERE r.application="2018-06-01"

If it is not in that format, please show us an example of how this record is loaded so we can tell you better than adding.

Also try adding the date () function. That is, it would stay like this:

WHERE date(r.application)="2018-06-01"

Greetings!

    
answered by 01.06.2018 в 23:20