and one more query:
mysql> select d.id as dom_id, d.name, ip.id as ip_id, ip.serviceNodeId, ip.ip_address, ip.default_domain_id, ip.main from domains d left join DomainServices ds on d.id=ds.dom_id left join IpAddressesCollections ipc on ds.ipCollectionId=ipc.ipCollectionId left join...