sql_analysis
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
sql_analysis [2010/09/25 01:30] – daniel | sql_analysis [2012/01/28 02:55] – daniel | ||
---|---|---|---|
Line 53: | Line 53: | ||
select h1.mail_id from header h1, header h2 where h1.lines=h2.lines and h1.mail_id > h2.mail_id | select h1.mail_id from header h1, header h2 where h1.lines=h2.lines and h1.mail_id > h2.mail_id | ||
</ | </ | ||
+ | |||
+ | ====== Messages with specific attachment types ====== | ||
+ | To retrieve all messages containing pdf files or any image file: | ||
+ | <code sql> | ||
+ | select distinct mail_id FROM attachments WHERE content_type=' | ||
+ | </ | ||
+ | |||
+ | ====== Messages sent or received today ====== | ||
+ | < | ||
+ | select mail_id from mail where msg_date> | ||
+ | </ | ||
+ | |||
sql_analysis.txt · Last modified: 2019/01/24 17:55 by daniel