db datda simplified to simple query