Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

What does min() GROUP BY do ?

Hi Experts,

Can someone explain in plain English what the script statement min() GROUP achieves ?

I've seen it in code and I assume it returns the minimum value of a named field. But what does GROUP do ?

Thanks

MV

1 Solution

Accepted Solutions
anbu1984
Master III
Master III

Load ID,Min(Sale) Group by ID;

Load * Inline [

ID,Sale

1,100

1,200

2,10

2,100];

Here we grouped on ID and calculated min of Sale from each group of IDs

Min from this group(ID=1) is 100

1,100

1,200

Min from this group(ID=2) is 10

2,10

2,100

View solution in original post

6 Replies
arulsettu
Master III
Master III

hi

are you asking about group by

if it is

group by is a clause used for defining over which fields the data should be aggregated (grouped). The aggregation fields should be included in some way in the expressions loaded. No other fields than the aggregation fields may be used outside aggregation functions in the loaded expressions.

senpradip007
Specialist III
Specialist III

Group by is a clause used for defining over which fields the data should be aggregated (grouped). The aggregation fields should be included in some way in the expressions loaded. No other fields than the aggregation fields may be used outside aggregation functions in the loaded expressions.

maternmi
Creator II
Creator II

Hi,

maybe this explanation will help you:

group by is a clause used for defining over which fields the data should be aggregated (grouped). The aggregation fields should be included in some way in the expressions loaded. No other fields than the aggregation fields may be used outside aggregation functions in the loaded expressions.

BR

Michael

Not applicable
Author

Clollecting the data across multiple fields  and group the result by one

anbu1984
Master III
Master III

Load ID,Min(Sale) Group by ID;

Load * Inline [

ID,Sale

1,100

1,200

2,10

2,100];

Here we grouped on ID and calculated min of Sale from each group of IDs

Min from this group(ID=1) is 100

1,100

1,200

Min from this group(ID=2) is 10

2,10

2,100

Not applicable
Author

Thank you for your clear answer and helpful example, Anbu.

It's a shame some people can only be bothered to copy the same text from the same reference manual. I suppose they think it's a quick and easy way to accumulate points.

MV