Start Processing : 2025-06-14 12:20:44
0 rows affectedTRUNCATE db_ebq_opportunities_all
[1] 0.07 seconds -> 0 rows affected
update db_ebq_opportunities_wk
set _leadSource = 'EBQ' where length(_leadSource) = 0
[5] 0.03 seconds -> 0 rows affected
update db_ebq_opportunities_wk set _client = 'WK' where _client is null
[10] 0 seconds -> 0 rows affected
UPDATE db_ebq_opportunities_wk
SET
_createdTS = STR_TO_DATE(_createdDate, '%c/%e/%Y') ,
_closeTS= STR_TO_DATE(_closeDate, '%c/%e/%Y'),
_ebqSetTS= STR_TO_DATE(_ebqSet, '%c/%e/%Y');
[20] 0 seconds -> -1 rows affected
UPDATE db_ebq_opportunities_wk
SET
_ebqCompletedTS= STR_TO_DATE(_ebqCompleted, '%c/%e/%Y')
where length(_ebqCompleted) > 0
[25] 0 seconds -> 0 rows affected
UPDATE db_ebq_opportunities_wk
set _createdMonth = month(_ebqSetTS), _createdYear = year(_ebqSetTS);
[30] 0 seconds -> 0 rows affected
insert into db_ebq_opportunities_all (_opportunitySource, _accountName, _opportunityName, _opportunityID, _opportunityOwner, _totalAcv, _amount, _accountID, _industry, _age, _type, _stageDuration, _leadSource, _channel, _lineOfBusiness, _reasonLost, _accountTier, _stage, _team, _loanOriginationSystem, _documentPrep, _estimatedAnnualLoanVolume, _primaryCampaign, _primaryCampaignSource, _contactEmail, _createdTS, _closeTS, _createdMonth, _createdYear, _client)
select _opportunitySource, _accountName, _opportunityName, _opportunityID, _opportunityOwner, _totalAcv, _amount, _accountID, _industry, _age, _type, _stageDuration, _leadSource, _channel, _lineOfBusiness, _reasonLost, _accountTier, _stage, _team, _loanOriginationSystem, _documentPrep, _estimatedAnnualLoanVolume, _primaryCampaign, _primaryCampaignSource, _contactEmail, _createdTS, _closeTS, _createdMonth, _createdYear, _client from db_ebq_opportunities_eo
ON DUPLICATE KEY UPDATE
_opportunitySource = values(_opportunitySource),
_accountName = values(_accountName),
_opportunityName = values(_opportunityName),
_opportunityID = values(_opportunityID),
_opportunityOwner = values(_opportunityOwner),
_totalAcv = values(_totalAcv),
_amount = values(_amount),
_accountID = values(_accountID),
_industry = values(_industry),
_age = values(_age),
_type = values(_type),
_stageDuration = values(_stageDuration),
_leadSource = values(_leadSource),
_channel = values(_channel),
_lineOfBusiness = values(_lineOfBusiness),
_reasonLost = values(_reasonLost),
_accountTier = values(_accountTier),
_stage = values(_stage),
_team = values(_team),
_loanOriginationSystem = values(_loanOriginationSystem),
_documentPrep = values(_documentPrep),
_estimatedAnnualLoanVolume = values(_estimatedAnnualLoanVolume),
_primaryCampaign = values(_primaryCampaign),
_primaryCampaignSource = values(_primaryCampaignSource),
_contactEmail = values(_contactEmail),
_createdTS = values(_createdTS),
_closeTS = values(_closeTS),
_createdMonth = values(_createdMonth),
_createdYear = values(_createdYear),
_client = values(_client)
[35] 0.02 seconds -> 0 rows affected
insert into db_ebq_opportunities_all (_opportunitySource, _accountName, _opportunityName, _opportunityID, _opportunityOwner, _totalAcv, _amount, _accountID, _industry, _age, _type, _stageDuration, _reasonLost, _stage, _estimatedAnnualLoanVolume, _primaryCampaignSource, _contactEmail, _createdTS, _closeTS, _createdMonth, _createdYear, _ebqSetTSwk, _ebqCompletedTSwk, _client)
select _leadSource, _accountName, _opportunityName, _opportunityID, _opportunityOwner, _totalAacvAmount, _amount, _accountID, _industry, _age, _type, _stageDuration, _reasonClosed, _stage, _annualLoanVolume000, _primaryCampaignSource, _contactEmail, _ebqSetTS, _closeTS, _createdMonth, _createdYear, _ebqSetTS, _ebqCompletedTS, _client from db_ebq_opportunities_wk
ON DUPLICATE KEY UPDATE
_opportunitySource = values(_opportunitySource),
_accountName = values(_accountName),
_opportunityName = values(_opportunityName),
_opportunityID = values(_opportunityID),
_opportunityOwner = values(_opportunityOwner),
_totalAcv = values(_totalAcv),
_amount = values(_amount),
_accountID = values(_accountID),
_industry = values(_industry),
_age = values(_age),
_type = values(_type),
_stageDuration = values(_stageDuration),
_reasonLost = values(_reasonLost),
_stage = values(_stage),
_estimatedAnnualLoanVolume = values(_estimatedAnnualLoanVolume),
_primaryCampaignSource = values(_primaryCampaignSource),
_contactEmail = values(_contactEmail),
_createdTS = values(_createdTS),
_closeTS = values(_closeTS),
_createdMonth = values(_createdMonth),
_createdYear = values(_createdYear),
_ebqSetTSwk = values(_ebqSetTSwk),
_ebqCompletedTSwk = values(_ebqCompletedTSwk),
_client = values(_client)
[40] 0.1 seconds -> 272 rows affected
UPDATE db_ebq_opportunities_all
set _team2 =
case
when _opportunityOwner = 'Michael Dolikian' then 'Commercial'
when _opportunityOwner = 'Lauren Oxenford' then 'Commercial'
when _opportunityOwner = 'Brendan Kain' then 'Commercial'
when _opportunityOwner = 'Greg Liddell' then 'Enterprise'
when _opportunityOwner = 'Mark Tague' then 'Commercial'
when _opportunityOwner = 'Jacob Vivial' then 'Commercial'
when _opportunityOwner = 'Josh Spivey' then 'Commercial'
when _opportunityOwner = 'Chris Anderson' then 'Enterprise'
when _opportunityOwner = 'Catrisa Costa' then 'Commercial'
when _opportunityOwner = 'Wendell Smith' then 'Enterprise'
when _opportunityOwner = 'Jerry Kotek' then 'Enterprise'
when _opportunityOwner = 'Bryan Mckinstry' then 'Commercial'
when _opportunityOwner = 'Michael Fleming' then 'Enterprise'
when _opportunityOwner = 'T Dodson' then 'Commercial'
when _opportunityOwner = 'Bradley Warenicz' then 'Commercial'
when _opportunityOwner = 'Ryan Asdenti' then 'Commercial'
when _opportunityOwner = 'Michelle Morris' then 'Enterprise'
when _opportunityOwner = 'Mark Munson' then 'Enterprise'
when _opportunityOwner = 'Christopher Byrne' then 'Enterprise'
when _opportunityOwner = 'Kacey Samiee' then 'Commercial'
when _opportunityOwner = 'Christopher Kennedy' then 'Enterprise'
when _opportunityOwner = 'Lou Olivieri' then 'Enterprise'
when _opportunityOwner = 'Patrick Doyle' then 'Enterprise'
when _opportunityOwner = 'Rob Dunne' then 'Commercial'
when _opportunityOwner = 'Brittany Lenart' then 'Commercial'
when _opportunityOwner = 'Robert Burns' then 'Commercial'
when _opportunityOwner = 'Jeff Maras' then 'Enterprise'
when _opportunityOwner = 'Jeff Lewis' then 'Commercial'
when _opportunityOwner = 'Kyle Henninger' then 'Commercial'
when _opportunityOwner = 'Robert Shumake' then 'Enterprise'
when _opportunityOwner = 'Bill Mitchell' then 'Enterprise'
when _opportunityOwner = 'Chad Schilling' then 'Enterprise'
when _opportunityOwner = 'John Jacobs' then 'Enterprise'
when _opportunityOwner = 'Jennifer Reid' then 'Enterprise'
when _opportunityOwner = 'Thomas Chimirri' then 'Commercial'
when _opportunityOwner = 'Veronica Gentile' then 'Commercial'
when _opportunityOwner = 'James Flood' then 'Commercial'
else ''
end
where _client = 'eO'
[50] 0 seconds -> 0 rows affected