Summing innings pitched

12 views
Skip to first unread message

John Currey

unread,
May 25, 2022, 6:50:58 PMMay 25
to SDQL API
Hi,

This shows Shohei Ohtani's innings pitched. Using S(Starter:list:innings pitched[-1]) shows 37.4 which is a straight sum of innings pitched. However, .4 innings in not really a baseball thing. We really want to convert to outs, in this case, 115, then divide by 3 and convert the remainder to .0, .1, or .2 which should give 38.1 instead of 37.4. 

Is this something that can be addressed at some point?

date,starter,Starter:sum:innings pitched as 'innings pitched',(int(Starter:list:innings pitched[-1])*3+int((Starter:list:innings pitched[-1] %1)*10)) as outs,S(Starter:list:innings pitched[-1]) as 'total IP',S((int(Starter:list:innings pitched[-1])*3+int((Starter:list:innings pitched[-1] %1)*10))) as 'total outs'@starter and starter='Shohei Ohtani' and season=2022

Joe Meyer

unread,
May 26, 2022, 4:19:13 PMMay 26
to sdq...@googlegroups.com
Hi John and SDQL API Friends,

I believe the cleanest way to handle 'innings pitched' is with thirds of an inning.
Five innings and one out then would be 5.33 innings. 
This is how I handled this parameter in SDQL2.

Joe Meyer
Sport Database LLC





--

---
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/82c8f0eb-4f69-41be-abe3-9234dd55f012n%40googlegroups.com.

John Currey

unread,
May 27, 2022, 6:26:22 PMMay 27
to SDQL API
I see the efficiency of that method and will use it. Thanks for pointing me in the right direction. 
Reply all
Reply to author
Forward
0 new messages