DECLARE @dateBegin DATETIME = '2021-09-01' DECLARE @dateE...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Materials Modeling Meta

Q&A for materials modelers and data scientists

DECLARE @dateBegin DATETIME = '2021-09-01'
DECLARE @dateEnd DATETIME = DATEADD(MONTH, 1, @dateBegin)



DECLARE @tagID INT =
        (
            SELECT Id FROM Tags WHERE TagName = 'entity-framework'
        );



--SELECT all posts
SELECT A.Id,
       A.Title,
       A.ViewCount,
       A.Score,
       A.CreationDate,
       'https://stackoverflow.com/questions/' + CAST(A.Id AS VARCHAR(MAX)) AS link
FROM Posts AS A
WHERE
    --Post is a question
    EXISTS
(
    SELECT 1 FROM PostTags AS X WHERE X.PostId = A.Id AND X.TagId = @tagID
)
    -- Post as an answer
    AND A.AcceptedAnswerId IS NOT NULL
    AND A.CreationDate > @dateBegin
    AND A.CreationDate < @dateEnd
    AND A.PostTypeId = 1
ORDER BY A.ViewCount DESC;

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results