Hi everyone, "FAILED: SemanticException [Error 10019]: Line 9:5 OR not supported in JOIN currently 'movieid_0' " Exception occur while executing the following query. But i need the add the conditions. Kindly help other way to resolve the query. Please refer the following query
SELECT IF(ISNOTNULL(SUM(recommend_ratings2.rating)),SUM(recommend_ratings2.rating), 0 ) AS rating ,recommend_ratings2.movieid AS movieid FROM default.recommend_ratings2 INNER JOIN (SELECT recommend_ratings2.movieid AS movieid_0 ,IF(ISNOTNULL(SUM(recommend_ratings2.rating)),SUM(recommend_ratings2.rating), 0 ) AS Measure_0 FROM default.recommend_ratings2 GROUP BY recommend_ratings2.movieid ORDER BY Measure_0 DESC limit 2 ) T_0 ON ( recommend_ratings2.movieid = T_0.movieid_0 or ((recommend_ratings2.movieid IS NULL) AND (T_0.movieid_0 IS NULL))) Regards Ravi