select CMInc,CustKind,CustID,ServiceID,VenID,SetType,Value=convert(text,Value),DeleteYes,CreateDate,CreateDate8,CreateOper,ModifyDate,ModifyDate8,ModifyOper from psSetMain where SetType ='MemPointViewType'
★★ select CMInc,CustKind,CustID,ServiceID,VenID,SetType,Value=convert(text,Value),DeleteYes,CreateDate,CreateDate8,CreateOper,ModifyDate,ModifyDate8,ModifyOper from psSetMain where SetType ='BrandListLimitRcnt'
select Brand=max(Brand), BrandID,ViewYes=max(ViewYes),BestYes=max(BestYes),Cnt=sum(Cnt), BrandKor= max(BrandKor) from psBrandMainBatch where ViewYes=1 and Rcnt >= 1 group by BrandID order by BrandID
select Brand=max(Brand), BrandID,ViewYes=max(ViewYes),BestYes=max(BestYes),Cnt=sum(Cnt), BrandKor= max(BrandKor) from psBrandMainBatch where ViewYes=1 and Rcnt >= 1 group by BrandID order by BrandID
select Brand=max(Brand), BrandID,ViewYes=max(ViewYes),BestYes=max(BestYes),Cnt=sum(Cnt), BrandKor= max(BrandKor) from psBrandMainBatch where ViewYes=1 and Rcnt >= 1 group by BrandID order by BrandID