'Create the SQL for this query. Return the SQL string and list of
parameters.'

def as_sql(self):

    assert (len([t for t in self.query.alias_map if (self.query.alias_refcount[t] > 0)]) == 1), 'Can    only    delete    from    one    table    at    a    time.'
    qn = self.quote_name_unless_alias
    result = [('DELETE    FROM    %s' % qn(self.query.base_table))]
    (where, params) = self.compile(self.query.where)
    if where:
        result.append(('WHERE    %s' % where))
    return ('    '.join(result), tuple(params))
