Start Processing : 2025-05-08 15:06:56
0 rows affectedINSERT IGNORE INTO db_hubspot_campaign_formFill (_contactID, _utmCampaign, _utmSource) SELECT _contactID, _utmCampaign, _utmSource FROM db_hubspot_all_contacts_export WHERE _utmCampaign LIKE 'EM%' AND _email NOT REGEXP '2x.marketing|botanacor|agricor|riverside' AND _email NOT REGEXP '2xtest|delcruiser'
[10] 0.23 seconds -> 0 rows affected
UPDATE db_hubspot_campaign_formFill a, db_hubspot_all_contacts_export b SET a._2xLeadSource = b._2xLeadSource, a._verticalsegment = b._verticalsegment, a._companyName = b._companyName, a._createDate = b._createDate, a._email = b._email, a._firstName = b._firstName, a._industry = b._industry, a._jobTitle = b._jobTitle, a._lastName = b._lastName, a._lifecycleStage = b._lifecycleStage, a._originalSource = b._originalSource, a._originalSourceDrillDown1 = b._originalSourceDrillDown1, a._originalSourceDrillDown2 = b._originalSourceDrillDown2, a._recentConversion = b._recentConversion, a._recentConversionDate = b._recentConversionDate WHERE a._contactID = b._contactID AND b._email IS NULL
[20] 0.04 seconds -> 0 rows affected
UPDATE db_hubspot_campaign_formFill SET _datetime = STR_TO_DATE(_recentConversionDate, '%Y-%m-%d %H:%i') WHERE _datetime IS NULL
[30] 0 seconds -> 0 rows affected
INSERT IGNORE INTO db_hubspot_mql_sal (_contactID) SELECT _contactID FROM db_hubspot_all_contacts_export WHERE _email NOT REGEXP '2x.marketing|botanacor|agricor|riverside' AND _email NOT REGEXP '2xtest|delcruiser'
[40] 1.54 seconds -> 0 rows affected
UPDATE db_hubspot_mql_sal a, db_hubspot_all_contacts_export b SET a._firstName = b._firstName, a._lastName = b._lastName, a._email = b._email, a._companyName = b._companyName, a._createDate = STR_TO_DATE(b._createDate,'%Y-%m-%d %H:%i'), a._recentConversion = b._recentConversion, a._marketingEmailsOpened = IF(b._marketingEmailsOpened='',0,b._marketingEmailsOpened), a._marketingEmailsClicked = IF(b._marketingEmailsClicked='',0,b._marketingEmailsClicked), a._numberOfSessions = b._numberOfSessions, a._numberOfFormSubmissions = b._numberOfFormSubmissions, a._firstMarketingEmailOpenDate = IF(b._firstMarketingEmailOpenDate='',NULL,STR_TO_DATE(b._firstMarketingEmailOpenDate,'%Y-%m-%d %H:%i')), a._firstMarketingEmailClickDate = IF(b._firstMarketingEmailClickDate='',NULL,STR_TO_DATE(b._firstMarketingEmailClickDate,'%Y-%m-%d %H:%i')), a._timeOfFirstSession = IF(b._timeOfFirstSession='',NULL,STR_TO_DATE(b._timeOfFirstSession,'%Y-%m-%d %H:%i')), a._firstConversionDate = IF(b._firstConversionDate='',NULL,STR_TO_DATE(b._firstConversionDate,'%Y-%m-%d %H:%i')), a._lastMarketingEmailOpenDate = IF(b._lastMarketingEmailOpenDate='',NULL,STR_TO_DATE(b._lastMarketingEmailOpenDate,'%Y-%m-%d %H:%i')), a._lastMarketingEmailClickDate = IF(b._lastMarketingEmailClickDate='',NULL,STR_TO_DATE(b._lastMarketingEmailClickDate,'%Y-%m-%d %H:%i')), a._timeOfLastSession = IF(b._timeOfLastSession='',NULL,STR_TO_DATE(b._timeOfLastSession,'%Y-%m-%d %H:%i')), a._recentConversionDate = IF(b._recentConversionDate='',NULL,STR_TO_DATE(b._recentConversionDate,'%Y-%m-%d %H:%i')), a._unsubscribedFromAllEmail = IF(b._unsubscribedFromAllEmail = 'TRUE',1,0) WHERE a._contactID = b._contactID
[50] 0.58 seconds -> -1 rows affected
UPDATE db_hubspot_mql_sal a, (SELECT _contactID, IF(CONCAT(_firstName, _lastName)='',0,1) _nameCount, IF(_email='',0,1) _emailCount, IF(_companyName = '',0,1) _companyNameCount FROM db_hubspot_mql_sal) b SET a._mandatoryField = b._nameCount + b._emailCount + b._companyNameCount WHERE a._contactID = b._contactID
[60] 0.46 seconds -> 0 rows affected
UPDATE db_hubspot_mql_sal SET _mandatoryFieldDate = CURDATE() WHERE _mandatoryField = 3 AND _mandatoryFieldDate IS NULL
[70] 0.05 seconds -> 0 rows affected
UPDATE db_hubspot_mql_sal a, (SELECT _contactID, IF(_firstMarketingEmailOpenDate IS NOT NULL,1,0) _openCount, IF(_firstMarketingEmailClickDate IS NOT NULL,1,0) _clickCount, IF(_timeOfFirstSession IS NOT NULL,1,0) _sessionCount FROM db_hubspot_mql_sal) b SET a._actionField = b._openCount + b._clickCount + b._sessionCount WHERE a._contactID = b._contactID
[80] 0.42 seconds -> 0 rows affected
UPDATE db_hubspot_mql_sal SET _actionFieldDate = IF(_actionField = 3, CASE WHEN _firstMarketingEmailOpenDate >= _firstMarketingEmailClickDate AND _firstMarketingEmailClickDate >= _timeOfFirstSession THEN _firstMarketingEmailClickDate WHEN _firstMarketingEmailClickDate >= _timeOfFirstSession AND _timeOfFirstSession >= _firstMarketingEmailOpenDate THEN _timeOfFirstSession ELSE _firstMarketingEmailOpenDate END, IF(_actionField = 2, CASE WHEN _firstMarketingEmailOpenDate IS NULL AND _firstMarketingEmailClickDate >= _timeOfFirstSession THEN _firstMarketingEmailClickDate WHEN _firstMarketingEmailOpenDate IS NULL AND _timeOfFirstSession >= _firstMarketingEmailClickDate THEN _timeOfFirstSession WHEN _firstMarketingEmailClickDate IS NULL AND _firstMarketingEmailOpenDate >= _timeOfFirstSession THEN _firstMarketingEmailOpenDate WHEN _firstMarketingEmailClickDate IS NULL AND _timeOfFirstSession >= _firstMarketingEmailOpenDate THEN _timeOfFirstSession WHEN _timeOfFirstSession IS NULL AND _firstMarketingEmailOpenDate >= _firstMarketingEmailClickDate THEN _firstMarketingEmailOpenDate ELSE _firstMarketingEmailClickDate END, NULL)) WHERE _actionField > 1
[90] 0.05 seconds -> 0 rows affected
UPDATE db_hubspot_mql_sal SET _becameMQLDate = IF(_actionFieldDate >= _mandatoryFieldDate, _actionFieldDate, _mandatoryFieldDate) WHERE _mandatoryFieldDate IS NOT NULL AND _actionFieldDate IS NOT NULL AND _becameMQLDate IS NULL
[100] 0.05 seconds -> 0 rows affected
UPDATE db_hubspot_mql_sal_trend a, (SELECT DATE_FORMAT(_becameMQLDate, '%Y%m') _yearMonth, COUNT(*) _mqlNum FROM db_hubspot_mql_sal WHERE _becameMQLDate IS NOT NULL GROUP BY 1) b SET a._mqlNum = b._mqlNum WHERE a._yearMonth = b._yearMonth
[110] 0.03 seconds -> 0 rows affected