Можете да използвате insert into table[b](query,date) select query,date from table[a] order by table[a] asc