どうすればできますかselect count(artc_id) as cval, max(srt_id) as maxval, artc_title from table where artc_pub = 1
したがって、次のような結果を得ることができます。
       cval | maxval | artc_title | artc_pub
    -----------------------------------------
       4         4     Title 1         1 
                       Title 2         1
                       Title 3         1
                       Title 4         1
私のテーブルの一部は以下です
artc_id | srt_id | artc_title | artc_pub
-----------------------------------------
   1         1     Title 1         1 
   2         2     Title 2         1
   3         3     Title 3         1
   4         4     Title 4         1
   1         5     Title 1         2
   2         6     Title 2         2
試してみselect count(artc_id) as cval, max(srt_id) as maxval, artc_title from table where artc_pub = 1ましたが、最初のタイトルが 1 行しか表示されません。ここには昔ながらの選択以上のものがあるに違いないと思います。
以下のすべての回答により、次のような結果が得られます。
cval;maxval;artc_title
1   ;     1; Title 1
1   ;     2; Title 2
1   ;     3; Title 3
1   ;     4; Title 4
1   ;     5; Title 5
私の質問で言及した方法とは異なります。