I'm always curious - how does ESPN generate seemingly random stats such as - "On games starting before 7PM in July, the Astros win 87% of the time".

How are they creating the queries? Do you think they have humans creating them on the fly, or are they using other tools that may help?

I'm looking to implement a similar feature and thinking about what architecture patterns might be relevant.