I need to create a dashboard prompt based on a condition using two time tables. In edit prompt using the following sql statement in 'SQL Result' :
SELECT CASE WHEN "Time_city"."Date" <="Time_city2"."Date" THEN 'Sold' ELSE 'Not sold' END FROM "Time_city" LEFT JOIN "Time_city2" ON "Time_city"."Ordernr" = "Time_city2"."Ordernr"
But it doesn't show 'Sold' or 'Not sold' in filter( getting an SQL error). Should I add something to the statement? Is it correct to use SQL statement here in 'Choise List Values' or should I use it in Column (fx)