Skip to content

Commit 7d03a11

Browse files
Merge pull request pradanvirudhunagar#14 from Churchill427/main
SQL:postfunding_datewise_dashboard_data
2 parents cd0bcd4 + 47e561f commit 7d03a11

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const query = `
2+
SELECT s.status, COUNT(f.status) AS count
3+
FROM (
4+
SELECT 1 AS status UNION ALL
5+
SELECT 2 UNION ALL
6+
SELECT 3 UNION ALL
7+
SELECT 4 UNION ALL
8+
SELECT 5 UNION ALL
9+
SELECT 6 UNION ALL
10+
SELECT 7 UNION ALL
11+
SELECT 8 UNION ALL
12+
SELECT 9
13+
) AS s
14+
LEFT JOIN forms f ON f.status = s.status AND f.user_id = ? AND f.created_at = ?
15+
GROUP BY s.status
16+
ORDER BY s.status
17+
`;

0 commit comments

Comments
 (0)