我在下面提到了我的sql代码,
SELECT
COUNT(id) FILTER (WHERE level_id = 1 AND applied_date::date = created_at::date) AS "D0_mobile_verification",
COUNT(id) FILTER (WHERE level_id = 1 AND applied_date::date != created_at::date) AS "D+_mobile_verification",
COUNT(id) FILTER (WHERE level_id = 4 AND applied_date::date = created_at::date) AS "D0_Docs",
COUNT(id) FILTER (WHERE level_id = 4 AND applied_date::date != created_at::date) AS "D+_Docs",
COUNT(id) FILTER (WHERE level_id = 9 AND applied_date::date = created_at::date) AS "D0_Esign",
COUNT(id) FILTER (WHERE level_id = 9 AND applied_date::date != created_at::date) AS "D+_Esign"
FROM
leads_table
结果类似于
但是我想要下面提到的结果。
你能帮我吗