Jump to content

ddwildnd

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by ddwildnd

  1. Try something like this...

     

    select Sector,

    (select count(type) from sectors b where a.sector = b.sector and type = 'X') AS "Nr of X",

    (select count(type) from sectors b where a.sector = b.sector and type = 'Y') AS "Nr of Y",

    (select count(type) from sectors b where a.sector = b.sector and type = 'Z') AS "Nr of X"

    from Sectors a

    group by sector

×
×
  • Create New...