/*Select Id As [Post Link], OwnerUserId As [User Link], D...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

/*Select Id As [Post Link],
    OwnerUserId As [User Link],
    DateDiff(Month, Max(CreationDate), GetDate())
From Posts
Where Body Like '%blend-exchange.giantcowfilms.com/b/[0-9]%'
Group By Id, OwnerUserId*/


Declare @PasteAll Table (
    CreationDate date,
    Blends int
)

Insert Into @PasteAll
Select Cast(CreationDate As Date),
    Count(Id)
From Posts
Where Body Like '%pasteall.org/blend/[0-9]%'
Group By Cast(CreationDate As Date)

Declare @BlendExchange Table (
    CreationDate date,
    Blends int
)

Insert Into @BlendExchange
Select Cast(CreationDate As Date),
    Count(Id)
From Posts
Where Body Like '%blend-exchange.giantcowfilms.com/b/[0-9]%'
Group By Cast(CreationDate As Date)

Select PasteAll.CreationDate,
    PasteAll.Blends As PasteAll,
    BlendExchange.Blends As BlendExchange
From @PasteAll PasteAll
Full Join @BlendExchange BlendExchange
    On BlendExchange.CreationDate = PasteAll.CreationDate

Enter Parameters

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