Modified subquery to handle >16TB databases.
Merge pull request #32 from puppymusic/bugfix_LargeDB

Modified subquery to handle >16TB databases.