shg25 / rnsite

raisyumo-nanitozo!!
Apache License 2.0
0 stars 0 forks source link

ユーザー詳細に月毎の何卒数を表示 #173

Closed shg25 closed 1 year ago

shg25 commented 1 year ago
shg25 commented 1 year ago
shg25 commented 1 year ago
shg25 commented 1 year ago
shg25 commented 1 year ago

ローカルでクエリを見てみる

shg25 commented 1 year ago

確認!

SELECT DATE_TRUNC('month', "airs_nanitozo"."created_at" AT TIME ZONE 'Asia/Tokyo') AS "monthly_date", COUNT("airs_nanitozo"."id") AS "count" FROM "airs_nanitozo" WHERE "airs_nanitozo"."user_id" = 2 GROUP BY DATE_TRUNC('month', "airs_nanitozo"."created_at" AT TIME ZONE 'Asia/Tokyo') ORDER BY "monthly_date" ASC

良し悪しはそんなに分からないけど、違和感はなさそうかな?

クローズ!