There is no way to do that. SQL is the worst possible way to try to report on Jira data, and you've hit one of the thousands of reasons that it is that it is so bad. The database doesn't bother to record that data.
Try running "du -d1 /<jira home>/attachments" on your Jira server, that will get you a starting number.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.