Inspect phrase distribution of recent user posts with low reputation


Please login or register to vote for this query.

(click on this box to dismiss)


Q&A for people studying math at any level and professionals in related fields

declare @past int = 2;
declare @Today smalldatetime = getdate();
declare @After smalldatetime = DATEADD(week, @past * -1, @Today); 

with unit as (
  select top 100 

  from users u
    u.CreationDate > @after
    and reputation between 2 and 100
  order by 
    creationDate desc


main as (

  select postId, userId,score,title,p.body,p.tags,
    try_convert(xml,p.body) tmp,
    p.creationDate postDate, 
    u.creationDate signupDate 
  from posts p 
  inner join unit u on 
    p.OwnerUserId = u.Id and p.postTypeId = 1
    p.CreationDate > @after
  -- order by,postDate desc


SELECT T2.Loc.query('.')  
FROM main
CROSS APPLY tmp.nodes('/p') AS T2(Loc)

Enter Parameters

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