-
Notifications
You must be signed in to change notification settings - Fork 372
Open
Description
Hi, sorry but I'm somehow confused on how to exactly do query condition for IF and IS NULL
I have this particular SQL query but not sure how to convert it to ORM.
WHERE
has_sent = 0
AND
messenger_messages.create_date >= IF(users.last_login IS NULL, ( Curdate() - interval 1 month ), users.last_login + interval 5 minute)
Hope you can help. Thanks!
Metadata
Metadata
Assignees
Labels
No labels