MySQL中的多层查询

Beginner here*. I have a table where user is allow to run query on. However in my system, I'm allowing user to run query on the table and then running another query using the same previously queried results.

SELECT * FROM employees WHERE jobTitle = 'Sales Rep'
SELECT * FROM employees WHERE officeCode = '1'

Previously with SQLite syntax I was able to achieve this by manipulating the both query into

SELECT * FROM (SELECT * FROM employees WHERE jobTitle = 'Sales Rep') WHERE officeCode = '1' 

However, I've tried this same method in MySQL and I'm getting the error:

#1248 - Every derived table must have its own alias 

Is there a different syntax or is it not possible at all in MySQL?

You just need an alias in the subquery:

SELECT t.*
FROM (SELECT *
      FROM employees
      WHERE jobTitle = 'Sales Rep'
     ) t
WHERE officeCode = '1' ;

t is the alias.

This query would normally just be written with AND:

      SELECT *
      FROM employees
      WHERE jobTitle = 'Sales Rep' AND
            officeCode = '1' ;