Core-1105 Changes made in sql for order by created date in CollectionRepository