Skip to content

Commit

Permalink
fix: Use correct SQL in the select
Browse files Browse the repository at this point in the history
  • Loading branch information
itssimple committed Dec 30, 2024
1 parent 002c356 commit 5a24b8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CFLookup/SharedMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,11 @@ public static async Task<Dictionary<DateTimeOffset, Dictionary<string, Dictionar
var stats = await _db.ExecuteReader(
$@"
WITH DailyLatest AS (
SELECT *,
SELECT timestamp_utc, stats,
ROW_NUMBER() OVER (PARTITION BY CAST(timestamp_utc AS DATE) ORDER BY timestamp_utc DESC) AS RowNumber
FROM MinecraftModStatsOverTime WITH(NOLOCK)
)
SELECT *
SELECT timestamp_utc, stats
FROM DailyLatest
WHERE RowNumber = 1
");
Expand Down

0 comments on commit 5a24b8f

Please sign in to comment.