Created formula for Apache Derby