SELECT statement into another SELECT statement. This query method is called nested subquery.* | SELECT key FROM (subquery)
86400 indicates the current time minus 86400 seconds (1 day).* | SELECT compare(PV, 86400) FROM (SELECT count(*) AS PV)
SELECT count(*) AS PV is level-1 statistical analysis: analyze the website PV based on raw logs.SELECT compare(PV, 86400) FROM is level-2 statistical analysis: perform secondary statistical analysis based on the PV result of the level-1 statistical analysis. Use the compare function to obtain the website PV of the day before.* |SELECT compare[1] AS today, compare[2] AS yesterday, compare[3] AS ratioFROM (SELECT compare(PV, 86400) AS compareFROM (SELECT COUNT(*) AS PV))
SELECT compare[1] AS today, compare[2] AS yesterday, compare[3] AS ratio FROM is to get the value of a specified position in the result of the compare function based on the array subscript.Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback