Today, 1:24 PM
We need to match leads to thier corresponding accounts in Salesforce
To match leads to their corresponding accounts in Salesforce, we will follow a two-step matching process based on provided fields.
The SQL Query for the first step of matching process is as follows:
SELECT
accountownersegment AS Segment,
COUNT(o.id) AS NumberOfOpportunities,
SUM(Amount) AS TotalAmount,
AVG(Amount) AS AverageDealSize
FROM
TestData.salesforce_opportunity o
LEFT JOIN TestData.salesforce_account a ON o.accountid = a.id
GROUP BY 1
ORDER BY TotalAmount DESC;
Today, 1:24 PM
0/2000