code: public function selectSqlAction()
      {
          if ($query = $this->_initQuery()) {
              $helper = Mage::helper('sheep_debug');
              $results = $helper->runSql($query->getQuery(), $query->getQueryParams());
              $this->renderTable($results);
          }
      }
docs: Runs specified SQL