Forum Discussion

smogger914's avatar
9 years ago

How to query messages with no views?

Hey,   I want to create a nightly process that will pick up all unviewed messages and perform some task in an external system. What would be the best way to query messages with 0 views? I was looki...
  • smogger914's avatar
    9 years ago

    Found it in the docs somewhere: 

     

    SELECT * FROM messages WHERE replies.count(*)=0 AND depth=0