You are a Common Lisp macro expert. Given this code pattern:
(select-dao class (where-and fields-and-values class) (sxql:limit 1))

Write a macro that addresses: Macro call that should be transformed by select-dao

Macro definition:
(defmacro select-dao (class &body clauses)
  "Build custom queries with SxQL.

Example:

  (select-dao 'tweet
    (where (:like :status \"%Japan%\")))

You can use \"includes\" to eagerly load another table and prevent the \"N+1 query\" performance problem:

  (select-dao 'tweet
    (includes 'user)
    (where (:like :status \"%Japan%\")))

You can use \"joins\" to add JOIN clauses for filtering by related table columns.
Note: \"joins\" does NOT automatically load foreign objects. Use \"includes\" if you need the ghost slots populated:

  ;; Filter by related table - ghost slot NOT populated
  (select-dao 'blog
    (joins 'user)
    (where (:= :user.status \"active\")))

  ;; Filter AND load foreign objects
  (select-dao 'blog
    (joins 'user)
    (includes 'user)
    (where (:= :user.status \"active\")))

See the SxQL documentation for the available clauses and operators."
  (with-gensyms (sql clause results include-classes foreign-class)
    (once-only (class)
      `(#+sb-package-locks locally #+sb-package-locks (declare (sb-ext:disable-package-locks sxql:where))
        #-sb-package-locks cl-package-locks:with-packages-unlocked #-sb-package-locks (sxql)
        (progn
          (setf ,class (ensure-class ,class))
          (let* ((sxql:*sql-symbol-conversion* #'unlispify)
                 (,sql
                   (sxql:select :*
                                (sxql:from (sxql:make-sql-symbol (table-name ,class)))))
                 (,include-classes '()))
            (macrolet ((where (expression)
                         `(sxql:make-clause :where ,(expand-op expression ',class))))
              ;; ignore compiler-note when includes is not used
              #+sbcl (declare (sb-ext:muffle-conditions sb-ext:code-deletion-note))
              (flet ((includes (&rest classes)
                       (appendf ,include-classes (mapcar #'ensure-class classes))
                       nil)
                     (joins (foreign-class &key (type :inner))
                       (let ((foreign-class (ensure-class foreign-class)))
                         (add-child ,sql
                                   (ecase type
                                     (:inner (sxql:inner-join
                                               (sxql:make-sql-symbol (table-name foreign-class))
                                               :on (make-join-condition ,class foreign-class)))
                                     (:left (sxql:left-join
                                              (sxql:make-sql-symbol (table-name foreign-class))
                                              :on (make-join-condition ,class foreign-class)))))
                         nil)))
                (dolist (,clause (list ,@clauses))
                  (when ,clause
                    (add-child ,sql ,clause)))
                (let ((,results (select-by-sql ,class ,sql)))
                  (unless *want-cursor*
                    (dolist (,foreign-class (remove-duplicates ,include-classes))
                      (include-foreign-objects ,foreign-class ,results)))
                  (values ,results ,sql))))))))))

Macroexpansion:
(let ((#:class253 class)) (locally (declare (sb-ext:disable-package-locks where)) (progn (setf #:class253 (ensure-class #:class253)) (let* ((*sql-symbol-conversion* (function unlispify)) (#:sql248 (select :* (from (make-sql-symbol (table-name #:class253))))) (#:include-classes251 (quote nil))) (macrolet ((where (expression) (sb-int:quasiquote (make-clause :where #S(sb-impl::comma :expr (expand-op expression (quote #:class253)) :kind 0))))) (declare (sb-ext:muffle-conditions sb-ext:code-deletion-note)) (flet ((includes (&rest classes) (appendf #:include-classes251 (mapcar (function ensure-class) classes)) nil) (joins (foreign-class &key (type :inner)) (let ((foreign-class (ensure-class foreign-class))) (add-child #:sql248 (ecase type (:inner (inner-join (make-sql-symbol (table-name foreign-class)) :on (make-join-condition #:class253 foreign-class))) (:left (left-join (make-sql-symbol (table-name foreign-class)) :on (make-join-condition #:class253 foreign-class))))) nil))) (dolist (#:clause249 (list (where-and fields-and-values class) (limit 1))) (when #:clause249 (add-child #:sql248 #:clause249))) (let ((#:results250 (select-by-sql #:class253 #:sql248))) (unless *want-cursor* (dolist (#:foreign-class252 (remove-duplicates #:include-classes251)) (include-foreign-objects #:foreign-class252 #:results250))) (values #:results250 #:sql248))))))))