Lastest data dates in the Data Explorer

0

Please login or register to vote for this query.

(click on this box to dismiss)

The SEDE "most recent" displays lie!! WARNING: This query can take a minute or two on the first run per site.

Computational Science

Q&A for scientists using computers to solve scientific problems

-- Lastest data dates in the Data Explorer
-- The SEDE "most recent" displays lie!!
-- WARNING: This query can take a minute or two on the first run per site.

WITH LatestDates AS (
    SELECT           'Posts' T,              'CreationDate' C,       MAX (CreationDate)       M FROM Posts
    UNION ALL SELECT 'Posts' T,              'LastEditDate' C,       MAX (LastEditDate)       M FROM Posts
    UNION ALL SELECT 'Posts' T,              'LastActivityDate' C,   MAX (LastActivityDate)   M FROM Posts
    UNION ALL SELECT 'Posts' T,              'ClosedDate' C,         MAX (ClosedDate)         M FROM Posts
    UNION ALL SELECT 'Posts' T,              'CommunityOwnedDate' C, MAX (CommunityOwnedDate) M FROM Posts

    UNION ALL SELECT 'Users' T,              'CreationDate' C,       MAX (CreationDate)       M FROM Users
    UNION ALL SELECT 'Users' T,              'LastAccessDate' C,     MAX (LastAccessDate)     M FROM Users

    UNION ALL SELECT 'Comments' T,           'CreationDate' C,       MAX (CreationDate)       M FROM Comments
    UNION ALL SELECT 'Badges' T,             'Date' C,               MAX (Date)               M FROM Badges
    UNION ALL SELECT 'PostFeedback' T,       'CreationDate' C,       MAX (CreationDate)       M FROM PostFeedback
    UNION ALL SELECT 'PostHistory' T,        'CreationDate' C,       MAX (CreationDate)       M FROM PostHistory

    UNION ALL SELECT 'SuggestedEdits' T,     'CreationDate' C,       MAX (CreationDate)       M FROM SuggestedEdits
    UNION ALL SELECT 'SuggestedEdits' T,     'ApprovalDate' C,       MAX (ApprovalDate)       M FROM SuggestedEdits
    UNION ALL SELECT 'SuggestedEdits' T,     'RejectionDate' C,      MAX (RejectionDate)      M FROM SuggestedEdits

    UNION ALL SELECT 'SuggestedEditVotes' T, 'CreationDate' C,       MAX (CreationDate)       M FROM SuggestedEditVotes
    UNION ALL SELECT 'TagSynonyms' T,        'CreationDate' C,       MAX (CreationDate)       M FROM TagSynonyms
    UNION ALL SELECT 'TagSynonyms' T,        'ApprovalDate' C,       MAX (ApprovalDate)       M FROM TagSynonyms
    UNION ALL SELECT 'Votes' T,              'CreationDate' C,       MAX (CreationDate)       M FROM Votes
)
SELECT              '*MAX*'     AS [Table],
                    '*OVERALL*' AS Value,
                    MAX (M)     AS [Last Date]
FROM                LatestDates
UNION ALL SELECT    T           AS [Table],
                    C           AS Value,
                    M           AS [Last Date]
FROM                LatestDates
ORDER BY            [Table],
                    Value

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results