-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[improvement][headless]Expression replacement logic supports more com…
…plex sql.
- Loading branch information
1 parent
6fcfdc1
commit 4e653c1
Showing
6 changed files
with
59 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
launchers/standalone/src/test/resources/sql/testSubquery.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
WITH | ||
_average_stay_duration_ AS ( | ||
SELECT | ||
AVG(停留时长) AS _avg_duration_ | ||
FROM | ||
超音数数据集 | ||
) | ||
SELECT | ||
用户名, | ||
SUM(停留时长) AS _total_stay_duration_ | ||
FROM | ||
超音数数据集 | ||
GROUP BY | ||
用户名 | ||
HAVING | ||
SUM(停留时长) > ( | ||
SELECT | ||
_avg_duration_ * 1.5 | ||
FROM | ||
_average_stay_duration_ | ||
) | ||
OR SUM(停留时长) < ( | ||
SELECT | ||
_avg_duration_ * 0.5 | ||
FROM | ||
_average_stay_duration_ | ||
) |