SELECT
(users.created_at::timestamp - invitations.created_at::timestamp) as elapsed,
percentile_disc(0.50)
WITHIN GROUP (ORDER BY elapsed) as median
FROM invitations
join users on users.id = invitations.user_id
试图找出从创建邀请到用户接受邀请之间的中间等待时间。此代码生成错误:
ERROR: column "elapsed" does not exist.
我该如何修复它?