1

Given a SQL query below with an IN clause, is there a way in influx to achieve the same output produced by this?

SELECT * FROM Suppliers
WHERE Country IN (SELECT Country FROM Customers)
darkDragon
  • 455
  • 3
  • 12
Sai Sushanth
  • 69
  • 1
  • 6
  • `distinct` is not a function, it works on the whole selected rows. Remove those extra parentheses to make the code clearer, i.e. `...(select distinct Country from...`. – jarlh Jun 17 '19 at 09:29

1 Answers1

2

Influxql does not support IN clause with SELECT statement. Refer here:

One option for you is to demoralize your measurement by flagging(adding additional column) the point in measurement-suppliers which has corresponding matching point within measurement-customers.

darkDragon
  • 455
  • 3
  • 12