Improve logic for grouping history items

This commit is contained in:
JonnyWong16 2018-05-30 22:18:41 -07:00
parent 15225faee7
commit ed24232a0a
2 changed files with 15 additions and 6 deletions

View file

@ -65,7 +65,7 @@ class DataFactory(object):
columns = [
'session_history.reference_id',
'session_history.id',
'started AS date',
'MAX(started) AS date',
'MIN(started) AS started',
'MAX(stopped) AS stopped',
'SUM(CASE WHEN stopped > 0 THEN (stopped - started) ELSE 0 END) - \