You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT
LAG(a.id, 1) OVER (
ORDER BYa.sent_atDESC
) previous_a,
lead(a.id, 1) OVER (
ORDER BYa.sent_atDESC
) next_a
FROM
...
Since esqueleto doesn't have lag and lead yet, I want to create it using raw sql, but I believe using unsafeSqlFuntion doesn't work due to having over clause.
Hope someone could point me to the right direction.
The text was updated successfully, but these errors were encountered:
I want to do a select as the following:
Since
esqueleto
doesn't have lag and lead yet, I want to create it using raw sql, but I believe usingunsafeSqlFuntion
doesn't work due to havingover
clause.Hope someone could point me to the right direction.
The text was updated successfully, but these errors were encountered: