User Tools

Site Tools


sample_user_queries

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
sample_user_queries [2012/10/19 20:44] danielsample_user_queries [2012/10/19 20:46] daniel
Line 26: Line 26:
 </code> </code>
  
-Messages that have a lot of recipients (example: more than 20)+Messages that have a lot of recipients in the //To// field (example: more than 20)
 <code sql> <code sql>
 SELECT mail_id FROM mail_addresses WHERE addr_type=2 GROUP BY mail_id having count(*)>20 SELECT mail_id FROM mail_addresses WHERE addr_type=2 GROUP BY mail_id having count(*)>20
 +</code>
 +
 +Messages that have a lot of recipients in the //To// or //Cc// fields (example: more than 20)
 +<code sql>
 +SELECT mail_id FROM mail_addresses WHERE addr_type in (2,3) GROUP BY mail_id having count(*)>20
 </code> </code>
  
sample_user_queries.txt · Last modified: 2014/08/04 11:23 by daniel