Follow these steps on the MM Postgres database in DBeaver. Run each step in order, in the same editor session.
- Exported CSV/TSV from DIR (MySQL) using this query to get latest Bidder lead statuses with rn:
SELECT ls.*, ROW_NUMBER() OVER (
PARTITION BY ls.local_resource_lead_id
ORDER BY ls.created_at DESC, ls.id DESC
) rn