Last created documents
SELECT * FROM Document ORDER BY creation_date DESC
Last created documents by user
SELECT * FROM Document WHERE author = 'foo' ORDER BY creation_date DESC
Last created documents by me
SELECT * FROM Document WHERE author = CURRENT_USER ORDER BY creation_date DESC
Documents created today
SELECT * FROM Document WHERE creation_date > TODAY ORDER BY creation_date DESC
Documents modified from yesterday
SELECT * FROM Document WHERE modified_date > YESTERDAY ORDER BY creation_date DESC
Documents with a metadata date value between yesterday and just now
SELECT * FROM Document WHERE metadata.datetime_field BETWEEN YESTERDAY AND NOW
You will need to replace 'metadata.datetime_field' with the API name of the field to query.
Documents with a metadata datetime value between 2 weeks
SELECT * FROM Document WHERE metadata.expiration_date BETWEEN NOW(-1w) AND NOW(1w)
You will need to replace 'metadata.expiration_date' with the API name of the field to query.
Documents created in January 2024
SELECT * FROM Document WHERE creation_date > '2024-01-01' AND creation_date < '2024-01-31'
Documents with datetime field set to value in March 2024
SELECT dc:title FROM Document WHERE metadata.datetime_field >= '2024-03-01 00:00:00' AND metadata.document_datetime_field <= '2024-03-31 23:59:59'
You will need to replace 'metadata.datetime_field' with the API name of the field to query.
Comments
0 comments
Please sign in to leave a comment.