| 
            
            
        
                
select  paper.object_id, paper.object_name, count(models.object_id) as PublicModels
from objects models, eav_objects model_paper, objects paper, eav_objects citations 
where 
models.object_class=19 
and models.private=0 
and model_paper.value_=citations.object_id 
and model_paper.object_id=models.object_id 
and model_paper.attribute_id=155
and citations.attribute_id=140 
and paper.object_id = citations.value_ 
group by paper.object_id,paper.object_name 
order by COUNT(models.OBJECT_ID) DESC, paper.object_name
                
         |