Integrated query functionality