I want to query SO new tags created during last week. We have tables Posts,Tags, PostTags (leave out TagSynonyms for now).
Tags doesn't have CreationDate so we probably need to use join with min(Post.CreationDate)
last week = getdate() - 7
I want to query SO new tags created during last week. We have tables Posts,Tags, PostTags (leave out TagSynonyms for now).
Tags doesn't have CreationDate so we probably need to use join with min(Post.CreationDate)
last week = getdate() - 7
Copyright © 2021 Jogjafile Inc.
This query will produce a list of posts that the tags are created the past week. The
JOINbetween the tables is only to bring information. TheWHEREclause would exclude tags which have been used prior to the 7 days.The subquery will produce a list of unique tag IDs that where used in the past. Following your last week example in question, the formula is created by using the
DATEDIFFfunction.