Start with [](https://www.sqlite.org/lang_with.html) But could be done with a 3-way join too, since you explicitly want to do 3 levels only.
Start with [](https://www.sqlite.org/lang_with.html) But could be done with a 3-way join too, since you explicitly want to do 3 levels only.