Getting results from given queries