Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2015
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. 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