This query is marked as a draft This query has been published by Zache.

SQL

AخA
 
select 
    page_title, 
    page_namespace, 
    r.rev_timestamp, 
    group_concat(ctd_name) AS tags 
FROM 
    (
        SELECT 
            MIN(rev_timestamp) AS min_rev_timestamp, 
            rev_page 
        FROM 
            categorylinks,
            revision 
        WHERE 
            cl_from=rev_page 
            AND cl_to = "Sivut,_joissa_on_viittausvirheitä" 
        GROUP BY rev_page
    ) AS t, 
    page, 
    revision AS r 
    LEFT JOIN change_tag ON r.rev_id=ct_rev_id 
    LEFT JOIN change_tag_def ON ctd_id=ct_tag_id 
WHERE 
    t.rev_page=page_id 
    AND r.rev_page=t.rev_page 
    AND r.rev_timestamp=t.min_rev_timestamp
GROUP BY t.rev_page
ORDER BY tags DESC
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.

Checking query status...