Note that you can always open the database and browse it with the SQLite Manager plugin for Firefox. Sometimes, this will help you find your answers more quickly.
Services are all listed in the services table and your service_installations links the device (comuter_id) to the service (service_id) with the status and state also present in that table.
My recommendation for your query, since you are tying things together, is to use the SPICEWORKS.data.query API. It's better from a performance standpoint and will save you from making multiple queries.
Here is a write-up a user did on it:
http:/
or you can search the Community further for more information and examples.
Jackie.