Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jyothish8807
Master II
Master II

Error while using min,max ,count aggregations

LOAD

[Si no], [Email ID], Name, English, Hindi, Maths, Science,max(Science) as Sciencemax


FROM



(ooxml, embedded labels, table is Sheet1);

Iam not able to display the results of " min(Science) " command. its displaying error....

HELP

Best Regards,
KC
1 Solution

Accepted Solutions
sreenivas
Creator III
Creator III

for this u need to use Group By Clause after the

LOAD

[Si no], [Email ID], Name, English, Hindi, Maths, Science,max(Science) as Sciencemax


FROM



(ooxml, embedded labels, table is Sheet1)

Group By

[Si no], [Email ID], Name, English, Hindi, Maths;

View solution in original post

4 Replies
sreenivas
Creator III
Creator III

for this u need to use Group By Clause after the

LOAD

[Si no], [Email ID], Name, English, Hindi, Maths, Science,max(Science) as Sciencemax


FROM



(ooxml, embedded labels, table is Sheet1)

Group By

[Si no], [Email ID], Name, English, Hindi, Maths;

Not applicable

hi,

to use aggregate functions like min, max count, we have to use group by cluase.

so

first u load:

Student:

LOAD

[Si no], [Email ID], Name, English, Hindi, Maths, Science

FROM

(ooxml, embedded labels, table is Sheet1);

Then load

load [Si no],

         max(Science) As Sciencemax

resident Student

group by [Si no];

hope it helps you.

Niranjan M.

Not applicable

hi,

use according to this example,

Load Month, min(Sales) as SmallestSalePerMonth from abc.csv group by Month;

Load Month, min(Sales, 2) as SecondSmallestSalePerMonth from abc.csv group by Month;

hope it help you.

jyothish8807
Master II
Master II
Author

Is it compulary to use a group by statement? Is there any alternative way without using group by...

Best Regards,
KC