Hello! Can I execute complex select query with condition after “from” word? For more understanding my question show example:
I have select:
SELECT
__time as “time”,
name as “service”,
count(sla) as " "
FROM SYTESTER_DRUID
WHERE name IN (select “name” from “SYTESTER_DRUID”)
GROUP BY __time, name
But I want to make condition depends on value from another table (it’s not important how I get this value by using sub_query or some way else) like this:
SELECT
__time as “time”,
name as “service”,
count(sla) as " "
FROM SYTESTER_DRUID
WHERE name IN (if some_value = 0 then (select “name” from “SYTESTER_DRUID”) else “exmple_string” end)
GROUP BY __time, name
Can I do this in druid sql?