MicroStrategy ONE

GROUP BY ID Attribute

The GROUP BY ID Attribute is an advanced property that is hidden by default. For information on how to display this property, see Viewing and Changing Advanced VLDB Properties.

This property determines how to group by a selected ID column when an expression is performed on the ID expression. Each of the options is described below.

The code fragment following each description replaces the section named group by ID in the following sample SQL statement.

Copy
select a22.STORE_NBR STORE_NBR,a22.MARKET_NBR * 10 MARKET_ID,
sum(a21.REG_SLS_DLR) WJXBFS1
from STORE_DIVISION a21 
join LOOKUP_STORE a22 
on (a21.STORE_NBR = a22.STORE_NBR) 
where a22.STORE_NBR = 1 
group by a22.STORE_NBR, [group by ID]

The options for this property are:

  • Group by expression (default): Group by the expression performed in the SELECT statement on the ID column.

    a22.MARKET_NBR * 10

  • Group by alias: Group by the expression alias in the Select statement.

    MARKET_ID

  • Group by column: Group by the column ID, ignoring the expression performed on the ID column.

    a22.MARKET_NBR

  • Group by position: Group by the physical table position of the ID column.

    2

Levels at Which You Can Set This

Database instance, report, and template