2

I have the below query and was wondering if it is possible to convert it into a prisma query or would I have to use raw queries itself?

SELECT
EXTRACT(DAY FROM MAX(joindate) - CURRENT_DATE AS DateDifference
TO_CHAR(date_of_implementation, 'Mon') as "name",
SUM("cost_saved") as "savings" 
FROM tracker_info
Teknoville
  • 459
  • 1
  • 7
  • 18

1 Answers1

2

Currently, this is only possible via a raw query but I would suggest creating a feature request here that allows raw function access inside Prisma API's.

Raphael Etim
  • 612
  • 5
  • 8