case when 的兩種用法,查出結果橫向,縱向展示

1. select    county_id    ,county_name   ,count(distinct user_id) as totalRow   ,count(distinct user_id) as totalUser   ,count(distinct case when result=120 then user_id end) as cgUser   ,count(distin
相關文章
相關標籤/搜索