mirror of
https://github.com/gadgethd/ukmesh.git
synced 2026-10-27 16:22:36 +00:00
fix(stats): transportCodes legacy query missing packets alias; channelTraffic count scoped to carried column
This commit is contained in:
1 parent
8dff7d79d0
commit
40be809330
1 file changed
+3
-3
@@ -210,7 +210,7 @@ export function createStatsRepository(deps: StatsRepositoryDeps) {
|
|||||||
FROM decoded_group_packets
|
FROM decoded_group_packets
|
||||||
),
|
),
|
||||||
channel_counts AS (
|
channel_counts AS (
|
||||||
SELECT channel, COUNT(DISTINCT p.packet_hash)::text AS count
|
SELECT channel, COUNT(DISTINCT packet_hash)::text AS count
|
||||||
FROM group_packets
|
FROM group_packets
|
||||||
GROUP BY channel
|
GROUP BY channel
|
||||||
)
|
)
|
||||||
@@ -1076,8 +1076,8 @@ export function createStatsRepository(deps: StatsRepositoryDeps) {
|
|||||||
NULLIF(TRIM(p.transport_codes), '') AS transport_code,
|
NULLIF(TRIM(p.transport_codes), '') AS transport_code,
|
||||||
NULLIF(TRIM(p.region_scope), '') AS region_scope,
|
NULLIF(TRIM(p.region_scope), '') AS region_scope,
|
||||||
COUNT(DISTINCT p.packet_hash)::text AS count
|
COUNT(DISTINCT p.packet_hash)::text AS count
|
||||||
FROM packets
|
FROM packets p
|
||||||
WHERE time > NOW() - INTERVAL '24 hours'
|
WHERE p.time > NOW() - INTERVAL '24 hours'
|
||||||
AND NULLIF(TRIM(p.transport_codes), '') IS NOT NULL
|
AND NULLIF(TRIM(p.transport_codes), '') IS NOT NULL
|
||||||
${filters.packetsAlias('p')}
|
${filters.packetsAlias('p')}
|
||||||
GROUP BY 1, 2
|
GROUP BY 1, 2
|
||||||
|
|||||||
Reference in new issue
Block a user