[Dspace-tech] Annual submission Rates

2010-10-12 Thread Admire
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

Re: [Dspace-tech] Annual submission Rates

2010-10-12 Thread Claudia Jürgen
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

Re: [Dspace-tech] Annual submission Rates

2010-10-12 Thread George Hamilton
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