I got this far but it seems I get two entries if the two biggest documents are simply versions of the same doc:
SELECT content.title, character_length(body) as characters, contenttype FROM bodycontent, content WHERE bodycontent.contentid = content.contentid ORDER BY characters desc LIMIT 30;
How can I just get the latest version for each page? (I'm using postgresql)
Thanks
In the CONTENT table filter for CONTENT_STATUS = 'current'.
Unfortunately that doesn't seem to remove the duplicate entries... SELECT content.title, character_length(body) as characters, contenttype FROM bodycontent, content WHERE bodycontent.contentid = content.contentid AND content.content_status='current' ORDER BY characters desc LIMIT 30;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.