I would to know what service is deploy to a host and the value of the custom macro affected specially for this host and service

So I want to reproduce with SQL the "service / host" centreon page.

But I do not find the right tables.

I know to do it, for service_template, host_template and host , but not directly host to service

Thank you for your help