SELECT Users.Reputation, DATEDIFF("dd", Users.CreationDat...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow Meta en español

Preguntas y respuestas sobre el sitio para programadores y profesionales de la informática

SELECT 
    Users.Reputation,
    DATEDIFF("dd", Users.CreationDate, Posts.CreationDate)
        AS "Membership length",
    case
      when Posts.AcceptedAnswerId is null then -1
      when Posts.AcceptedAnswerId is not null then 1
    end as "Accepted"
      
FROM
    Posts
  INNER JOIN
    Users ON Users.Id = OwnerUserId
WHERE 
    PostTypeId = 1 and CommunityOwnedDate is null and ClosedDate is null

Enter Parameters

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