select contentid, dd.DocID,len(doccontent) from documents dd
join entries ee on ee.docid = dd. DocID order by len(DocContent) desc