select a subset of a table in the order of another column
<p>I got 2 tables like this (streamlined example):</p>

<pre><code>create table T (i integer, a text);
insert into T values (3,'ww');
insert into T values (1,'ee');
insert into T values (5,'nn');
insert into T values (2,'kk');
insert into T values (4,'ss');

create table U (i integer);
insert into U values (2);
insert into U values (3);
insert into U values (5);
insert into U values (1);

select rowid, i from U;
rowid  i
----- --
    1  2
    2  3
    3  5
    4  1

select * from T where i in (select i from U order by rowid);
    i                a
----- ----------------
    3               ww
    5               nn
    2               kk  
    1               ee
</code></pre>

<p>I need the <code>i</code> collected in the <code>in(...)</code> in the same order as the inner select, something like:</p>

<pre><code>select * from T where i inUnsorted (select i from U order by rowid);
    i                a
----- ----------------
    2               kk          
    3               ww
    5               nn
    1               ee
</code></pre>

<p>Is that possible ?</p>