BaseNow

 

  Search
   

  Help

Screen shots

Compare editions

Online help

Quick-start videos

System requirements

License agreement

Known issues

  Support

 Forums

Technical support

Feedback

 About the author

 Company

Contact

Privacy policy

  Features

BaseNow architecture

Database tools

BaseNow Agent

Tables and views

SQL Query Builder

Import/export data

  Subscribe

Stay informed about any major changes. Click here to subscribe

 

About aggregate functions

To summarize all the data in a table, you create an aggregate query that involves a function such as SUM( ) or AVG( ). When you run the query, the result set contains a single row with the summary information. For example, you can calculate the total price of all books in the titles table by creating a query that sums the contents of the price column. For more information, see Group Rows in query results.

For example, to calculate the number of rows in the Orders table, the corresponding SQL statement might look like this:

SELECT SUM(*) FROM Orders

You can use the following aggregate functions:

Function

Description

AVG(expr)

Average of the values in a column. The column can contain only numeric data.

COUNT(expr), COUNT(*)

A count of the values in a column (if you specify a column name as expr) or of all rows in a table or group (if you specify *). COUNT(expr) ignores null values, but COUNT(*) includes them in the count.

MAX(expr)

Highest value in a column (last value alphabetically for text data types). Ignores null values.

MIN(expr)

Lowest value in a column (first value alphabetically for text data types). Ignores null values.

SUM(expr)

Total of values in a column. The column can contain only numeric data.

 

Aggregate Functions in BaseNow Layout Toolbar

You can easily use aggregate functions in the program's main screen on grouped rows using the Layout Toolbar.

You can set aggregate functions for one or multiple columns. Just change the ColumnName property and Function property to set the aggregate function for a different column. Set the Function property to None to disable the aggregate function for a column.

Function

Returns or sets the aggregate function to be shown in group footers for a column.

ColumnName

Alows you to specify a column that will be used for calculations.

RowPrefix

Returns or sets the string displayed in a group footer row before the aggregate function result.

RowFormat

Returns or sets a value indicating the format string for the aggregate function result of a column in the group footer row.


Related Topics:

About calculations in a view

Create a calculate column in a view

Specifying conditions for groups

Group Rows in query results

About SQL Query Builder

SQL Query Builder Layout

 

[Home] [Download] [Screen Shots] [Details] [Support] [Purchase]

Copyright © 1997-2005 Gate Comm Software. All Rights Reserved.

 

 

News
7/13/2004
COMDLG32.OCX error at startup
6/29/2004
Opening FoxPro and dBase databases
1/11/2024
Version 1.1.7 Relased (1/11/2024)
11/18/2002
Version 1.1.0 Relased (11/16/2002)
10/20/2002
HotFix 1 for Windows XP SP1

Forums
8/10/2024
removing duplicate records
8/8/2024
data validation and BaseNow
1/24/2007
Outlook 2003
1/12/2024
BASENOW AND FOXPRO DATE FORMATS
11/6/2024
Need help in Sybase Anywhere database
10/19/2006
need help! mysql query
6/21/2006
Compare SQl fields
6/8/2024
Error