select distinct p.Id as Id, p.OwnerUserId as UserId, case...

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 
    distinct p.Id as Id,
    p.OwnerUserId as UserId,
    case 
      when t.tagName like 'amazon-%' then 'aws'
      when t.tagName like 'aws-%' then 'aws'      
    end as platform
  from Tags t
  JOIN PostTags pt ON t.Id = pt.TagId
  JOIN Posts p ON p.Id = pt.PostId --and p.PostTypeId = 1 -- PostTypeId 1: Question
  where 
    t.TagName like 'amazon-%'
    or t.TagName like 'aws-%'

Enter Parameters

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