Example
Smartsite SXML |
Copy Code
|
<se:xmldatatable resulttype="datatable" save="xxx">
<se:row>
<se:col name="Browser">IE</se:col>
<se:col name="Day">1</se:col>
<se:col name="Week">1</se:col>
<se:col name="Count">6</se:col>
</se:row>
<se:row><se:col>IE</se:col><se:col>2</se:col><se:col>1</se:col><se:col>3</se:col></se:row>
<se:row><se:col>IE</se:col><se:col>3</se:col><se:col>1</se:col><se:col>8</se:col></se:row>
<se:row><se:col>Firefox</se:col><se:col>1</se:col><se:col>1</se:col><se:col>2</se:col></se:row>
<se:row><se:col>Firefox</se:col><se:col>2</se:col><se:col>1</se:col><se:col>5</se:col></se:row>
<se:row><se:col>Firefox</se:col><se:col>13</se:col><se:col>2</se:col><se:col>7</se:col></se:row>
<se:row><se:col>Opera</se:col><se:col>2</se:col><se:col>1</se:col><se:col>3</se:col></se:row>
<se:row><se:col>Opera</se:col><se:col>12</se:col><se:col>2</se:col><se:col>3</se:col></se:row>
<se:row><se:col>Chrome</se:col><se:col>9</se:col><se:col>2</se:col><se:col>5</se:col></se:row>
</se:xmldatatable>
=== Group on no column
{debug.write(datatable.aggregate($xxx, Count, true))}
=== Group on one column
{debug.write(datatable.aggregate($xxx, Count, true, Browser))}
=== Group on one column
{debug.write(datatable.aggregate($xxx, Count, true, Week))}
=== Group on two columns
{debug.write(datatable.aggregate($xxx, Count, true, Browser, Week))}
|