working query demo