Focal Point
COUNT

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6961038331

February 27, 2005, 02:07 PM
<shyam>
COUNT
Hi,

I am trying to build a count query that would do the following:

If the product was sold, count to add 1, if the product was returned, then the count to minue 1, if resold again then count to add 1. Total with this scenerio would be 1.

Anyone have any ideas how I would start?

Thanks,
Shyam
February 27, 2005, 05:24 PM
susannah
depends on the structure of your underlying database, but lets assume its granular.
DEFINE FILE myfile
KOUNTER/I8=IF SALES GT 0 THEN 1 ELSE IF RETURNS GT 0 THEN -1 ELSE 0;
END
TABLE FILE myfile
SUM SALES RETURNS KOUNTER BY month
END