/****** Object:  Table [dbo].[Races]    Script Date: 16/07/2025 23:27:12 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Races](
	[Data] [datetime] NOT NULL,
	[Meeting] [nvarchar](100) NOT NULL,
	[Race] [int] NOT NULL,
	[Num] [int] NOT NULL,
	[FileName] [nvarchar](255) NULL,
	[HorseName] [nvarchar](100) NULL,
	[Age] [int] NULL,
	[Gender] [nvarchar](10) NULL,
	[HandicapRating] [decimal](10, 2) NULL,
	[CareerRuns] [int] NULL,
	[CareerWins] [int] NULL,
	[CareerStrikeRate] [decimal](10, 2) NULL,
	[CareerROI] [decimal](10, 2) NULL,
	[CareerPlacings] [int] NULL,
	[CareerPlaceStrikeRate] [decimal](10, 2) NULL,
	[DryTrackRuns] [int] NULL,
	[DryTrackWins] [int] NULL,
	[DryTrackStrikeRate] [decimal](10, 2) NULL,
	[DryTrackROI] [decimal](10, 2) NULL,
	[WetTrackRuns] [int] NULL,
	[WetTrackWins] [int] NULL,
	[WetTrackStrikeRate] [decimal](10, 2) NULL,
	[WetTrackROI] [decimal](10, 2) NULL,
	[AveragePrizeMoney] [decimal](15, 2) NULL,
	[CareerPrizeMoney] [decimal](15, 2) NULL,
	[BestFixedOdds] [decimal](10, 2) NULL,
	[BetEasyOdds] [decimal](10, 2) NULL,
	[Weight] [decimal](10, 2) NULL,
	[WeightCarried] [decimal](10, 2) NULL,
	[Barrier] [nvarchar](10) NULL,
	[PrizeMoney] [decimal](15, 2) NULL,
	[ThisTrackRuns] [int] NULL,
	[ThisTrackWins] [int] NULL,
	[ThisTrackStrikeRate] [decimal](10, 2) NULL,
	[ThisTrackROI] [decimal](10, 2) NULL,
	[ThisTrackPlaces] [int] NULL,
	[ThisTrackPlaceStrikeRate] [decimal](10, 2) NULL,
	[ThisDistanceRuns] [int] NULL,
	[ThisDistanceWins] [int] NULL,
	[ThisDistanceStrikeRate] [decimal](10, 2) NULL,
	[ThisDistanceROI] [decimal](10, 2) NULL,
	[ThisDistancePlaces] [int] NULL,
	[ThisDistancePlaceStrikeRate] [decimal](10, 2) NULL,
	[ThisTrackDistanceRuns] [int] NULL,
	[ThisTrackDistanceWins] [int] NULL,
	[ThisTrackDistanceStrikeRate] [decimal](10, 2) NULL,
	[ThisTrackDistanceROI] [decimal](10, 2) NULL,
	[ThisTrackDistancePlaces] [int] NULL,
	[ThisTrackDistancePlaceStrikeRate] [decimal](10, 2) NULL,
	[ThisConditionRuns] [int] NULL,
	[ThisConditionWins] [int] NULL,
	[ThisConditionStrikeRate] [decimal](10, 2) NULL,
	[ThisConditionROI] [decimal](10, 2) NULL,
	[ThisConditionPlaces] [int] NULL,
	[ThisConditionPlaceStrikeRate] [decimal](10, 2) NULL,
	[Jockey] [nvarchar](100) NULL,
	[Apprentice] [nvarchar](10) NULL,
	[JockeyWeightClaim] [decimal](10, 2) NULL,
	[JockeyLast100HorseEarnings] [decimal](15, 2) NULL,
	[JockeyLast100AvgHorseEarnings] [decimal](15, 2) NULL,
	[JockeyLast100Starts] [int] NULL,
	[JockeyLast100Wins] [int] NULL,
	[JockeyLast100StrikeRate] [decimal](10, 2) NULL,
	[JockeyLast100ROI] [decimal](10, 2) NULL,
	[JockeyLast100Places] [int] NULL,
	[JockeyLast100PlaceStrikeRate] [decimal](10, 2) NULL,
	[Jockey12MonthHorseEarnings] [decimal](15, 2) NULL,
	[Jockey12MonthAvgHorseEarnings] [decimal](15, 2) NULL,
	[Jockey12MonthsStarts] [int] NULL,
	[Jockey12MonthsWins] [int] NULL,
	[Jockey12MonthsStrikeRate] [decimal](10, 2) NULL,
	[Jockey12MonthsROI] [decimal](10, 2) NULL,
	[Jockey12MonthsPlaces] [int] NULL,
	[Jockey12MonthsPlaceStrikeRate] [decimal](10, 2) NULL,
	[JockeyThisSeasonHorseEarnings] [decimal](15, 2) NULL,
	[JockeyThisSeasonAvgHorseEarnings] [decimal](15, 2) NULL,
	[JockeyThisSeasonStarts] [int] NULL,
	[JockeyThisSeasonWins] [int] NULL,
	[JockeyThisSeasonStrikeRate] [decimal](10, 2) NULL,
	[JockeyThisSeasonROI] [decimal](10, 2) NULL,
	[JockeyThisSeasonPlaces] [int] NULL,
	[JockeyThisSeasonPlaceStrikeRate] [decimal](10, 2) NULL,
	[JockeyLastSeasonHorseEarnings] [decimal](15, 2) NULL,
	[JockeyLastSeasonAvgHorseEarnings] [decimal](15, 2) NULL,
	[JockeyLastSeasonStarts] [int] NULL,
	[JockeyLastSeasonWins] [int] NULL,
	[JockeyLastSeasonStrikeRate] [decimal](10, 2) NULL,
	[JockeyLastSeasonROI] [decimal](10, 2) NULL,
	[JockeyLastSeasonPlaces] [int] NULL,
	[JockeyLastSeasonPlaceStrikeRate] [decimal](10, 2) NULL,
	[Trainer] [nvarchar](100) NULL,
	[TrainerLast100HorseEarnings] [decimal](15, 2) NULL,
	[TrainerLast100AvgHorseEarnings] [decimal](15, 2) NULL,
	[TrainerLast100Starts] [int] NULL,
	[TrainerLast100Wins] [int] NULL,
	[TrainerLast100StrikeRate] [decimal](10, 2) NULL,
	[TrainerLast100ROI] [decimal](10, 2) NULL,
	[TrainerLast100Places] [int] NULL,
	[TrainerLast100PlaceStrikeRate] [decimal](10, 2) NULL,
	[Trainer12MonthHorseEarnings] [decimal](15, 2) NULL,
	[Trainer12MonthAvgHorseEarnings] [decimal](15, 2) NULL,
	[Trainer12MonthsStarts] [int] NULL,
	[Trainer12MonthsWins] [int] NULL,
	[Trainer12MonthsStrikeRate] [decimal](10, 2) NULL,
	[Trainer12MonthsROI] [decimal](10, 2) NULL,
	[Trainer12MonthsPlaces] [int] NULL,
	[Trainer12MonthsPlaceStrikeRate] [decimal](10, 2) NULL,
	[TrainerThisSeasonHorseEarnings] [decimal](15, 2) NULL,
	[TrainerThisSeasonAvgHorseEarnings] [decimal](15, 2) NULL,
	[TrainerThisSeasonStarts] [int] NULL,
	[TrainerThisSeasonWins] [int] NULL,
	[TrainerThisSeasonStrikeRate] [decimal](10, 2) NULL,
	[TrainerThisSeasonROI] [decimal](10, 2) NULL,
	[TrainerThisSeasonPlaces] [int] NULL,
	[TrainerThisSeasonPlaceStrikeRate] [decimal](10, 2) NULL,
	[TrainerLastSeasonHorseEarnings] [decimal](15, 2) NULL,
	[TrainerLastSeasonAvgHorseEarnings] [decimal](15, 2) NULL,
	[TrainerLastSeasonStarts] [int] NULL,
	[TrainerLastSeasonWins] [int] NULL,
	[TrainerLastSeasonStrikeRate] [decimal](10, 2) NULL,
	[TrainerLastSeasonROI] [decimal](10, 2) NULL,
	[TrainerLastSeasonPlaces] [int] NULL,
	[TrainerLastSeasonPlaceStrikeRate] [decimal](10, 2) NULL,
	[LastStartFinishPosition] [nvarchar](10) NULL,
	[LastStartMargin] [decimal](10, 2) NULL,
	[LastStartDistance] [decimal](10, 2) NULL,
	[LastStartDistanceChange] [decimal](10, 2) NULL,
	[LastStartPrizeMoney] [decimal](15, 2) NULL,
	[FormGuideUrl] [nvarchar](500) NULL,
	[HorseProfileUrl] [nvarchar](500) NULL,
	[JockeyProfileUrl] [nvarchar](500) NULL,
	[TrainerProfileUrl] [nvarchar](500) NULL,
	[FinishResult] [nvarchar](50) NULL,
	[Created] [datetime] NOT NULL,
	[Updated] [datetime] NOT NULL,
 CONSTRAINT [PK_Races] PRIMARY KEY CLUSTERED 
(
	[Data] ASC,
	[Meeting] ASC,
	[Race] ASC,
	[Num] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
