I have completed the Queries and Result Ordering training from the academy and it is so much helpful. It says "In the next tutorial, we will populate the results from the table". I was just wondering where I can find that "next tutorial". Anyway, my related question to the video is how do I do the ordering based on values from a result set. For example, let's say the enumeration 'Genre' has a list of literals and I wanted to do the ordering based on values. I want the order to be mystery, horror, fiction, nonFiction. Generally, using sql query I would use
- Code: Select all
ORDERY BY CASE GENRE WHEN mystery then 1
WHEN horror then 2
How do I specify in this case? Appreciate your help.