Hi, I found some useful SQL in the mail list archives for counting items [1]. I'd like to adapt this SQL to exclude "citation-only" items. The easiest way to characterize such items is that they only have a license bitstream/bundle, no other bundles. I'm close to figuring this out on my own, but I have to leave for the day, so, I figured I'd send a quick note to see if anyone might have some SQL they're willing to share?
Here's what I have so far (warning, not valid SQL, just a wild stab at an answer): SELECT count(*) as total_items FROM item i, bitstream b inner join bundle2bitstream b2b ON b.bitstream_id=b2b.bitstream_id inner join item2bundle i2b ON b2b.bundle_id=i2b.bundle_id inner join item i ON i2b.item_id=i.item_id; WHERE i.in_archive = 1 AND b.name != "LICENSE" Chatting about this on IRC with Mark Wood, he pointed me in the direction of the WITH clause [2], which looks interesting, but I can't wrap my head around using it. Yet. --Hardy [1] http://dspace.2283337.n4.nabble.com/Total-item-count-DSpace-1-7-2-XMLUI-td4666869.html [2] http://stackoverflow.com/questions/12552288/sql-with-clause-example ------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees _______________________________________________ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette