moved raw sql from controller to mappers. Ref T100