First thing to try is entering this in the console and checking “Explain SQL Query”, it might give you the native druid query. I say might, because I think sometimes it uses more than one query. If that doesn’t work, I don’t have an example, but a query can be a datasource in a druid query, and you could do a join on the query and the table. https://druid.apache.org/docs/latest/querying/datasource.html#query