From d2349252126e5be05c653f44bc5c4e6c4b9b8c20 Mon Sep 17 00:00:00 2001 From: Wataru Sekiguchi Date: Tue, 10 Feb 2026 10:57:48 +0900 Subject: [PATCH] CSTMRSCCSS-5200: Remove summary transforms --- summary/archive/summary_day.sql | 1 - summary/archive/summary_hour.sql | 1 - summary/archive/summary_minute.sql | 1 - summary/summary_hour.sql | 71 ----------------------- summary/summary_sampled_day.sql | 91 ------------------------------ 5 files changed, 165 deletions(-) delete mode 100644 summary/archive/summary_day.sql delete mode 100644 summary/archive/summary_hour.sql delete mode 100644 summary/archive/summary_minute.sql delete mode 100644 summary/summary_hour.sql delete mode 100644 summary/summary_sampled_day.sql diff --git a/summary/archive/summary_day.sql b/summary/archive/summary_day.sql deleted file mode 100644 index 7d40a8b..0000000 --- a/summary/archive/summary_day.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT toStartOfDay(reqTimeSec) as timestamp,\nstatusCode,\nreqHost,\ncity,\nstate,\ncountry,\nerrorCode,\nreqMethod,\nrspContentType,\ncp,\ncacheStatus,\ncount() as cnt_all,\ncountIf(cacheStatus = 0) as cnt_originHits,\ncountIf(cacheStatus = 1) as cnt_edgeHits,\ncnt_edgeHits / count() * 100 as pct_offLoadHit,\nsum(totalBytes) as sum_totalBytes,\nsumIf(totalBytes, cacheStatus = 0) as sum_BytesOrigin,\nsumIf(totalBytes, cacheStatus = 1) as sum_BytesEdge,\nsum_BytesEdge / sum_totalBytes * 100 as pct_offLoadBytes,\ncountIf(statusCode > 400) as cnt_errorHits,\ncnt_errorHits / count() * 100 as pct_errorRate,\nuniq (cliIP) as uniq_cliIP,\nuniq (cliIP, UA) as uniq_session,\nquantiles (0.25, 0.5, 0.75, 0.9, 0.95, 0.99) (turnAroundTimeMSec) as quantiles_turnAroundTimeMSec,\nquantiles (0.25, 0.5, 0.75, 0.9, 0.95, 0.99) (transferTimeMSec) as quantiles_transferTimeMSec,\ntopK (50) (cliIP) as top_50_cliIP,\ntopK (50) (UA) as top_50_UA,\ntopK (50) (reqPath) as top_50_reqPath,\nuniq(reqPath) as uniq_reqPath,\navg(turnAroundTimeMSec) as avg_turnAroundTimeMSec,\navg(transferTimeMSec) as avg_transferTimeMSec,\navg(reqEndTimeMSec) as avg_reqEndTimeMSec,\navg(dnsLookupTimeMSec) as avg_dnsLookupTimeMSec,\navg(tlsOverheadTimeMSec) as avg_tlsOverheadTimeMSec,\ncountIf(tlsOverheadTimeMSec > 0) as cnt_tls,\ncountIf(reqEndTimeMSec > 0) as cnt_reqEnd,\ncountIf(dnsLookupTimeMSec > 0) as cnt_dnsLookup,\ncountIf(turnAroundTimeMSec > 0) as cnt_turnAround,\ncountIf(transferTimeMSec > 0) as cnt_transfer,\ncountIf(Edge_DNSLookupTime > 0) as cnt_edgeLookup,\navg(Edge_DNSLookupTime) as avg_edgeLookup,\navg(Edge_RequestEndTime) as avg_edgeRequest,\ncountIf(Edge_TurnAroundTime > 0) as cnt_edgeTurnAround,\navg(Edge_TurnAroundTime) as avg_edgeTurnAround,\ncountIf(Origin_DNSLookupTime > 0) as cnt_originLookup,\navg(Origin_DNSLookupTime) as avg_originLookup,\navg(Origin_RequestEndTime) as avg_originRequest,\ncountIf(Origin_TurnAroundTime > 0) as cnt_originTurnAround,\ncnt_originTurnAround / cnt_edgeTurnAround as pct_originRequests,\ncountIf(Parent_DNSLookupTime > 0) as cnt_parentLookup,\navg(Parent_DNSLookupTime) as avg_parentLookup,\navg(Parent_RequestEndTime) as avg_parentRequest,\ncountIf(Parent_TurnAroundTime > 0) as cnt_parentTurnAround,\ncnt_parentTurnAround / cnt_edgeTurnAround as pct_parentRequests,\ncountIf(Peer_DNSLookupTime > 0) as cnt_peerLookup,\navg(Peer_DNSLookupTime) as avg_peerLookup,\navg(Peer_RequestEndTime) as avg_peerRequest,\ncountIf(Peer_TurnAroundTime > 0) as cnt_peerTurnAround,\ncnt_peerTurnAround / cnt_edgeTurnAround as pct_peerRequests,\nuniq(country) as uniq_country,\nuniq(edgeIP) as uniq_edgeIP,\navg(totalBytes) as avg_totalBytes,\nquantiles (0.25, 0.5, 0.75, 0.9, 0.95, 0.99) (totalBytes) as quantiles_totalBytes,\narrayConcat(\n[countIf(turnAroundTimeMSec > 0 AND turnAroundTimeMSec < 5)],\ncountResample(5,10,5)(turnAroundTimeMSec),\ncountResample(10,100,10)(turnAroundTimeMSec),\ncountResample(100,500,400)(turnAroundTimeMSec),\ncountResample(500,1000,500)(turnAroundTimeMSec),\ncountResample(1000,4000,1000)(turnAroundTimeMSec)) as turnAroundTimeDistribution,\narrayConcat(\n[countIf(transferTimeMSec > 0 AND transferTimeMSec < 5)],\ncountResample(5,10,5)(transferTimeMSec),\ncountResample(10,100,10)(transferTimeMSec),\ncountResample(100,500,400)(transferTimeMSec),\ncountResample(500,1000,500)(transferTimeMSec),\ncountResample(1000,4000,1000)(transferTimeMSec)) as transferTimeDistribution,\narrayConcat(\n[countIf(totalBytes < 1)],\ncountResample(1,64,63)(totalBytes),\ncountResample(64,1024,64)(totalBytes),\ncountResample(1024, 1024*5 , 1024)(totalBytes),\ncountResample(1024*5, 1024*10 , 1024*5)(totalBytes),\ncountResample(1024*10, 1024*50, 1024*10 )(totalBytes),\ncountResample(1024*50, 1024*100, 1024*50 )(totalBytes),\ncountResample(1024*100, 1024*1000, 1024*100 )(totalBytes),\ncountResample(1024*1000, 1024*5000, 1024*1000 )(totalBytes),\ncountResample(1024*5000, 1024*10000, 1024*5000)(totalBytes),\ncountResample(1024*10000, 1024*50000, 1024*10000 )(totalBytes),\n[countIf(totalBytes > 1024*50000)]\n) as totalBytesDistribution\nFROM akamai.logs\nGROUP BY\ntimestamp,\nstatusCode,\nreqHost,\ncity,\nstate,\ncountry,\nerrorCode,\nreqMethod,\nrspContentType,\ncp,\ncacheStatus\nSETTINGS hdx_primary_key = 'timestamp' \ No newline at end of file diff --git a/summary/archive/summary_hour.sql b/summary/archive/summary_hour.sql deleted file mode 100644 index 2754902..0000000 --- a/summary/archive/summary_hour.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT toStartOfHour(reqTimeSec) as timestamp,\nstatusCode,\nreqHost,\ncity,\nstate,\ncountry,\nerrorCode,\nreqMethod,\nrspContentType,\ncp,\ncacheStatus,\ncount() as cnt_all,\ncountIf(cacheStatus = 0) as cnt_originHits,\ncountIf(cacheStatus = 1) as cnt_edgeHits,\ncnt_edgeHits / count() * 100 as pct_offLoadHit,\nsum(totalBytes) as sum_totalBytes,\nsumIf(totalBytes, cacheStatus = 0) as sum_BytesOrigin,\nsumIf(totalBytes, cacheStatus = 1) as sum_BytesEdge,\nsum_BytesEdge / sum_totalBytes * 100 as pct_offLoadBytes,\ncountIf(statusCode > 400) as cnt_errorHits,\ncnt_errorHits / count() * 100 as pct_errorRate,\nuniq (cliIP) as uniq_cliIP,\nuniq (cliIP, UA) as uniq_session,\nquantiles (0.25, 0.5, 0.75, 0.9, 0.95, 0.99) (turnAroundTimeMSec) as quantiles_turnAroundTimeMSec,\nquantiles (0.25, 0.5, 0.75, 0.9, 0.95, 0.99) (transferTimeMSec) as quantiles_transferTimeMSec,\ntopK (50) (cliIP) as top_50_cliIP,\ntopK (50) (UA) as top_50_UA,\ntopK (50) (reqPath) as top_50_reqPath,\nuniq(reqPath) as uniq_reqPath,\navg(turnAroundTimeMSec) as avg_turnAroundTimeMSec,\navg(transferTimeMSec) as avg_transferTimeMSec,\navg(reqEndTimeMSec) as avg_reqEndTimeMSec,\navg(dnsLookupTimeMSec) as avg_dnsLookupTimeMSec,\navg(tlsOverheadTimeMSec) as avg_tlsOverheadTimeMSec,\ncountIf(tlsOverheadTimeMSec > 0) as cnt_tls,\ncountIf(reqEndTimeMSec > 0) as cnt_reqEnd,\ncountIf(dnsLookupTimeMSec > 0) as cnt_dnsLookup,\ncountIf(turnAroundTimeMSec > 0) as cnt_turnAround,\ncountIf(transferTimeMSec > 0) as cnt_transfer,\ncountIf(Edge_DNSLookupTime > 0) as cnt_edgeLookup,\navg(Edge_DNSLookupTime) as avg_edgeLookup,\navg(Edge_RequestEndTime) as avg_edgeRequest,\ncountIf(Edge_TurnAroundTime > 0) as cnt_edgeTurnAround,\navg(Edge_TurnAroundTime) as avg_edgeTurnAround,\ncountIf(Origin_DNSLookupTime > 0) as cnt_originLookup,\navg(Origin_DNSLookupTime) as avg_originLookup,\navg(Origin_RequestEndTime) as avg_originRequest,\ncountIf(Origin_TurnAroundTime > 0) as cnt_originTurnAround,\ncnt_originTurnAround / cnt_edgeTurnAround as pct_originRequests,\ncountIf(Parent_DNSLookupTime > 0) as cnt_parentLookup,\navg(Parent_DNSLookupTime) as avg_parentLookup,\navg(Parent_RequestEndTime) as avg_parentRequest,\ncountIf(Parent_TurnAroundTime > 0) as cnt_parentTurnAround,\ncnt_parentTurnAround / cnt_edgeTurnAround as pct_parentRequests,\ncountIf(Peer_DNSLookupTime > 0) as cnt_peerLookup,\navg(Peer_DNSLookupTime) as avg_peerLookup,\navg(Peer_RequestEndTime) as avg_peerRequest,\ncountIf(Peer_TurnAroundTime > 0) as cnt_peerTurnAround,\ncnt_peerTurnAround / cnt_edgeTurnAround as pct_peerRequests,\nuniq(country) as uniq_country,\nuniq(edgeIP) as uniq_edgeIP,\navg(totalBytes) as avg_totalBytes,\nquantiles (0.25, 0.5, 0.75, 0.9, 0.95, 0.99) (totalBytes) as quantiles_totalBytes,\narrayConcat(\n[countIf(turnAroundTimeMSec > 0 AND turnAroundTimeMSec < 5)],\ncountResample(5,10,5)(turnAroundTimeMSec),\ncountResample(10,100,10)(turnAroundTimeMSec),\ncountResample(100,500,400)(turnAroundTimeMSec),\ncountResample(500,1000,500)(turnAroundTimeMSec),\ncountResample(1000,4000,1000)(turnAroundTimeMSec)) as turnAroundTimeDistribution,\narrayConcat(\n[countIf(transferTimeMSec > 0 AND transferTimeMSec < 5)],\ncountResample(5,10,5)(transferTimeMSec),\ncountResample(10,100,10)(transferTimeMSec),\ncountResample(100,500,400)(transferTimeMSec),\ncountResample(500,1000,500)(transferTimeMSec),\ncountResample(1000,4000,1000)(transferTimeMSec)) as transferTimeDistribution,\narrayConcat(\n[countIf(totalBytes < 1)],\ncountResample(1,64,63)(totalBytes),\ncountResample(64,1024,64)(totalBytes),\ncountResample(1024, 1024*5 , 1024)(totalBytes),\ncountResample(1024*5, 1024*10 , 1024*5)(totalBytes),\ncountResample(1024*10, 1024*50, 1024*10 )(totalBytes),\ncountResample(1024*50, 1024*100, 1024*50 )(totalBytes),\ncountResample(1024*100, 1024*1000, 1024*100 )(totalBytes),\ncountResample(1024*1000, 1024*5000, 1024*1000 )(totalBytes),\ncountResample(1024*5000, 1024*10000, 1024*5000)(totalBytes),\ncountResample(1024*10000, 1024*50000, 1024*10000 )(totalBytes),\n[countIf(totalBytes > 1024*50000)]\n) as totalBytesDistribution\nFROM akamai.logs\nGROUP BY\ntimestamp,\nstatusCode,\nreqHost,\ncity,\nstate,\ncountry,\nerrorCode,\nreqMethod,\nrspContentType,\ncp,\ncacheStatus\nSETTINGS hdx_primary_key = 'timestamp' \ No newline at end of file diff --git a/summary/archive/summary_minute.sql b/summary/archive/summary_minute.sql deleted file mode 100644 index 7170de9..0000000 --- a/summary/archive/summary_minute.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT toStartOfMinute(reqTimeSec) as timestamp,\nstatusCode,\nreqHost,\ncity,\nstate,\ncountry,\nerrorCode,\nreqMethod,\nrspContentType,\ncp,\ncacheStatus,\ncount() as cnt_all,\ncountIf(cacheStatus = 0) as cnt_originHits,\ncountIf(cacheStatus = 1) as cnt_edgeHits,\ncnt_edgeHits / count() * 100 as pct_offLoadHit,\nsum(totalBytes) as sum_totalBytes,\nsumIf(totalBytes, cacheStatus = 0) as sum_BytesOrigin,\nsumIf(totalBytes, cacheStatus = 1) as sum_BytesEdge,\nsum_BytesEdge / sum_totalBytes * 100 as pct_offLoadBytes,\ncountIf(statusCode > 400) as cnt_errorHits,\ncnt_errorHits / count() * 100 as pct_errorRate,\nuniq (cliIP) as uniq_cliIP,\nuniq (cliIP, UA) as uniq_session,\nquantiles (0.25, 0.5, 0.75, 0.9, 0.95, 0.99) (turnAroundTimeMSec) as quantiles_turnAroundTimeMSec,\nquantiles (0.25, 0.5, 0.75, 0.9, 0.95, 0.99) (transferTimeMSec) as quantiles_transferTimeMSec,\ntopK (50) (cliIP) as top_50_cliIP,\ntopK (50) (UA) as top_50_UA,\ntopK (50) (reqPath) as top_50_reqPath,\nuniq(reqPath) as uniq_reqPath,\navg(turnAroundTimeMSec) as avg_turnAroundTimeMSec,\navg(transferTimeMSec) as avg_transferTimeMSec,\navg(reqEndTimeMSec) as avg_reqEndTimeMSec,\navg(dnsLookupTimeMSec) as avg_dnsLookupTimeMSec,\navg(tlsOverheadTimeMSec) as avg_tlsOverheadTimeMSec,\ncountIf(tlsOverheadTimeMSec > 0) as cnt_tls,\ncountIf(reqEndTimeMSec > 0) as cnt_reqEnd,\ncountIf(dnsLookupTimeMSec > 0) as cnt_dnsLookup,\ncountIf(turnAroundTimeMSec > 0) as cnt_turnAround,\ncountIf(transferTimeMSec > 0) as cnt_transfer,\ncountIf(Edge_DNSLookupTime > 0) as cnt_edgeLookup,\navg(Edge_DNSLookupTime) as avg_edgeLookup,\navg(Edge_RequestEndTime) as avg_edgeRequest,\ncountIf(Edge_TurnAroundTime > 0) as cnt_edgeTurnAround,\navg(Edge_TurnAroundTime) as avg_edgeTurnAround,\ncountIf(Origin_DNSLookupTime > 0) as cnt_originLookup,\navg(Origin_DNSLookupTime) as avg_originLookup,\navg(Origin_RequestEndTime) as avg_originRequest,\ncountIf(Origin_TurnAroundTime > 0) as cnt_originTurnAround,\ncnt_originTurnAround / cnt_edgeTurnAround as pct_originRequests,\ncountIf(Parent_DNSLookupTime > 0) as cnt_parentLookup,\navg(Parent_DNSLookupTime) as avg_parentLookup,\navg(Parent_RequestEndTime) as avg_parentRequest,\ncountIf(Parent_TurnAroundTime > 0) as cnt_parentTurnAround,\ncnt_parentTurnAround / cnt_edgeTurnAround as pct_parentRequests,\ncountIf(Peer_DNSLookupTime > 0) as cnt_peerLookup,\navg(Peer_DNSLookupTime) as avg_peerLookup,\navg(Peer_RequestEndTime) as avg_peerRequest,\ncountIf(Peer_TurnAroundTime > 0) as cnt_peerTurnAround,\ncnt_peerTurnAround / cnt_edgeTurnAround as pct_peerRequests,\nuniq(country) as uniq_country,\nuniq(edgeIP) as uniq_edgeIP,\navg(totalBytes) as avg_totalBytes,\nquantiles (0.25, 0.5, 0.75, 0.9, 0.95, 0.99) (totalBytes) as quantiles_totalBytes,\narrayConcat(\n[countIf(turnAroundTimeMSec > 0 AND turnAroundTimeMSec < 5)],\ncountResample(5,10,5)(turnAroundTimeMSec),\ncountResample(10,100,10)(turnAroundTimeMSec),\ncountResample(100,500,400)(turnAroundTimeMSec),\ncountResample(500,1000,500)(turnAroundTimeMSec),\ncountResample(1000,4000,1000)(turnAroundTimeMSec)) as turnAroundTimeDistribution,\narrayConcat(\n[countIf(transferTimeMSec > 0 AND transferTimeMSec < 5)],\ncountResample(5,10,5)(transferTimeMSec),\ncountResample(10,100,10)(transferTimeMSec),\ncountResample(100,500,400)(transferTimeMSec),\ncountResample(500,1000,500)(transferTimeMSec),\ncountResample(1000,4000,1000)(transferTimeMSec)) as transferTimeDistribution,\narrayConcat(\n[countIf(totalBytes < 1)],\ncountResample(1,64,63)(totalBytes),\ncountResample(64,1024,64)(totalBytes),\ncountResample(1024, 1024*5 , 1024)(totalBytes),\ncountResample(1024*5, 1024*10 , 1024*5)(totalBytes),\ncountResample(1024*10, 1024*50, 1024*10 )(totalBytes),\ncountResample(1024*50, 1024*100, 1024*50 )(totalBytes),\ncountResample(1024*100, 1024*1000, 1024*100 )(totalBytes),\ncountResample(1024*1000, 1024*5000, 1024*1000 )(totalBytes),\ncountResample(1024*5000, 1024*10000, 1024*5000)(totalBytes),\ncountResample(1024*10000, 1024*50000, 1024*10000 )(totalBytes),\n[countIf(totalBytes > 1024*50000)]\n) as totalBytesDistribution\nFROM akamai.logs\nGROUP BY\ntimestamp,\nstatusCode,\nreqHost,\ncity,\nstate,\ncountry,\nerrorCode,\nreqMethod,\nrspContentType,\ncp,\ncacheStatus\nSETTINGS hdx_primary_key = 'timestamp' \ No newline at end of file diff --git a/summary/summary_hour.sql b/summary/summary_hour.sql deleted file mode 100644 index a6440a4..0000000 --- a/summary/summary_hour.sql +++ /dev/null @@ -1,71 +0,0 @@ -SELECT - toStartOfHour (reqTimeSec) AS reqTimeSec, - cliIP, - asn, - referer, - reqPath, - UA, - Edge_IP, - reqHost, - country, - state, - city, - statusCode, - errorCode, - rspContentType, - cp, - COUNT(*) AS cnt_all, - countIf ( - statusCode > 199 - AND statusCode < 300 - ) AS cnt_2xx_status_code, - countIf ( - statusCode > 399 - AND statusCode < 500 - ) AS cnt_4xx_status_code, - countIf ( - statusCode > 499 - AND statusCode < 600 - ) AS cnt_5xx_status_code, - countIf (cacheStatus = 0) as cnt_originHits, - countIf (cacheStatus = 1) as cnt_edgeHits, - cnt_edgeHits / count() * 100 as pct_offLoadHit, - sum(totalBytes) as sum_totalBytes, - sumIf (totalBytes, cacheStatus = 0) as sum_BytesOrigin, - sumIf (totalBytes, cacheStatus = 1) as sum_BytesEdge, - sum_BytesEdge / sum_totalBytes * 100 as pct_offLoadBytes, - countIf (statusCode > 400) as cnt_errorHits, - cnt_errorHits / count() * 100 as pct_errorRate, - countIf (isNotNull (errorCode)) AS cnt_error, - countIf (statusCode IS NOT NULL) AS cnt_status_code, - uniq (reqPath) AS uniq_req_path, - uniq (cliIP) AS uniq_client_ip, - uniq (cliIP, UA) as uniq_session, - quantiles (0.25, 0.5, 0.75, 0.9, 0.95, 0.99) (turnAroundTimeMSec) as quantiles_turnAroundTimeMSec, - quantiles (0.25, 0.5, 0.75, 0.9, 0.95, 0.99) (transferTimeMSec) as quantiles_transferTimeMSec, - quantilesIf (0.25, 0.5, 0.75, 0.9, 0.95, 0.99) (turnAroundTimeMSec, cacheStatus = 1) as quantiles_cached_turnAroundTimeMSec, - quantilesIf (0.25, 0.5, 0.75, 0.9, 0.95, 0.99) (transferTimeMSec, cacheStatus = 1) as quantiles_cached_transferTimeMSec, - quantilesIf (0.25, 0.5, 0.75, 0.9, 0.95, 0.99) (turnAroundTimeMSec, cacheStatus = 0) as quantiles_uncached_turnAroundTimeMSec, - quantilesIf (0.25, 0.5, 0.75, 0.9, 0.95, 0.99) (transferTimeMSec, cacheStatus = 0) as quantiles_uncached_transferTimeMSec, - avgIf (turnAroundTimeMSec, cacheStatus = 1) AS avg_cached_turnAroundTimeMSec, - avgIf (transferTimeMSec, cacheStatus = 1) AS avg_cached_transferTimeMSec, - avgIf (turnAroundTimeMSec, cacheStatus = 0) AS avg_uncached_turnAroundTimeMSec, - avgIf (transferTimeMSec, cacheStatus = 0) AS avg_uncached_transferTimeMSec -FROM - akamai.logs -GROUP BY - reqTimeSec, - cliIP, - asn, - referer, - reqPath, - UA, - Edge_IP, - reqHost, - country, - state, - city, - statusCode, - errorCode, - rspContentType, - cp SETTINGS hdx_primary_key = 'reqTimeSec' \ No newline at end of file diff --git a/summary/summary_sampled_day.sql b/summary/summary_sampled_day.sql deleted file mode 100644 index e1d4bfb..0000000 --- a/summary/summary_sampled_day.sql +++ /dev/null @@ -1,91 +0,0 @@ -SELECT - toStartOfDay (reqTimeSec) AS reqTimeSec, - IF( - cityHash64 (cliIP, reqTimeSec, reqId) % 100 < 10, - cliIP, - '~~~SAMPLED_OUT~~~' - ) AS cliIP, - IF( - cityHash64 (cliIP, reqTimeSec, reqId) % 100 < 10, - asn, - '~~~SAMPLED_OUT~~~' - ) AS asn, - IF( - cityHash64 (referer, reqTimeSec, reqId) % 100 < 1, - referer, - '~~~SAMPLED_OUT~~~' - ) AS referer, - IF( - cityHash64 (reqPath, reqTimeSec, reqId) % 100 < 1, - reqPath, - '~~~SAMPLED_OUT~~~' - ) AS reqPath, - IF( - cityHash64 (UA, reqTimeSec, reqId) % 100 < 1, - UA, - '~~~SAMPLED_OUT~~~' - ) AS UA, - Edge_IP, - reqHost, - country, - state, - city, - statusCode, - errorCode, - rspContentType, - cp, - COUNT(*) AS cnt_all, - countIf ( - statusCode > 199 - AND statusCode < 300 - ) AS cnt_2xx_status_code, - countIf ( - statusCode > 399 - AND statusCode < 500 - ) AS cnt_4xx_status_code, - countIf ( - statusCode > 499 - AND statusCode < 600 - ) AS cnt_5xx_status_code, - countIf (cacheStatus = 0) as cnt_originHits, - countIf (cacheStatus = 1) as cnt_edgeHits, - cnt_edgeHits / count() * 100 as pct_offLoadHit, - sum(totalBytes) as sum_totalBytes, - sumIf (totalBytes, cacheStatus = 0) as sum_BytesOrigin, - sumIf (totalBytes, cacheStatus = 1) as sum_BytesEdge, - sum_BytesEdge / sum_totalBytes * 100 as pct_offLoadBytes, - countIf (statusCode > 400) as cnt_errorHits, - cnt_errorHits / count() * 100 as pct_errorRate, - countIf (isNotNull (errorCode)) AS cnt_error, - countIf (statusCode IS NOT NULL) AS cnt_status_code, - uniq (reqPath) AS uniq_req_path, - uniq (cliIP) AS uniq_client_ip, - uniq (cliIP, UA) as uniq_session, - quantiles (0.25, 0.5, 0.75, 0.9, 0.95, 0.99) (turnAroundTimeMSec) as quantiles_turnAroundTimeMSec, - quantiles (0.25, 0.5, 0.75, 0.9, 0.95, 0.99) (transferTimeMSec) as quantiles_transferTimeMSec, - quantilesIf (0.25, 0.5, 0.75, 0.9, 0.95, 0.99) (turnAroundTimeMSec, cacheStatus = 1) as quantiles_cached_turnAroundTimeMSec, - quantilesIf (0.25, 0.5, 0.75, 0.9, 0.95, 0.99) (transferTimeMSec, cacheStatus = 1) as quantiles_cached_transferTimeMSec, - quantilesIf (0.25, 0.5, 0.75, 0.9, 0.95, 0.99) (turnAroundTimeMSec, cacheStatus = 0) as quantiles_uncached_turnAroundTimeMSec, - quantilesIf (0.25, 0.5, 0.75, 0.9, 0.95, 0.99) (transferTimeMSec, cacheStatus = 0) as quantiles_uncached_transferTimeMSec, - avgIf (turnAroundTimeMSec, cacheStatus = 1) AS avg_cached_turnAroundTimeMSec, - avgIf (transferTimeMSec, cacheStatus = 1) AS avg_cached_transferTimeMSec, - avgIf (turnAroundTimeMSec, cacheStatus = 0) AS avg_uncached_turnAroundTimeMSec, - avgIf (transferTimeMSec, cacheStatus = 0) AS avg_uncached_transferTimeMSec -FROM - akamai.logs -GROUP BY - reqTimeSec, - cliIP, - asn, - referer, - reqPath, - UA, - Edge_IP, - reqHost, - country, - state, - city, - statusCode, - errorCode, - rspContentType, - cp SETTINGS hdx_primary_key = 'reqTimeSec' \ No newline at end of file