Join two tables with no common key based on condtions
I have two tables;
ScoreTable that includs name and score.
And GradeTable that includes criterias (score limits) for different grades.
The solution I have come upp with is by first outer joing the tables and then evaluates the rows. This solution below works fine. But when joining this way with Cartesian prodcuts the Scoretable will include all combinations from the ScoreTable and the GradeTable. If I would have 100 rows in each table it would result in 10000 rows. Increasing rows more would Quick be difficult for the RAM to handle this approach. So my question is how else could I solve this problem below?