Who has marked a particular topic as Solved

AI-generated summary

JammyDodger provided an SQL query to identify which user marked a specific topic as Solved. The query selects the target_topic_id, acting_user_id, and created_at (as date) from the user_actions table, filtering by the given :topic_id and action_type = 15 (which represents the ‘Solved’ action), and orders results by creation date descending.

To look up who has marked a particular topic as Solved:

-- [params]
-- topic_id :topic_id 

SELECT 
   target_topic_id, 
   acting_user_id, 
   created_at::date
FROM user_actions
WHERE target_topic_id = :topic_id
AND action_type = 15
ORDER BY created_at DESC
3 Likes