Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE VIEW rep_lls_assign_agent_to_be_added as (
- SELECT
- act.ap_id "id",
- act.agent_name "agent_name",
- act.market "market",
- date(min(act.saved_at)) as "assign_date"
- FROM prod_reporting_ops.rep_ops_lls_ACTIVITIES AS act
- LEFT JOIN prod_reporting_ops.rep_lls_assign_agent as ap
- ON ap.id = act.ap_id
- WHERE
- act.saved_at >= "2019-02-07"
- and ap.id IS NULL
- and act.ap_id <> ""
- and act.ap_id NOT LIKE '%/%'
- group by act.ap_id);
Add Comment
Please, Sign In to add comment