select * from table where table.id = table.view_id order by id