[BO] 임가현황 작업 중 (10)

This commit is contained in:
kangsunlee
2025-06-18 21:21:06 +09:00
parent 693de9259f
commit ecf2dd8dbe
42 changed files with 878 additions and 235 deletions

View File

@@ -2,6 +2,7 @@
DROP VIEW v_uicode_view_name;
DROP VIEW v_household_with_code;
DROP VIEW v_household_researcher;
DROP VIEW v_household_visit;
-- CREATE VIEW
@@ -62,7 +63,7 @@ SELECT
MIN(v.visit_date) AS first_visit_date,
MAX(v.visit_date) AS second_visit_date,
BOOL_OR(v.is_gift_sent) AS is_gift_sent
FROM researcher_household_visit v
FROM household_visit v
JOIN researcher_has_household rhh ON v.household_seq = rhh.household_seq
WHERE rhh.is_deleted = false
GROUP BY rhh.household_seq;