Select * from posts p join posts p2 on p.owneruserid = p2...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Portuguese Language

Q&A for linguists, teachers and learners wanting to discuss the finer points of the Portuguese language

Select * from
posts p
join posts p2 on p.owneruserid = p2.owneruserid and p.id < p2.id and p.posttypeid =1 and p2.posttypeid=1
join posts p3 on p.owneruserid = p3.owneruserid and p.id < p3.id and p3.id != p2.id and p.posttypeid =1 and p3.posttypeid=1

join users on p.owneruserid = users.id 
and DATEADD(Day, DATEDIFF(Day, 0, users.CreationDate), 0) = DATEADD(Day, DATEDIFF(Day, 0, p.CreationDate), 0)
and DATEADD(Day, DATEDIFF(Day, 0, users.CreationDate), 0) = DATEADD(Day, DATEDIFF(Day, 0, p2.CreationDate), 0)
and DATEADD(Day, DATEDIFF(Day, 0, users.CreationDate), 0) = DATEADD(Day, DATEDIFF(Day, 0, p3.CreationDate), 0)

where users.CreationDate > '2014'

Enter Parameters

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