1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【チートシート】 SQLのコマンド一覧(関数)

Posted at

指定したカラムの値の個数を取得(値がNULLのものを除く)

db-sample
COUNT(カラム名)

指定したカラムの値の個数を取得(値がNULLのものを含む)

db-sample
COUNT(*)

指定したカラムの値の合計値を取得

db-sample
SUM(カラム名)

指定したカラムの値の平均値を取得

db-sample
AVG(カラム名)

指定したカラムの最大値を取得

db-sample
MAX(カラム名)

指定したカラムの最小値を取得

db-sample
MIN(カラム名)
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?