Here is a small Oracle SQL script that displays some useful statistics of a confluence site. I have used it to clean up a large Confluence installation by removing unused spaces or spaces with only a few articles in them.
set linesize 300 set pagesize 500 column spacename format a60 column creator format a40 column lastmodifier format a40 select count(content.spaceid) as pagecount, spaces.spacename as spacename, spaces.creator as creator, spaces.creationdate as creationdate, spaces.lastmodifier as lastmodifier, spaces.lastmoddate as lastmoddate from spaces, content where spaces.spaceid = content.spaceid group by content.spaceid, spaces.spacename, spaces.creator, spaces.creationdate, spaces.lastmodifier, spaces.lastmoddate order by lastmoddate; quit