Created
September 12, 2017 01:24
-
-
Save douglascayers/d79cc215e9924f096cad9605609cacad to your computer and use it in GitHub Desktop.
Easy way to count attachments or notes by their parent object type. https://twitter.com/DouglasCAyers/status/885892375108866048
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| parent.type, | |
| count(id), | |
| sum(bodyLength) | |
| FROM | |
| Attachment | |
| GROUP BY | |
| parent.type |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment