[dashboard] Fix logic of distinct count function
@@ -213,7 +213,8 @@ class SQLApi():
f['function'] = 'percentile'
fields.append('50')
elif f['function'] == 'unique':
- f['function'] = 'distinct'
+ f['function'] = 'count'
+ fields[0] = 'distinct %s' % fields[0]
elif f['function'] == 'percentiles':
fields.extend(map(lambda a: str(a), [_p['value'] for _p in f['percentiles']]))
return '%s(%s)' % (f['function'], ','.join(fields))
