Wednesday, July 4, 2018

Sorting Options By Group By

Use the group by clause to group selected records by field. The following
example shows how to display the number of sales orders by customer group
from the Sales table.



1
2
3
4
5
6
7
8
SalesTable salesTable;
while select count(recId) from salesTable group by
CustGroup
{
   print salesTable.CustGroup,"
   ",int642Str(salesTable.RecId);
}
pause;

The output would be a list of customer groups with the total number of sales
orders that exist for customers in that group. The count() function counts the total
number of records and places the result in the field specified in the brackets.


Best Regards,
Hossein Karimi

No comments:

Post a Comment

Configure the Firewall on the Enterprise Portal Server

After you install Enterprise Portal, enable Web Server (HTTP) in Windows Firewall. If you do not enable the web server in Windows Firewall...