select * from notificaciones where {tipo} id_usuarios={id} order by vista desc, id desc