Added sql function test