add base sql for drill up down