aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/action/insert_each_from_folder.sql
blob: dc062006793b2cf528cb8881a8ba72315f0aaf32 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* syntax version 1 */
/* postgres can not */
/* multirun can not */
use plato;

$list = (
    select aggregate_list(Path) from (
    select Path from folder("")
    where Type = "table" and Path like "Input%"
    order by Path desc
    limit 30
    )
);

insert into Output with truncate
select 
    count(*)
from 
    each($list)