Migrate query mysql to Postgres...

Migrate query mysql to Postgres...

I had a query in Mysql.

select 
  resource.name, hw_name, component_desc, count(resource.name), invprocessor.clock_speed
from 
  invcomponenttype,invhw,invhwcomponent,invcomponent, resource, invprocessor

where
  invcomponenttype.component_type = invhw.component_type AND
  invcomponenttype.component_label='Processor' AND
  invhwcomponent.HW_ID = invhw.HW_ID AND
  invcomponent.component_id = invhwcomponent.component_id AND
  invcomponent.Computer_id = resource.resource_id AND
  invprocessor.component_id = invcomponent.component_id

GROUP BY 
  resource.name


How migrate this query to Postgres Sql ??

update:    ERROR: column "invhw.hw_name" must appear in the GROUP BY clause or be used in an aggregate function Position: 26

Thanks in advance