Created
March 1, 2016 15:35
-
-
Save Ygreg/88256704232f185a4282 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"SELECT ROUND(100.0 * SUM(CASE WHEN status = $1 THEN 1 ELSE 0 END) / COUNT(*), 2) AS share, date_trunc('month', created_at) AS date_trunc_created_at | |
FROM \"sessions\" AS k0 GROUP BY date_trunc('month', created_at)", [2]} | |
{"SELECT ROUND(100.0 * SUM(CASE WHEN status = $1 THEN 1 ELSE 0 END) / COUNT(*), 2) AS share, date_trunc($2, created_at) AS date_trunc_created_at | |
FROM \"sessions\" AS k0 GROUP BY date_trunc($3, created_at)", [2, "month", "month"]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment