/*
    Replace :asset_store_path, :handle and :sequence_id
*/
select 
  ':asset_store_path' || 
  substring(bit.internal_id, 1, 2) || '/' || 
  substring(bit.internal_id, 3, 2) || '/' || 
  substring(bit.internal_id, 5, 2) || '/' || 
  bit.internal_id 
from bitstream bit 
inner join bundle2bitstream b2b on b2b.bitstream_id=bit.bitstream_id 
inner join bundle b on b.bundle_id=b2b.bundle_id and b.name='ORIGINAL' 
inner join item2bundle i2b on i2b.bundle_id=b.bundle_id 
inner join handle h on i2b.item_id=h.resource_id 
where h.handle=':handle' and bit.sequence_id =:sequence_id;