Q&A about the site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles
select q.id as [Post link] , acc.id as [Answer Link], q.OwnerUserId AS 'User ID', q.PostTypeId AS 'Post Type' -- , t.tagname --, left(q.body,200) as question -- , left(acc.body,200) as answer from posts q inner join posttags pt on pt.postid = q.id inner join tags t on t.id = pt.tagid inner join posts acc on acc.id = q.acceptedanswerid where tagname = 'java' and q.posttypeid = 1 order by q.id , acc.score,q.OwnerUserId,q.PostTypeId