update egg view with correct query