Thank you Mark!

metadatafieldregistry was the table i was missing in my query :)

Regards
Meelis


[email protected] kirjutas esmaspäev, 15. detsember 2025 kl 23:31:10 UTC+2:

> On Thu, Dec 11, 2025 at 12:01:47PM +0000, Meelis Lilbok wrote:
> > How to get total count of uploaded files and exclude thumbnails/license 
> files, using sql query?
>
> I think this should work:
>
> SELECT COUNT(*)
> FROM bundle b
> JOIN bundle2bitstream AS b2b ON b2b.bundle_id = b.uuid
> JOIN metadatavalue m ON b.uuid = m.dspace_object_id
> JOIN metadatafieldregistry f USING (metadata_field_id)
> WHERE f.element = 'title'
> AND f.qualifier IS NULL
> AND m.text_value = 'ORIGINAL';
>
> The uploaded files should all be in the ORIGINAL bundle, while the
> license text is in LICENSE and the thumbnails in THUMBNAIL. The name
> of the bundle is in its 'title' metadata field.
>
> -- 
> Mark H. Wood
> Lead Technology Analyst
>
> University Library
> Indiana University Indianapolis
> 755 W. Michigan Street
> Indianapolis, IN 46202
> 317-274-0749 <(317)%20274-0749>
> library.indianapolis.iu.edu
>

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/dspace-tech/62fb001c-449d-4d0a-951d-bb44bfe0216fn%40googlegroups.com.

Reply via email to