Fix tag history date
This commit is contained in:
parent
75f5668887
commit
89b98ae77a
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue