SELECT 地区, 县市区, 出让宗数 AS 经营性用地宗数, 
          (case w地方式 when '出让(招标)' then 出让宗数 else 0 end) AS 招标宗数,
          (case w地方式 when '出让(拍卖)' then 出让宗数 else 0 end) AS 拍卖宗数,
          (case w地方式 when '出让(挂牌)' then 出让宗数 else 0 end) AS 挂牌宗数,
          批准日期
FROM dbo.land_income_heji a

解决方案 »

  1.   

    SELECT 地区, 县市区, 出让宗数 AS 经营性用地宗数, 
              (case 供地方式 when '出让(招标)' then 出让宗数 else 0 end) AS 招标宗数,
              (case 供地方式 when '出让(拍卖)' then 出让宗数 else 0 end) AS 拍卖宗数,
              (case 供地方式 when '出让(挂牌)' then 出让宗数 else 0 end) AS 挂牌宗数,
              批准日期
    FROM dbo.land_income_heji a
    ...