select
ogc_fid,
tip_amount,
percent_rank() over(
order by
tip_amount asc
)
from
nyc_yellow_taxi_0601_0615_2016
where
pickup_datetime between '2016-06-10 15:00:00'
and '2016-06-10 15:00:05'
and tip_amount > 0
select
ogc_fid,
tip_amount,
rank() over(
order by
tip_amount asc
)
from
nyc_yellow_taxi_0601_0615_2016
where
pickup_datetime between '2016-06-10 15:00:00'
and '2016-06-10 15:00:05'
and tip_amount > 0
select
ogc_fid,
tip_amount,
dense_rank() over(
order by
tip_amount asc
)
from
nyc_yellow_taxi_0601_0615_2016
where
pickup_datetime between '2016-06-10 15:00:00'
and '2016-06-10 15:00:05'
and tip_amount > 0
select
percentile_disc(0.25) within group (
order by
tip_amount
) as per_25,
percentile_disc(0.5) within group (
order by
tip_amount
) as per_50,
percentile_disc(0.75) within group (
order by
tip_amount
) as per_75
from
nyc_yellow_taxi_0601_0615_2016
where
pickup_datetime between '2016-06-10 15:00:00'
and '2016-06-10 15:00:05'
and tip_amount > 0