updated sql page as per #6
rebuild single page