select cell_type.object_id, cell_type.object_name, num from objects cell_type , num where object_class=97 and num =
(select count(distinct models.object_id) from objects models, eav_objects cell where
models.object_class=19 and
cell.object_id=models.object_id and
cell.attribute_id=414 and
cell.value_=cell_type.object_id
)
order by cell_type.object_name