MicroStrategy ONE

COUNT(column) Support

COUNT(column) Support is an advanced property that is hidden by default. For information on how to display this property, see Viewing and Changing Advanced VLDB Properties.

The COUNT(column) Support property is used to specify whether COUNT on a column is supported or not. If it is not supported, the COUNT(column) is computed by using intermediate tables and COUNT(*).

Levels at Which You Can Set This

Database instance only

Examples

Use COUNT(column)

Copy
select a11.STORE_NBR STORE_NBR,
 max(a12.STORE_DESC) STORE_DESC,
 count(distinct a11.COST_AMT) COUNTDISTINCT
from HARI_COST_STORE_DEP a11
 join HARI_LOOKUP_STORE a12
 on (a11.STORE_NBR = a12.STORE_NBR)
group by a11.STORE_NBR

Use COUNT(*)

Copy
select a11.STORE_NBR STORE_NBR,
 a11.COST_AMT WJXBFS1
into #ZZTIS00H5JWDA000
from HARI_COST_STORE_DEP a11
select distinct pa1.STORE_NBR STORE_NBR,
 pa1.WJXBFS1 WJXBFS1
into #ZZTIS00H5JWOT001
from #ZZTIS00H5JWDA000 pa1
where pa1.WJXBFS1 is not null
select pa2.STORE_NBR STORE_NBR,
 max(a11.STORE_DESC) STORE_DESC,
 count(*) WJXBFS1
from #ZZTIS00H5JWOT001 pa2
 join HARI_LOOKUP_STORE a11
 on (pa2.STORE_NBR = a11.STORE_NBR)
group by pa2.STORE_NBR