xtsel -c '$key4>=100000 && $key4<=100009' | xtcut -f key1:cust,date1:date,key4:brand | xtchgstr -f brand -c 100000:a,100001:b,100002:c,100003:d,100004:e,100005:f,100006:g,100007:h,100008:i,100009:j | xtpattern -k cust -s date -f brand:pattern | xtcut -f cust,pattern