here is what I tried :

CREATE TABLE essaisql FREE (recnum I, val N(12,6))
FOR i = 1 TO 10000
    INSERT INTO essaisql VALUES(i, 1000* RAND())
NEXT && i = 1 TO 10000
BROWSE
x = 500
SELECT INT(recnum/x) AS periode, SUM(val) AS somme, AVG(val) AS moyenne ;
 FROM essaisql GROUP BY periode ORDER BY periode INTO CURSOR resultat
BROWSE FIELDS per = periode*x, somme, moyenne


The Foxil


_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/5395a93b.9090...@wanadoo.fr
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to