updated sql in overlap