1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

jra公式データから中央競馬の複勝の払戻金を知るSQL

Posted at

https://jra-van.jp/
でダウンロードしたデータに対して以下のようにSQLを流すと複勝の払戻金の統計を知ることが出来ます。

SELECT
   min(PayFukusyoPay1)*1, min(PayFukusyoPay2)*1, min(PayFukusyoPay3)*1,
   avg( (PayFukusyoPay1+PayFukusyoPay2+PayFukusyoPay3)/3 ),
   max(PayFukusyoPay1)*1, max(PayFukusyoPay2)*1, max(PayFukusyoPay3)*1
FROM
    N_RACE
INNER JOIN
	N_HARAI
		ON
			N_HARAI.Year = N_RACE.Year
				AND
			N_HARAI.MonthDay = N_RACE.MonthDay
				AND
			N_HARAI.JyoCD = N_RACE.JyoCD
				AND
			N_HARAI.RaceNum = N_RACE.RaceNum
WHERE
    N_RACE.JyoCD IN("01", "02", "03", "04", "05", "06", "07", "08", "09", "10")
        AND
    N_RACE.TorokuTosu IN("0")
        AND
    N_RACE.Year >= "2010" AND N_RACE.Year <= "2020"
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?