Basic order query function works