Use same ordering on aiUsageData.all endpoint for CH and PG

GraphQL aiUsageData.all endpoint supports both PG and CH as data source, however the ordering is different in both:

  • CH version orders by timestamp DESC, user_id DESC
  • PG version orders by timestamp DESC, id DESC

CH table does not have id column, so if possible, we should try to change PG ordering to be the same.

The following discussion from !206278 (merged) should be addressed:

Edited by 🤖 GitLab Bot 🤖