percent rides from Reby versus other operators

PHOTO EMBED

Mon Jul 05 2021 10:19:58 GMT+0000 (Coordinated Universal Time)

Saved by @alvaroferrer #sql #bigquery

with data as (
select
    date(created_at) as date,
    sum(if(app_promoting_co = 'Reby' and owner_co != 'Reby',1,0)) as hey,
    count(*) as all_
from `reby-cloud.analytics_reby_v1_eu.transactions_combined_reassigned_final`
where type like 'ride%'
    and date(created_at) > current_date - 50
    and service_area = 'Barcelona'
group by 1
--order by 1 desc
)
select hey / all_ from data order by 1 desc
content_copyCOPY