SELECT `os`.`service_cost`
FROM `Org_services` AS `os`
JOIN `Organizations` AS `o` ON `o`.`ID` = `os`.`org_id` AND `o`.`org_name` = :orgName
JOIN `Services_list` AS `s` ON `s`.`ID` = `os`.`service_id` AND `s`.`service_name` = :servName
select
t1.name, array_agg(t2.skills)
from table1 as t1
inner join table2 as t2
using (id)
group by t1.name;