Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select count(*) as aggregate from `notifications` inner join `notifiables` on `notifications`.`id` = `notifiables`.`notification_id` left join `users` on `notifiables`.`notifiable_id` = `users`.`id` and `notifiables`.`notifiable_id` = '1' and `notifiables`.`notifiable_type` = 'App\Models\User' left join `clients` on `notifiables`.`notifiable_id` = `clients`.`id` and `notifiables`.`notifiable_id` = '1' and `notifiables`.`notifiable_type` = 'Client' where `notifiables`.`notice_time` <= '2015-08-03 21:15:22' group by `notifications`.`id` order by `notifiables`.`notice_time` desc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement