Math functions for simple queries work