title: Using where condition in sequelize for filtering according to distance
body: <p>I have to filter the posts based on the distance from current location. Have attached the code below for reference,but it does not work (calculating distance works fine though),only where condition for distance doesn't seems to work. Also when I try the distance filter in top where condition, it throws me posts.distance column not found error</p>
  <pre><code>const posts = await Post.findAll({
          where: {
              mobile: {
                  [Op.ne]: mobile,
              },
          },
          attributes: 
              include: [
                  [
                      db.Sequelize.fn(
                          &quot;ST_Distance&quot;,
                          db.Sequelize.col(&quot;location&quot;),
                          db.Sequelize.fn(
                              &quot;ST_MakePoint&quot;,
                              parsedLocation.lat,
                              parsedLocation.lng
                          )
                      ),
                      &quot;distance&quot;,
                  ],
              ],
              where: {
                  distance: {
                      [Op.between]: [
                       0,100
                      ],
                  },
              },
          },
          include: {
              model: UserProfile,
              attributes: [&quot;username&quot;],
          },
      });
  </code></pre>