select b.*,a.Tags,a.id from Posts a left join PostTags b ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Role-playing Games

Q&A for gamemasters and players of tabletop, paper-and-pencil role-playing games

select b.*,a.Tags,a.id from Posts a
left join PostTags b on a.id = b.postid
where creationdate between '2017-01-01' AND '2017-12-31'
and b.TagID in ('3',
'16',
'17',
'5',
'1386',
'9',
'2',
'820',
'4',
'58338')


--tagid 6398

set rowcount 11
select count(*) as CNT,b.TagId into #temp1 from Posts a
left join PostTags b on a.id = b.postid
where creationdate between '2017-01-01' AND '2017-12-31'
--and Tags like '%css3%'
--and PostId in ('41449680','41438403')
group by b.TagId
order by Count(*) desc
--limit 10

select * from #temp1




select top 10* from Posts a
--left join #temp1 b on

Enter Parameters

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