sample

0

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

With Question(id, user_id, title, body, creation_date, closed_date)
as
(
  select TOP 50000 Id, OwnerUserId , Title, Body, CreationDate, ClosedDate
  from Posts
  WHERE 
    PostTypeId = 1  and ClosedDate is null 
    and CreationDate >= '2019-01-01' and CreationDate <= '2019-11-01'
  ORDER BY NEWID()
)

SELECT 
    p.Body,
    p.Id as A_id,
    concat(q.title, '. ', q.body) as Questions,
    q.id as Q_id,
    q.creation_date as Q_CreateDate
FROM
    Posts AS p, Question as q
WHERE 
    PostTypeId = 2 and p.ParentId = q.id and p.OwnerUserId != q.user_id
order by q.creation_date, q.id

Enter Parameters

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