MetricStream interview question

Sql queries to perform some database operations