We're having trouble with a metric that calculates the ratio of the number of candidate_id with the status "Hired" to the total number of candidate_id. We first tried to evaluate this MAQL query, but it doesn't work.
SELECT(SELECT COUNT({attribute/dshb_recruiting_ratio.job_posting_candidate_id}) WHERE {label/dshb_recruiting_ratio.application_status} = "Hired")/COUNT({attribute/dshb_recruiting_ratio.job_posting_candidate_id})
Then we tried to calculate two independent metrics

and then to calculate the ratio
SELECT TRUNC({metric/recruiting_ratio_status_hired} / {metric/recruiting_ration_total}, 4) or SELECT TRUNC({metric/recruiting_ratio_status_hired}, 4) / TRUNC({metric/recruiting_ration_total}, 4)
This didn't work either. We received an error message
java.sql.SQLException: exception while executing query: UNSUPPORTED_OPERATION ERROR: This query cannot be planned possibly due to either a cartesian join or an inequality join. If a cartesian or inequality join is used intentionally, set the option 'planner.enable_nljoin_for_scalar_only' to false and try again.
Best answer by Ulku Kijasev
View original