Slackbot
10/16/2023, 9:32 AMJohn Kowtko
10/16/2023, 1:28 PMreplace into datasource overwrite all
select * from datasource
where (origination, destination) in (
select origin, destination from datasource group by 1, 2 having sum(seizures) != 0
)
partitioned by DAY
You do not have to overwrite "all" ... you can select a specific time internal that matches your segment granularity but you would have to make sure that all records you want to omit are completely in that time interval.
Let us know if you have questions.
Thanks. John