I’m building a recommendation-app with an algorithm that calculates a score to rank the items by. This score is individual for every user.
In my old php-version of the app, I calculated this algorithm-score by querying the item-table and in the SQL adding a custom column that is based on a 4-level-nested-join-sub-select.
What would be the best way to get a similar solution in backendless codeless? I don’t think there are no options for calculated select-fields or sub-selects, right?
here some example code
SELECT *, score.score AS score FROM items LEFT JOIN (SELECT * FROM votes … ) AS user_vote ON … LEFT JOIN ( SELECT score.item_id, SUM(alikes.calcu * score.vote ) AS score FROM votes AS score LEFT JOIN ( SELECT v1.user_id AS user, v2.user_id AS alike, sum( (abs( v1.vote - v2.vote ) ) ) AS calcu ,@rownum := @rownum + 1 AS rank FROM votes AS v1 LEFT JOIN votes AS v2 ON v1.post_id = v2.post_id JOIN ( SELECT @rownum := 0 ) AS rank WHERE …