Skip to content

Commit

Permalink
add sqllogictests
Browse files Browse the repository at this point in the history
  • Loading branch information
ariesdevil committed Nov 30, 2023
1 parent 6d0dd10 commit 7041e48
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,20 @@ select string_agg(s, '|') from t3;
----
abc|def|xyz

statement ok
create table aggavg(shopid string, goodsid string, avgcostvalue decimal(16, 8), sdate_rn uint64, md string)

statement ok
insert into aggavg values('R010', '149350', 18.66635193, 1, 246), ('R010', '149350', 19.33000000, 1, 246)

statement ok
create table aggavg1 as select t.goodsid, t.md, avg(t.avgcostvalue) avgcostvalue_1, sum(t.avgcostvalue) ss, count(t.avgcostvalue) cnt from aggavg t where t.sdate_rn = 1 group by t.goodsid, t.md

query TTFFF
select * from aggavg1
----
149350 246 18.99817596 37.99635193 2

statement ok
DROP TABLE aggr

Expand Down

0 comments on commit 7041e48

Please sign in to comment.