Hi All,
Hope I find you well. I am interested in establishing the number of items
deposited each year in our IR. Is there anyone out there who had done that
and can provide me with the SQL statement to do that.
Regards,
Admire
Hello Admire,
assuming that you count as deposited, when the item was publically
available (reached the in archive status) the sql for this year would be:
select count(item_id) from metadatavalue where metadata_field_id=12 and
text_value like '2010%';
metadata_field_id = 12 refers to
Hi
The following should work (on Postgres):
SELECT to_char(date_trunc('year', t1.ts), '') AS year, count(*) FROM
(SELECT to_timestamp(text_value, '-MM-DD') AS ts FROM metadatavalue
WHERE metadata_field_id = 12) t1 GROUP BY date_trunc('year', t1.ts);
George
On 12/10/10 16:47, Admire
3 matches
Mail list logo