이벤트를 위한 Data explorer 쿼리?

코드를 외우지 않고도 읽기 쉽게 만들려면 다음과 같은 작은 요소를 추가할 수 있습니다:


-- [params]
-- topic_id :topic_id

SELECT ei.user_id,
      CASE 
       WHEN ei.status = 0 THEN 'Going' 
       WHEN ei.status = 1 THEN 'Interested'
       WHEN ei.status = 2 THEN 'Not going' 
        END AS "Going?"
FROM discourse_post_event_invitees ei
JOIN posts p ON p.id = ei.post_id 
WHERE p.topic_id = :topic_id
ORDER BY ei.status