File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 212212 comparison as (
213213 select
214214 curr .bucket_end as current_period,
215- prev .bucket_end as previous_period,
215+ prev_b .bucket_end as previous_period,
216216 {{ elementary .edr_cast_as_int (" curr.row_count" ) }} as current_row_count,
217- {{ elementary .edr_cast_as_int (" prev .row_count" ) }}
217+ {{ elementary .edr_cast_as_int (" prev_b .row_count" ) }}
218218 as previous_row_count,
219219 case
220- when prev .row_count is null or prev .row_count = 0
220+ when prev_b .row_count is null or prev_b .row_count = 0
221221 then null
222222 else
223223 round(
224224 cast(
225- (curr .row_count - prev .row_count )
225+ (curr .row_count - prev_b .row_count )
226226 * 100 .0
227- / prev .row_count as {{ elementary .edr_type_numeric () }}
227+ / prev_b .row_count
228+ as {{ elementary .edr_type_numeric () }}
228229 ),
229230 2
230231 )
231232 end as percent_change
232233 from current_bucket curr
233- left join previous_bucket prev on 1 = 1
234+ left join previous_bucket prev_b on 1 = 1
234235 ),
235236
236237 result as (
You can’t perform that action at this time.
0 commit comments