SDQL Assistance

26 views
Skip to first unread message

ptbyryce47

unread,
Aug 3, 2022, 8:45:46 PM (9 days ago) Aug 3
to SportsDataBase
I have seen various people post queries on Twitter, and I figured I would give it a shot. 
I have no clue where to even begin.  Is there a YT channel or someone that can break this down for me?  

Joe Meyer

unread,
Aug 5, 2022, 5:43:56 AM (7 days ago) Aug 5
to SportsDataBase
Everything you need from novice to master is in the manual at http://SDQL.com

Try out your own queries and ask questions here or on twitter with the tag #SDQL.

Best regards,

Joe Meyer
Sports Database LLC

Ed Miller

unread,
Aug 5, 2022, 9:56:26 AM (7 days ago) Aug 5
to sportsd...@googlegroups.com
I don't know about anyone else but I'll try to prove-out Statfox trends using SDQL and more often than not I don't get the same results, hmm..... but can someone help with SDQL code for the following:

Home teams with a starting pitcher whose gives up 0.5 or less HR's/start, after a game where the bullpen was rocked for 5 or more earned runs



--
You received this message because you are subscribed to the Google Groups "SportsDataBase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sportsdatabas...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sportsdatabase/26ccd0fa-ad7f-4f8c-9227-bdeeb8478ac9n%40googlegroups.com.

Ed Miller

unread,
Aug 5, 2022, 9:56:26 AM (7 days ago) Aug 5
to sportsd...@googlegroups.com
I have an SDQL question. Upfront, I'm not an SDQL Master, but I know enough to be dangerous....

How do I create SDQL parameter for a specific pitcher (name) who has less than 3 earned runs in each of his last 3 starts ?

On Fri, Aug 5, 2022 at 5:43 AM Joe Meyer <joe.sport...@gmail.com> wrote:
--

Joe Meyer

unread,
Aug 5, 2022, 12:24:42 PM (7 days ago) Aug 5
to sportsdatabase
Ed,

to see how each starter has done after allowing fewer than 3 earned runs in each of their last 3, use the SDQL:

R(starter),S(W),S(L)@starter and sS(Starter:runs allowed<3,N=3)| 

Best regards,

Joe Meyer
Sports Database LLC

Ed Miller

unread,
Aug 5, 2022, 2:41:11 PM (7 days ago) Aug 5
to sportsd...@googlegroups.com
Joe,

Thanks for the reply. But it doesn't seem to be working (get error). I actually don't wish to see each starter that qualifies under this parameter, but rather I wish to use it in a parameter. In other words, to have an SDQL query that considers home favorites off a loss with a starting pitcher that has allowed less than 3 earned runs in his last 3 starts  -- what does that SDQL query look like?  maybe this:

HF and p:L and sS(starter:runs allowed,N=3)<3

and is "runs allowed" = earned runs allowed?

also, what is the "s" in "sS" ?



Joe Meyer

unread,
Aug 5, 2022, 5:10:13 PM (7 days ago) Aug 5
to sportsdatabase
Ed,

almost, - you need a capital S in Starter:runs allowed.

This SDQL works at SportsDatabase.com:
S(W),S(L)@ HF and p:L and sS(Starter:runs allowed,N=3)<3

Note:
You are referencing a player table called `Starter`.
A 'more correct' format would be:
Starter:list:runs allowed[0], taking the first item in the list.
Since there is only one starter in the starter table, you can use `Starter:runs allowed`, which expands out to Starter:sum:runs allowed.

tS is team's sum and expands out to Sum(XXX@team and season)
sS is starter's sum and expands out to Sum(XXX@starter and season)

You will have to check with GimmeTheDog on the exact definition of his parameters.
I'd suggest reaching out to him on twitter @GimmeTheDog.


Best regards,

Joe Meyer
Sports Database LLC
Reply all
Reply to author
Forward
0 new messages