The gsc data in Druid/Superset needs a post-aggregation metric that computes the AVG position (currently we just have MIN and MAX – corresponding to best and worst placement, respectively). Use case is if we're looking at specific wiki across multiple countries or multiple wikis in a specific country, the average position is way more useful than min/max.
For reference, the JSON spec for computing CTR – SUM(clicks)/SUM(impressions) – is:
{ "type" : "arithmetic", "name" : "ctr", "fn" : "/", "fields" : [ { "type" : "fieldAccess", "name" : "sum__clicks", "fieldName" : "sum__clicks" }, { "type" : "fieldAccess", "name" : "sum__impressions", "fieldName" : "sum__impressions" } ] }
Remark: the way to do this is to have an aggregation that's a sum of the position metric and then to divide that by the number of rows, which is available already as
{ "type" : "fieldAccess", "name" : "count", "fieldName" : "count" }
Note: calculating the median is impossible in Druid.