[BO] 임가현황 작업 중 (10)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user