Comparing bsp to inplay_max

0 votes

I would like to test a sample set of data where I focus on the favourite (position_in_betting = 1), and compare the bsp to the inplay_max, based on winners or not.

My code for extracting a sample set of those that won are as follows:

SELECT DISTINCT bf.bf_race_id, bf.bf_runner_id, bf.sf_name, bf.sf_race_id, bf.sf_runner_id, runners.runner_id, bf.date, bf.win, bf.bsp, bf.inplay_max, runners.position_in_betting

FROM historic_betfair_win_prices AS bf

INNER JOIN

                historic_runners_beta as runners on runners.runner_id = bf.sf_runner_id

WHERE

                bf.win = 1 AND runners.position_in_betting = 1 AND YEAR(bf.date) >= 2023

This code runs, but it is not selecting those who were position_in_betting = 1

Any suggestions why this is so?

I would like to refine it later by considering the running style on the assumption those held up are likely to drift from bsp when the market turns to in play.

asked Oct 5 in Smartform by jnestor3 Novice (440 points)

1 Answer

+1 vote

I corrected the INNER JOIN, and it works now:

INNER JOIN

historic_runners_beta as runners on runners.race_id = bf.sf_race_id

 And

runners.runner_id = bf.sf_runner_id

answered Oct 5 by jnestor3 Novice (440 points)
...