Advanced query builder widget