Query Advanced Statistics in SendGrid.
By default, the Type of the statistics retrieved is Geo. Additionally, you need to specify a time span to select from this table. If you do not specify one, a default range starting from 2016-01-01 till actual date will be used. The Date column supports the >, <, =, <=, and >= operators.
SELECT * FROM AdvancedStats'
SELECT * FROM AdvancedStats WHERE Date > '2016-01-01' AND Date < '2016-03-30'
To query email statistics by browser.
SELECT * FROM AdvancedStats WHERE Type='browser'
To query Email Statistics for Categories, name of the category is required.
SELECT * FROM AdvancedStats WHERE Type='category' AND Name='news'
To query email statistics by device type.
SELECT * FROM AdvancedStats WHERE Type='device'
|Type||String||The type of the statistic. Avaible values (categorie, device, client, mailbox_provider, browser, subuser)|
|Name||String||The name of the statistic.|
|Date||Date||The time the global statistic was created.|
|Blocks||Integer||The number of emails that were not allowed to be delivered by ISPs.|
|Drops||Integer||The number of emails automatically dropped by SendGrid because they appear on one of the suppression lists.|
|Bounces||Integer||The number of emails that bounced instead of being delivered.|
|Clicks||Integer||The number of links clicked in your emails.|
|Deferred||Integer||The number of emails temporarily refused by the receiving server.|
|Delivered||Integer||The number of emails confirmed delivered.|
|InvalidEmails||Integer||The number of emails with a malformed address or reported as invalid by the receiving server.|
|Opens||Integer||The number of times your emails were opened by recipients.|
|Processed||Integer||The number of emails pushed to SendGrid.|
|Requests||Integer||The number of emails you requested to send via SendGrid.|
|SpamReportDrops||Integer||The number of emails automatically dropped because the emails were marked as spam by the recipient.|
|SpamReports||Integer||The number of emails marked as spam by recipients.|
|UniqueClicks||Integer||The number of unique recipients who clicked links in your emails.|
|UniqueOpens||Integer||The number of unique recipients who opened your emails.|
|UnsubscribeDrops||Integer||The number of emails in this category dropped by SendGrid because the recipient unsubscribed from your emails.|
|Unsubscribes||Integer||The number of recipients who unsubscribed from your emails.|