שימוש באופרטור IN ב-Data Explorer

Sure, here goes. The query is used to retrieve the info necessary to generate a custom log file that can be digested by Gource. See: Custom Log Format · acaudwell/Gource Wiki · GitHub

-- This query retrieves a list of the latest posts,
-- along with associated user information and topic details.
-- The result is sorted by creation date in ascending order.

-- The selected fields are as follows:
-- timestamp: An ISO 8601 or unix timestamp of when the post was created.
-- username: The username of the user who created the post.
-- type: A hardcoded value 'A' indicating the type of action (in this case, 'Added').
-- topic: The ID of the topic to which the post belongs.
-- post_number: The unique number of the post within its topic.
-- reply_to_post_number: The post number to which this post is a reply (if any).
-- raw: The content of the post, limited to the first 30 characters.
-- category_id: The ID of the category to which the topic belongs.

SELECT 
    p.created_at as timestamp, 
    u.username, 
    'A' as type, 
    p.topic_id as topic, 
    p.post_number as post_number, 
    p.reply_to_post_number as reply_to_post_number, 
    SUBSTRING(p.raw, 1, 30) AS raw,
    t.category_id
FROM
    posts p
JOIN
    users u ON p.user_id = u.id
JOIN
    topics t ON p.topic_id = t.id
WHERE
    t.category_id IN (420, 421, 426)
    AND t.created_at > '2022-01-01'
ORDER BY
    p.created_at ASC
LIMIT 1000