Created
April 20, 2016 08:25
-
-
Save isido/036373533ab35ef585a3e63bd3ddb790 to your computer and use it in GitHub Desktop.
Select items with certain metadata set
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 a.text_value "uef.solecris.id", b.text_value "dc.title" | |
from ( | |
select resource_id, text_value | |
from metadatavalue | |
where metadata_field_id = ( | |
select metadata_field_id | |
from metadatafieldregistry r, metadataschemaregistry s | |
where s.short_id = 'uef' and r.element = 'solecris' | |
and r.qualifier = 'id' and r.metadata_schema_id = s.metadata_schema_id)) a | |
join ( | |
select resource_id, text_value | |
from metadatavalue | |
where metadata_field_id = ( | |
select metadata_field_id | |
from metadatafieldregistry r, metadataschemaregistry s | |
where s.short_id = 'dc' and r.element = 'title' | |
and r.qualifier is null and r.metadata_schema_id = s.metadata_schema_id)) b | |
on a.resource_id = b.resource_id; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment