updated sql query in DVD