The Monty Hall problem is a simple problem in probability that most people struggle to understand. To demonstrate SQL programming techniques, I created a Monte Carlo simulation of the Monty Hall problem. This is a program that simulates the event a large number of times, each time recording the outcome and summarizing the results at the end. The script is available here.