OpenQM Tip of the week: Query Processor Averages

31 views
Skip to first unread message

martinp...@ladybridge.com

unread,
May 2, 2013, 5:46:58 AM5/2/13
to ope...@googlegroups.com, mvd...@googlegroups.com
A new Tip of the Week article is now available at
http://www.openqm.com/cgi/lbscgi.exe?t0=h&t1=KB.00099

Suggestions for new topics should be sent by email to sup...@openqm.com.

Brian Speirs

unread,
May 6, 2013, 4:58:04 PM5/6/13
to ope...@googlegroups.com, mvd...@googlegroups.com
Hi Martin,

This is fine for the situation where you want a simple average of say order values. But in my work, I frequently have to calculate an average performance coefficient for a group of records - something like TOTAL(profit) * 100 / TOTAL(sales). That average is quite different from AVERAGE(profitpc) where profit pc is (profit * 100) / sales.

You have a good discussion of this type of average in the online help for the CALC keyword. So, can I suggest that you add a bit to this Tip of the Week to point people to the CALC keyword for averages of aggregate functions.

Cheers,

Brian Speirs

Can I suggest that you add a reference to the issue

Martin Phillips

unread,
May 7, 2013, 4:12:24 AM5/7/13
to ope...@googlegroups.com

Hi Brian,

 

Thanks for the comment.

 

I have added a cross-reference to CALC from the KnowledgeBase article.

 

 

Martin

--
You received this message because you are subscribed to the Google Groups "OpenQM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openqm+un...@googlegroups.com.
To post to this group, send an email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openqm?hl=en-GB.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Bob Joslyn

unread,
May 7, 2013, 5:01:58 AM5/7/13
to ope...@googlegroups.com
But please note that "average" is a very deep subject.  Well, not "average" so much as numbers and statistics.  Just the fact that that many numbers we use daily cannot be expressed accurately in a computer without special treatment causes daily heartburn. One-third as a decimal is a good example.  Really good accounting software does not use the native computer arithmetic but uses "rational" subroutines instead.  I wonder how many bank employees have been jailed for stealing the rounding error from day's interest calculations?
 

From: martinp...@ladybridge.com
To: ope...@googlegroups.com
Subject: RE: OpenQM Tip of the week: Query Processor Averages
Date: Tue, 7 May 2013 09:12:24 +0100
Reply all
Reply to author
Forward
0 new messages