POST _opendistro/_sql { "query":"select archival_id,title,group_concat(s_object_id) from tdr_documents where s_object_path like'%接收管理库/馆藏档案%'and s_object_type in ('da_record','da_volume') and archival_id like 'J001-06%' and archival_id is not null and title is not null group by archival_id,title HAVING COUNT(s_object_id)>1 order by archival_id" }
时间: 2024-04-07 15:31:31 浏览: 94
aspace_preservica_db:一个报告数据库,用于整理和处理ArchivesSpace和Preservica元数据
Thank you for providing the complete SQL query. It seems that you are querying the "tdr_documents" table and selecting the "archival_id", "title", and a concatenated list of "s_object_id" values.
The query is filtering the results by the "s_object_path" column, selecting only the rows where the path contains the string '%接收管理库/馆藏档案%', and the "s_object_type" column, selecting only the rows where the type is either 'da_record' or 'da_volume'.
The query is further filtering the results to only include rows where the "archival_id" column starts with 'J001-06', is not null, and the "title" column is not null.
The results are then grouped by "archival_id" and "title" and only rows with a count of "s_object_id" greater than 1 are kept. Finally, the results are ordered by "archival_id".
I hope this helps! Let me know if you have any further questions.
阅读全文