Created
November 10, 2009 21:09
-
-
Save fixlr/231270 to your computer and use it in GitHub Desktop.
DSpace: Determine size (in bytes) of a community (top of 3 tiers)
This file contains 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 SUM(size_bytes) | |
FROM bitstream, bundle, bundle2bitstream, item2bundle | |
WHERE item2bundle.bundle_id = bundle2bitstream.bundle_id | |
AND bundle2bitstream.bitstream_id = bitstream.bitstream_id | |
AND item2bundle.bundle_id = bundle.bundle_id | |
AND bundle.name = 'ORIGINAL' | |
AND item2bundle.item_id = ANY( | |
SELECT item_id | |
FROM item | |
WHERE owning_collection = ANY( | |
SELECT collection_id | |
FROM community2collection | |
WHERE community_id = ANY( | |
SELECT child_comm_id | |
FROM community2community | |
WHERE parent_comm_id = 19) | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment