<p>I'm trying to use MySQL to create a view with the "WITH" clause</p>

<pre><code>WITH authorRating(aname, rating) AS
   SELECT aname, AVG(quantity)
   FROM book
   GROUP BY aname
</code></pre>

<p>But it doesn't seem like MySQL supports this.</p>

<p>I thought this was pretty standard and I'm sure Oracle supports this. Is there anyway to force MySQL to use the "WITH" clause?  I've tried it with the MyISAM and innoDB engine.  Both of these don't work.</p>

Oracle does support WITH.
It would look like this.
```
```
WITH emps as (SELECT * FROM Employees)
SELECT * FROM emps WHERE ID < 20
UNION ALL
SELECT * FROM emps where Sex = 'F'
```
```
@ysth WITH is hard to google because it's a common word typically excluded from searches.
You'd want to look at the
SELECT docs
to see how subquery factoring works.
I know this doesn't answer the OP but I'm cleaning up any confusion ysth may have started.