Fix tag history date

This commit is contained in:
Alex Gleason 2023-07-26 14:51:57 -05:00
parent 75f5668887
commit 89b98ae77a
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ class TrendsDB {
getTagHistory({ tag, since, until, limit = 7, offset = 0 }: GetTagHistoryOpts) { getTagHistory({ tag, since, until, limit = 7, offset = 0 }: GetTagHistoryOpts) {
return this.#db.query<string[]>( return this.#db.query<string[]>(
` `
SELECT inserted_at, COUNT(DISTINCT pubkey8), COUNT(*) SELECT date(inserted_at), COUNT(DISTINCT pubkey8), COUNT(*)
FROM tag_usages FROM tag_usages
WHERE tag = ? AND inserted_at >= ? AND inserted_at < ? WHERE tag = ? AND inserted_at >= ? AND inserted_at < ?
GROUP BY date(inserted_at) GROUP BY date(inserted_at)