Du kan använda insert into table[b](query,date) select query,date from table[a] order by table[a] asc