See the following tutorials:
SQL - Using Views - Tutorialspoint[
^]
SQL - Temporary Tables - Tutorialspoint[
^]
SQL - Sub Queries - Tutorialspoint[
^]
https://www.tutorialspoint.com/What-is-the-concept-of-a-derived-table-concerned-with-MySQL-subquery[
^]
A derived Table is just another name for the result of a Subquery.
If you have complicated queries you can save yourself a lot of typing by using Views, it can also be used to restrict access for users.
Temporary tables are not needed if your needs are simple and normal queries suffice.
There can be cases however that temporary tables can be useful, like when you need the results of a query that is very slow several times.
Also temporary tables are often used in Stored Procedures, see:
sql - Creating temporary tables in MySQL Stored Procedure - Stack Overflow[
^]
Another option is using CTE (Common Table Expressions), see:
An Introduction to MySQL CTE[
^]