Skip to content

Instantly share code, notes, and snippets.

@shyuan
Created December 15, 2017 10:58
Show Gist options
  • Save shyuan/7ef95ac136aa1ee9da18b5381c46d7b8 to your computer and use it in GitHub Desktop.
Save shyuan/7ef95ac136aa1ee9da18b5381c46d7b8 to your computer and use it in GitHub Desktop.
根據 timestamp 欄位,計算每日建立資料筆數
SELECT DATE(FROM_UNIXTIME(`created_at`)) AS create_date, COUNT(id) AS count FROM xx_table GROUP BY create_date;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment