Build a Sales Funnel SQL Table in Zoho Analytics

Sales Funnel SQL Table

Build a SQL table which makes for easy business analysis in Zoho Analytics. Create a Sales Funnel chart with this data.
				
					SELECT
		 /* --- This first instance is for all the new leads in the system --- */ 
         "Full Name" 'Name',
		 "Created Time" 'Date',
		 "Lead Source",
         /* --- If you do not already have it as a field in the Leads module, create the "Link to CRM" here using the CONCAT function --- */
		 "Link to CRM",
		 "Id" 'Record ID',
		 'New Leads' 'Category'
FROM  "Leads" 
UNION ALL
 SELECT
		 /* --- This second instance is for CONVERTED leads, essentially, new contacts --- */ 
         "Full Name" 'Name',
		 "Created Time" 'Date',
		 "Lead Source",
		 concat('YOUR_CONTACTS_BASE_URL', "Id"),
		 "Id" 'Record ID',
		 'Converted Leads' 'Category'
FROM  "Contacts" 
UNION ALL
 SELECT
		 c."Full Name" 'Name',
		 d."Created Time" 'Date',
		 c."Lead Source",
		 concat('YOUR_DEALS_BASE_URL', d."Id"),
		 d."Id" 'Record ID',
		 'New Deals' 'Category'
FROM  "Deals" d
JOIN "Contacts" c ON d."Contact Name"  = c."Id"  
UNION ALL
 SELECT
		 c."Full Name" 'Name',
		 d."Closing Date" 'Date',
		 c."Lead Source",
		 concat('YOUR_DEALS_BASE_URL', d."Id"),
		 d."Id" 'Record ID',
		 'Closed Deals' 'Category'
FROM  "Deals" d
JOIN "Contacts" c ON d."Contact Name"  = c."Id"  
WHERE	 d."Stage"  LIKE 'Closed Won'
				
			

Want to learn even more?
Sign up for one of our Zoho courses!

Click here to copy these scripts. For more information on Analytics, read through our blog post on apps that integrate with Zoho Analytics, as well as our Tableau and Analytics comparison. And, for more Zoho-wizardry, check out our GitHub page.

Want to learn how to create Invoice and collect payment from Zoho Creator?

Or learn how complex assignment rules config Via Zoho CRM modules works?

Want this functionality, but don't want to do it yourself?

Click here to speak to us!

Need help with your Zoho system?

Hire a full time Zoho System Admin from our poolof highly qualified program graduates!

Related Resources

Build a Sales Funnel SQL Table in Zoho Analytics

Difficulty: Intermediate
Estimated reading time: 15 mins
Estimated implementation time: 45 mins

Sales Funnel SQL Table

Build a SQL table which makes for easy business analysis in Zoho Analytics. Create a Sales Funnel chart with this data.

				
					SELECT
		 /* --- This first instance is for all the new leads in the system --- */ 
         "Full Name" 'Name',
		 "Created Time" 'Date',
		 "Lead Source",
         /* --- If you do not already have it as a field in the Leads module, create the "Link to CRM" here using the CONCAT function --- */
		 "Link to CRM",
		 "Id" 'Record ID',
		 'New Leads' 'Category'
FROM  "Leads" 
UNION ALL
 SELECT
		 /* --- This second instance is for CONVERTED leads, essentially, new contacts --- */ 
         "Full Name" 'Name',
		 "Created Time" 'Date',
		 "Lead Source",
		 concat('YOUR_CONTACTS_BASE_URL', "Id"),
		 "Id" 'Record ID',
		 'Converted Leads' 'Category'
FROM  "Contacts" 
UNION ALL
 SELECT
		 c."Full Name" 'Name',
		 d."Created Time" 'Date',
		 c."Lead Source",
		 concat('YOUR_DEALS_BASE_URL', d."Id"),
		 d."Id" 'Record ID',
		 'New Deals' 'Category'
FROM  "Deals" d
JOIN "Contacts" c ON d."Contact Name"  = c."Id"  
UNION ALL
 SELECT
		 c."Full Name" 'Name',
		 d."Closing Date" 'Date',
		 c."Lead Source",
		 concat('YOUR_DEALS_BASE_URL', d."Id"),
		 d."Id" 'Record ID',
		 'Closed Deals' 'Category'
FROM  "Deals" d
JOIN "Contacts" c ON d."Contact Name"  = c."Id"  
WHERE	 d."Stage"  LIKE 'Closed Won'
				
			

Want to learn even more? Sign up for one of our Zoho courses!

Click here to copy these scripts. For more information on Analytics, read through our blog post on apps that integrate with Zoho Analytics, as well as our Tableau and Analytics comparison. And, for more Zoho-wizardry, check out our GitHub page.

More Free Resources