Combining Two Queries to Get a Result Based on Matching IDs

Hello everyone,

I’m currently working with two separate queries in Grafana. Query A returns a list of IDs and Query B also returns a list of IDs. My goal is to create a final list of IDs (if any are available) based on whether an ID from Query A is also contained in Query B.

In other words, if an ID from Query A matches an ID from Query B, I want to list the corresponding device. I’m unsure how to go about combining these two queries to achieve this result.

Can anyone provide some guidance on how to accomplish this? Any help would be greatly appreciated!


What type of data sources are query A and B? mysql, sql server, influxdb?

A is from InfluxDB and B is from a JSON-API