Description\n-----------\n\nAlthough subqueries are more commonly placed in a WHERE clause, they can also form part of the FROM clause. Such subqueries are commonly called derived tables.\n\nIf a subquery is used in this way, you must also use an AS clause to name the result of the subquery.\n\nORACLE mode\n\nMariaDB starting with 10.6.0\n\nAnonymous subqueries in a FROM clause (no AS clause) are permitted in ORACLE mode.\n\nAnonymous subqueries in a FROM clause (no AS clause) are not permitted in ORACLE mode.\n\nCorrelation Column List\n\nMariaDB starting with 11.7.0\n\nIt is possible to assign column names in the derived table name syntax element.\n\nIt is not possible to assign column names in the derived table name syntax element.\n\nExamples\n--------\n\nCREATE TABLE student (name CHAR(10), test CHAR(10), score TINYINT); \n\nINSERT INTO student VALUES \n  ('Chun', 'SQL', 75), ('Chun', 'Tuning', 73), \n  ('Esben', 'SQL', 43), ('Esben', 'Tuning', 31), \n  ('Kaolin', 'SQL', 56), ('Kaolin', 'Tuning', 88), \n  ('Tatiana', 'SQL', 87), ('Tatiana', 'Tuning', 83);\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/data-manipulation/selecting-data/joins-subqueries/subqueries/subqueries-in-a-from-clause-derived-tables