Description:
Return an Excel cell name according to specific row and column numbers.
Syntax:
cellname(r,c)
Note:
The function finds the name of an Excel cell through row parameter r and column parameter c.
Parameters:
r |
The rth row in an Excel sheet, which is an integer greater than 0 |
c |
The cth column in an Excel sheet, which is an integer greater than 0 |
Return value:
A string
Example:
cellname(1,1) |
Result: A1 |
cellname(4,3) |
Result: C4 |
cellname(124,198) |
Result: GP124 |
cgroups()
Here’s how to use cgroups() function.
T.cgroups(Fi,…;y:Gi,…;w)
Description:
Perform grouping and aggregation over a pre-summarized data cube.
Syntax:
T.cgroups(Fi,…;y:Gi,…;w)
Note:
For a grouping & aggregation operation over entity table T, the function automatically searches for and queries an eligible cube. It will first query a cube where the grouping field is in a more front position; if there isn’t such a cube, query the whole entity table. Parameter Fi is the grouping condition, parameter Gi is the result of calculating the aggregate function y, and parameter w is the filtering condition. The function will perform a second aggregate when T is a multi-zone composite table.
Parameters:
T |
Entity table/multi-zone composite table/cluster table |
Fi |
Grouping field |
y |
Aggregate function |
Gi |
Field names in result set |
w |
Filtering condition |
Options:
@m(...;n) |
Enable parallel processing; use default value when parameter n is absent (the default is the max number of parallel tasks set in 【Tool】-【Option】 |
Return value:
A table sequence
Example:
|
|
A |
|
|||
|
1 |
=file("D://test/orders.ctx").open() |
Open composite table file orders.ctx:
|
|||
|
2 |
=A1.cgroups(OCount;count(OAmount):COUNT) |
|
|||
|
3 |
=A1.cgroups(OCount;count(OAmount):COUNT;OAmount<=3000) |
Add filtering condition to A2 |
|||
|
4 |
=A1.cgroups@m(OCount;count(OAmount):COUNT;OAmount<=3000;) |
Parallel processing, as the number of parallel tasks is absent, use the default value |
|||
|
5 |
=A1.cgroups@m(OCount;count(OAmount):COUNT;OAmount<=3000;4) |
Parallel processing with the number of parallel tasks being 4 |
|||
6 |
=file("emp.ctx",["192.168.0.104:8282"]) |
Open cluster file emp.ctx |
|
|||
7 |
=A6.open() |
Return a cluster table |
|
|||
8 |
=A7.cgroups(DEPT;count(EID):COUNT) |
Perform grouping & aggregation over a pre-summarized data cube of a cluster table |
|
|||
9 |
=file("emp.ctx":[2,3]) |
|
|
|||
10 |
=A9. open () |
Open A9’s multi-zone composite table |
|
|||
11 |
=A10.cgroups(GENDER;avg(SALARY):AVG_salary) |
Group by GENDER and calculate average SALARY in each group |
|
|||