Compare two measurement or two different data sets

I have two different measurements, I wanted to compare these two measurements across different time frame and find the exact missing records. I have a unique identifier for each record.

SELECT * FROM TABLE_A WHERE COLUMN_A NOT IN (SELECT COLUMN_B FROM TABLE_B)

is there a way to perform this in influx? I checked CQ but looks like its more of aggregation like downsampling.

I am okay to change the schema or store both the data in sample measurement. But just figuring out a way.

Hello @ravi1050,

You can perform math across measurements with Flux. Try taking a look at these blogs:

If you decide to explore writing more flux scripts, the spec and the testdata repo will be your best resource.