Average issue

36 views
Skip to first unread message

John Currey

unread,
Oct 2, 2021, 2:51:14 PM10/2/21
to SDQL API
Hi,

Average is not calculating correctly. It's dividing total points by season game. We want total points/games played.

Oct2c.JPG
This is not nearly as critical as my updating the database issue. 

Thanks. 

Joe Meyer

unread,
Oct 2, 2021, 5:41:02 PM10/2/21
to sdq...@googlegroups.com
John and API Friends,

It is not correct to have points (or any stat) set to 0 for future games.
Simply leave stats out of your POST data dict for upcoming games!

To get the running average of points for FRES this season, use the SDQL:

date, 1*A(points), points @ team = FRES and season = 2021


Note how any math (here 1*) outside of a field summative instantiates a running (or cumulative) summative. 

Note further how nice it is to include a link to the query result.

best regards,

Joe Meyer






--

---
You received this message because you are subscribed to the Google Groups "SDQL API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sdqlapi+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sdqlapi/e7d9d3b8-40fa-4cdd-8ea7-ea8286703c98n%40googlegroups.com.

John Currey

unread,
Oct 3, 2021, 7:16:29 AM10/3/21
to SDQL API
Got it, thanks!
Reply all
Reply to author
Forward
0 new messages