Following is example of using group by clause in select query using axapta. Group by clause will display data as per mentioned fields after group by clause.
SELECT D.DNO ,D.DNAME ,D.DLOCATION , Max(E.salary) FROM Emp E, Dept D
where E.Dno = D.Dno
Group by E.Dno, D.Dno, D.DNAME ,D.DLOCATION ;
when you use group by clause then you will get distinct records which used with group by clause. You can use group by when you use any aggregate function in query but if you use distinct in query then you can get distinct of records.
I hope now you are clear with concept of group by clause in ax. You can comment if you want to know anything additional.
SELECT D.DNO ,D.DNAME ,D.DLOCATION , Max(E.salary) FROM Emp E, Dept D
where E.Dno = D.Dno
Group by E.Dno, D.Dno, D.DNAME ,D.DLOCATION ;
when you use group by clause then you will get distinct records which used with group by clause. You can use group by when you use any aggregate function in query but if you use distinct in query then you can get distinct of records.
I hope now you are clear with concept of group by clause in ax. You can comment if you want to know anything additional.
Comments
Post a Comment
Please avoid link comments