refs: add db query into select.