Somacon.com: Articles on websites & etc.

§ Home > Index > General Interest

Thunderbird Get Sent Message Count By Week

These instructions show how to get the message count by year and week number from Thunderbird.

Query


select
       strftime('%Y-%W', datetime(date/1000000, 'unixepoch')) AS 'yearWeek'      
      ,count(*) AS countMessages
      ,strftime('%Y', datetime(date/1000000, 'unixepoch')) AS 'year'      
      ,strftime('%W', datetime(date/1000000, 'unixepoch')) AS 'week'
from messages where folderID=119
group by
       strftime('%Y', datetime(date/1000000, 'unixepoch'))      
      ,strftime('%W', datetime(date/1000000, 'unixepoch'))

Notes

The date field is microseconds since the UNIX epoch, so it is basically a unix timestamp multiplied by 1,000,000.

The global-message-db.sqlite file contains data about your email for fast querying and searching.

Helpful link: Thunderbird kung-fu: querying the index for messages.


Created 2013-03-16, Last Modified 2016-12-01, © Shailesh N. Humbad
Disclaimer: This content is provided as-is. The information may be incorrect.