Taking aggregations from specific items in a dataset can easily be achieved by using simple IF
statements inside a SUM()
, AVG()
or any function for that matter.
Just remember to use NULL
as the false value as using 0
with AVG()
will mess up your results.
QueryStash
Created: Oct 3rd 2020