NRQL query that compares the counts of several custom metrics over time

I have several custom timeslice metrics: A, B, and C. I’d like to make a graph that compares the counts of the events A/(B+C) by timeslice.

I know I can graph the counts of A, B, and C like this:

SELECT count(newrelic.timeslice.value) AS count FROM Metric FACET cases (where metricTimesliceName = ‘Custom/A’ as ‘A’, where metricTimesliceName = ‘Custom/B’ as ‘B’, where metricTimesliceName = ‘Custom/C’ as ‘C’) WHERE entity.guid = ‘____’ SINCE 7 DAYS AGO

But is there a way to do math like A/(B+C) on the three counts?

Try a filter:

From Metric SELECT filter(count(newrelic.timeslice.value), where metricTimesliceName like 'Custom/A') ...