with report as (
select
page_id
, count(1) as n_record
from
awesome_event_data
where
awesome_attr = "something attr"
group by page_id
)
select * from report
whereでなるべく絞り込まない
with report as (
select
page_id
, count(1) as n_record
from
awesome_event_data
where
awesome_attr = "something attr"
group by page_id
)
select * from report
with report as (
select
page_id
, count(1) as n_record
from
awesome_event_data