With this single query you can get all the data you need to render a simple multi-level menu. Thanks to the SQL tree structure, your data is represented in a clear and easily-digestible way. To practice writing hierarchical queries like this one, I recommend our interactive course Recursive Queries. Oracle - hierarchical queries
Up to Oracle 11g release 2, Oracle databases didn't support recursive WITH queries. In Oracle SQL these kinds of queries are called hierarchical queries and they have completely different syntax, but the idea is quite the same. You can read more about hierarchical queries in the Oracle documentation.