4. Order of Execution - order in which the clauses run

I just want someone to confirm if the order in order-of-execution exercise may be like that:

  FROM recent_grads
 WHERE ShareWomen < 0.5
SELECT COUNT(Major);

It would be logical because the order of execution is:

  1. FROM
  2. WHERE
  3. SELECT
  4. ORDER BY
  5. LIMIT

The order mentioned above gives an error as the output, but I’m not sure is it caused by my misunderstanding or a bug.

Are you running that code?

That’s not the correct syntax. The content is only pointing out the order in which the clauses run internally by SQL. You still have to use the syntax you have learned so far to be able to run those queries correctly.

Knowing the order of execution can be helpful because it helps break down the problems a bit more logically but it’s not the order for the syntax.