how to data base quary make