Why my query is not working `

    let r = await strapi
      .query("order")
      .model.query((db) => {
        db.where("created_at", ">=", value.from);
        db.where("created_at", "<", value.to);
        db.where("active", "=", false);
        db.where("paymentStatus", "=", "success");
        db.sum("totalPaidPrice");
      })
      .fetch();

this query is working on local with a sqlite ,

but not working with Postgres, so weird don’t know why.