Skip to content

Commit

Permalink
Merge pull request #326 from harmony-one/fix_query
Browse files Browse the repository at this point in the history
Fix select query
  • Loading branch information
ArtemKolodko authored Oct 2, 2023
2 parents 8c1fdc8 + 05a1fad commit 41c8e38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/database/stats.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ export class StatsService {
const dateStart = moment().subtract(hourPeriod, 'hour').unix()

const queryBuilder = logRepository.createQueryBuilder('logs')
.select('distinct(logs.accountId)')
.select('distinct(logs.accountId), logs.createdAt')
.where(`logs.createdAt >= TO_TIMESTAMP(${dateStart})`)
.orderBy('logs.createdAt desc')
.orderBy('logs.createdAt', 'DESC')
.limit(20)

return await queryBuilder.execute()
Expand Down

0 comments on commit 41c8e38

Please sign in to comment.