Preserve order of SQL WHERE IN() clause with nested SELECT
<p>I need a list of item names ordered by count of items. Item names and corresponing id's are stored in <code>tabletwo</code> while <code>tableone</code> refers to items by id's:</p>

<pre><code>      tableone              tabletwo
+--------+-----------+    +----+------+
| itemid | condition |    | id | name |
+--------+-----------+    +----+------+
| 2      | satisfied |    | 1  | foo  |
+--------+-----------+    +----+------+
| 1      | satisfied |    | 2  | bar  |
+--------+-----------+    +----+------+
| 3      | satisfied |    | 3  | hurr |
+--------+-----------+    +----+------+
| 3      | satisfied |    | 4  | durr |
+--------+-----------+    +----+------+
| 3      | satisfied |
+--------+-----------+
| 4      | satisfied |
+--------+-----------+
| 4      | satisfied |
+--------+-----------+
| 3      | nope      |
+--------+-----------+
| 1      | satisfied |
+--------+-----------+
</code></pre>

<p>SQL code:</p>

<pre><code>SELECT `itemname` FROM `tabletwo` WHERE `id` IN (
    SELECT `itemid` FROM (
        SELECT count(`itemid`), `itemid`
        FROM `tableone`
        WHERE `some_codition`="satisfied"
        GROUP BY `itemid`
        ORDER BY count(`itemid`) DESC
    ) alias
)
</code></pre>

<p>The nested <code>SELECT</code> returns a list of item id's in descendant order: <code>3, 4, 1, 2</code>. This list is then used as an argument of an <code>IN()</code> clause. <strong>The expected result of the whole query is: <code>hurr, durr, foo, bar</code> (in this exact order).</strong> But the order is not preserved. I know it can be done like this: <code>ORDER BY FIELD(id, 3, 4, 1, 2)</code> but I don't know how to do this trick when the ordered list is fetched dynamically like in my case. Do I need to <code>SELECT</code> it again? Or temporary table maybe? Or is it better to build another query outside SQL?</p>