Run predictions inside the database
