My Favorites data

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 
  p.id [Post Link],
  p.Score,
  count(stars.id) Star_count,
  p.answerCount,
  p.viewcount,
  p.title,
  p.body
from 
  votes myfavs
  INNER JOIN Posts P
  ON myfavs.PostId = P.Id 
  INNER JOIN votes stars
  ON p.id = stars.PostId 
    and stars.votetypeid = 5
where 
  myfavs.votetypeid = 5
  and 
  myfavs.userid = ##UserId##
group by 
  p.id,
  p.Score,
  p.answerCount,
  p.viewcount,
  p.title,
  p.body

Enter Parameters

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