Fixed bug.

    If we got multiple updates in a single post from fitbit then only the first was applied.
Fix Bug in SQL sorting grouping