単独ライター/複数ライターの評価比較の実行結果

このSQLをお気に入りに登録

SQLの説明

各データのゲーム一覧が欲しい場合、ソースコード内のコメントアウト(/**/)を消して、実行フォームに放り込んでください。

検索結果

発売年単独med単独cnt複数med複数cnt単独70med単独70cnt複数70med複数70cnt
201981.67359.67381.6730
201870.815471.708075.503077.2843
201771.896171.247478.543576.5340
201673.005274.686577.543777.7649
201567.943671.797777.131677.6141
201468.157471.869178.222776.0853
201366.827272.869377.523176.4560
201267.706071.519776.552976.7555
201169.346472.538676.433077.4248
201068.175270.766676.852076.8336
200967.815470.708179.331577.3044
200868.046870.387877.392377.6136
200767.766369.826677.103076.3832
200667.198869.667075.793377.7731
200565.008168.997276.552078.1828
200468.677969.635977.042776.6822
200368.707869.645377.403078.9521
200265.359265.425678.581976.0014
200164.126869.243477.271178.0015
200058.924972.581278.00678.836
199963.803560.14776.091176.001
199863.401068.13875.33378.502
199767.60569.33382.00176.001
199672.43781.67378.00481.673
199577.754085.5020
199472.003075.5020
199375.50275.00175.50275.001
199274.00265.00180.0010
199162.00272.00174.00172.001
199065.001000
198940.001000
198870.001000

実行したSQL

      select to_char(foo.sellday, 'yyyy') as 発売年
     , round(avg(case when tandoku then foo.median else NULL end), 2) as 単独med
     , count(case when tandoku then foo.game_id else NULL end) as 単独cnt
/*     , string_agg(case when tandoku then foo.gamename||'('||foo.median||')' else NULL end, ' / ' order by foo.median desc) as 単独game*/

     , round(avg(case when tandoku then NULL else foo.median end), 2) as 複数med
     , count(case when tandoku then NULL else foo.game_id end) as 複数cnt
/*     , string_agg(case when tandoku then NULL else foo.gamename||'('||foo.median||')' end, ' / ' order by foo.median desc) as 複数game*/

     , round(avg(case when coalesce(foo.median, 0) <= 70 then NULL when tandoku then foo.median else NULL end), 2) as 単独70med
     , count(case when coalesce(foo.median, 0) <= 70 then NULL when tandoku then foo.game_id else NULL end) as 単独70cnt
/*     , string_agg(case when coalesce(foo.median, 0) <= 70 then NULL when tandoku then foo.gamename||'('||foo.median||')' else NULL end, ' / ' order by foo.median desc) as 単独70game*/

     , round(avg(case when coalesce(foo.median, 0) <= 70 then NULL when tandoku then NULL else foo.median end), 2) as 複数70med
     , count(case when coalesce(foo.median, 0) <= 70 then NULL when tandoku then NULL else foo.game_id end) as 複数70cnt
/*     , string_agg(case when coalesce(foo.median, 0) <= 70 then NULL when tandoku then NULL else foo.gamename||'('||foo.median||')' end, ' / ' order by foo.median desc) as 複数70game*/

  from (
        select ttt.game_id
             , ttt.gamename
             , ttt.brandname
             , ttt.sellday
             , ttt.median
             , ttt.count
             , case when count(ss.creater) = 1 then TRUE else FALSE end::boolean as tandoku
          from toukei_temp_table as ttt
             , shokushu as ss
         where ttt.game_id = ss.game
           and ttt.model = 'PC'
           and ttt.coterie is NULL
           and ss.shubetu = 2/*職種:ライター*/
           and ttt.game_id in (
                   select ig.game
                     from itemlist as il
                        , item_game as ig
                    where il.id = ig.item
                      and fixedprice > 7000
                              )
         group by ttt.game_id
                , ttt.gamename
                , ttt.brandname
                , ttt.sellday
                , ttt.median
                , ttt.count
        ) as foo
 group by to_char(foo.sellday, 'yyyy')
 order by 発売年 desc
    

表紙
 ひろいん
 egamescape @ gmail.com