Slackbot
06/02/2023, 10:59 AMRohan Garg
06/02/2023, 12:23 PMSergio Ferragut
06/02/2023, 8:30 PMSELECT "__time"
FROM "kttm-nested-v2-2019-08-25"
WHERE "session_length" = (SELECT MAX("session_length") FROM "kttm-nested-v2-2019-08-25")
LIMIT 1
an explain of that returns the native query (with the nested timeseries query to get the max):
{
"queryType": "scan",
"dataSource": {
"type": "join",
"left": {
"type": "table",
"name": "kttm-nested-v2-2019-08-25"
},
"right": {
"type": "query",
"query": {
"queryType": "timeseries",
"dataSource": {
"type": "table",
"name": "kttm-nested-v2-2019-08-25"
},
"intervals": {
"type": "intervals",
"intervals": [
"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"
]
},
"granularity": {
"type": "all"
},
"aggregations": [
{
"type": "longMax",
"name": "a0",
"fieldName": "session_length"
}
],
"context": {
"queryId": "eb825977-2bd6-4f5f-ab80-bb2af837b76a",
"sqlOuterLimit": 1001,
"sqlQueryId": "eb825977-2bd6-4f5f-ab80-bb2af837b76a",
"useNativeQueryExplain": true
}
}
},
"rightPrefix": "j0.",
"condition": "(\"session_length\" == \"j0.a0\")",
"joinType": "INNER"
},
"intervals": {
"type": "intervals",
"intervals": [
"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"
]
},
"resultFormat": "compactedList",
"limit": 1,
"columns": [
"__time"
],
"legacy": false,
"context": {
"queryId": "eb825977-2bd6-4f5f-ab80-bb2af837b76a",
"sqlOuterLimit": 1001,
"sqlQueryId": "eb825977-2bd6-4f5f-ab80-bb2af837b76a",
"useNativeQueryExplain": true
},
"granularity": {
"type": "all"
}
}
anoop kumar
06/05/2023, 1:08 PManoop kumar
06/05/2023, 1:08 PMGian Merlino
06/07/2023, 11:34 AMGian Merlino
06/07/2023, 11:35 AM