Hey been a while since i've been in here and haven...
# orm-help
p
Hey been a while since i've been in here and haven't been following prisma too much. Starting a new project @ work and looking to shake things up and use the tools I actually want to use. Currently have a Postgresql db with a bunch of entries, some of which have lat/lon data. I was curious if it is possible to use some of prisma's aggregation functionality to mimic querying by bounding box - specifically looking at this example
Copy code
const usersByCountry = await prisma.user.groupBy({
  by: ['country'],
  count: {
    country: true,
  },
  having: {
    country: {
      count: {
        gt: 3,
      },
    },
  },
})
}
so you could do something like aggregate by
lat: {gt : whatever, lt: whatever} , lon: {gt : whatever, lt: whatever}
or something?
r
@protzman 👋 I don’t think so, but let me confirm.
p
cool. any info would help. would love to use prisma but may have to just ingest into something like elastic if not to take advantage of their bbox functionality. had a good time using prisma 1