Oh that comment has to go. I was using DB:expr earlier because without it my query gives throws column error. I re factored the query and forgot to delete the comment. thanks for catching it