#is this possible to do ORDER BY ABS(lat - $userLat) + ABS(lng - $userLng) ASC with Prisma

2 messages · Page 1 of 1 (latest)

placid hawk
#

I am working on a side project that requires me to sort by closest locations but I can not seem to find a way to do the following with Prisma.

SELECT * FROM Locations ORDER BY ABS(lat - $userLat) + ABS(lng - $userLng) ASC

Any help would be much appreciated, thanks.

placid hawk
#

is this possible to do ORDER BY ABS(lat - $userLat) + ABS(lng - $userLng) ASC with Prisma