select model.object_name, count(model_neurons.value_) as neurontypes, count(model_other_neurons.value_) as otherneurontypes from objects model, eav_objects type, eav_objects model_neurons, eav_objects model_other_neurons where model.object_class=19 and model.created < '01-MAY-2008' and model.private=0 and model.object_id=type.object_id and type.attribute_id=112 and type.value_=3536 and
model_neurons.object_id(+)=model.object_id and model_neurons.attribute_id=25 and model_other_neurons.attribute_id(+)=301 and model_other_neurons.object_id(+)=model.object_id group by model.object_name
|