I currently have this code: categorizing some leads.
Select
`Year-Month`
,`Lead Source`
,`Product Line`
,`Product Models`
,`Country`
,`Early Stage No Movement`
,`Stage 0 to Early`
,`Early to Lost`
,`Early to Won`
,`Early to Late`
,`Late to Lost`
,`Late to Won`
,Sum(`Early to Lost`+`Early to Won`+`Early to Late`) AS 'Total Low to High'
,SUM(`Early Stage No Movement`+`Stage 0 to Early`+`Early to Lost`+`Early to Won`+`Early to Late`+`Late to Lost`+`Late to Won`) AS 'Total'
FROM `aggregation_categorization`
GROUP BY
`Year-Month`
,`Lead Source`
,`Product Line`
,`Product Models`
,Country
This runs fine, the next thing I am trying to do is add in the %.
SELECT *
,`Total Low to High`/`Total` AS '% Of Low to High'
FROM `formulas`
This works fine as well, but when I place it in a sumo table aggregating it does work. Any suggestions would be awesome.
Thank you.