Switch from SQL to Zend_Db_Select.