EPR simulation on SQL