Date | Time | User | Type | Name | Attribute | ||
---|---|---|---|---|---|---|---|
1 | 4th January 2025 | 18:14:21 | remus | - | - | list_definition | |
Before
select
'<a href="/climber/' || cast(c.climber_id as varchar) || '">' || c.climber_name || '</a>' as Climber
,g.grade as Grade
,string_agg('<a href="/climb/' || cast(cl.climb_id as varchar) || '">' || cl.climb_name || '</a>', ', ' order by order_dt(a.ascent_dt_start, a.ascent_dt_end)) as Climbs
from
ascents a
inner join ascent_styles ast
on a.ascent_style_id = ast.ascent_style_id
inner join climbers c
on a.climber_id = c.climber_id
inner join climbs cl
on a.climb_id = cl.climb_id
inner join grades g
on cl.grade_id = g.grade_id
inner join hardest_ascent ha
on c.climber_id = ha.climber_id
and cl.grade_id = ha.max_grade_id
where
a.deleted_on is null
and c.deleted_on is null
and cl.deleted_on is null
and cl.climb_type = 1
and c.gender = false
and cl.grade_id >= 21
and c.exclude_reason is null
and cl.exclude_reason is null
and a.exclude_reason is null
and ast.ascent_successful
and not a.ascent_type_id = 6
group by
c.climber_name
,g.grade
,c.climber_id
order by
g.grade desc
,count(*) desc
,min(order_dt(a.ascent_dt_start, a.ascent_dt_end))
After
select
'<a href="/climber/' || cast(c.climber_id as varchar) || '">' || c.climber_name || '</a>' as Climber
,g.grade as Grade
,string_agg('<a href="/climb/' || cast(cl.climb_id as varchar) || '">' || cl.climb_name || '</a>', ', ' order by order_dt(a.ascent_dt_start, a.ascent_dt_end)) as Climbs
from
ascents a
inner join ascent_styles ast
on a.ascent_style_id = ast.ascent_style_id
inner join climbers c
on a.climber_id = c.climber_id
inner join climbs cl
on a.climb_id = cl.climb_id
inner join grades g
on cl.grade_id = g.grade_id
inner join hardest_ascent ha
on c.climber_id = ha.climber_id
and cl.grade_id = ha.max_grade_id
and cl.climb_type_id = ha.climb_type
where
a.deleted_on is null
and c.deleted_on is null
and cl.deleted_on is null
and cl.climb_type = 1
and c.gender = false
and cl.grade_id >= 21
and c.exclude_reason is null
and cl.exclude_reason is null
and a.exclude_reason is null
and ast.ascent_successful
and not a.ascent_type_id = 6
group by
c.climber_name
,g.grade
,c.climber_id
order by
g.grade desc
,count(*) desc
,min(order_dt(a.ascent_dt_start, a.ascent_dt_end))
Diff
--- before
+++ after
@@ -16,6 +16,7 @@
inner join hardest_ascent ha
on c.climber_id = ha.climber_id
and cl.grade_id = ha.max_grade_id
+and cl.climb_type_id = ha.climb_type
where
a.deleted_on is null
|
|||||||
2 | 4th January 2025 | 18:14:21 | remus | - | - | generate_meta | |
Before
insert into
climber_meta (climber_id, value, display_value, climber_meta_key_id)
select
c.climber_id
,'/list/15/strongest-male-sport-climbers'
,'Strongest Male Sport Climbers - #' || row_number() over (order by g.grade desc, count(*) desc, min(order_dt(a.ascent_dt_start, a.ascent_dt_end)))::varchar
,27
from
ascents a
inner join ascent_styles ast
on a.ascent_style_id = ast.ascent_style_id
inner join climbers c
on a.climber_id = c.climber_id
inner join climbs cl
on a.climb_id = cl.climb_id
inner join grades g
on cl.grade_id = g.grade_id
inner join hardest_ascent ha
on c.climber_id = ha.climber_id
and cl.grade_id = ha.max_grade_id
where
a.deleted_on is null
and c.deleted_on is null
and cl.deleted_on is null
and cl.climb_type = 1
and c.gender = false
and cl.grade_id >= 21
and c.exclude_reason is null
and cl.exclude_reason is null
and a.exclude_reason is null
and ast.ascent_successful
and not a.ascent_type_id = 6
group by
c.climber_name
,g.grade
,c.climber_id
After
insert into
climber_meta (climber_id, value, display_value, climber_meta_key_id)
select
c.climber_id
,'/list/15/strongest-male-sport-climbers'
,'Strongest Male Sport Climbers - #' || row_number() over (order by g.grade desc, count(*) desc, min(order_dt(a.ascent_dt_start, a.ascent_dt_end)))::varchar
,27
from
ascents a
inner join ascent_styles ast
on a.ascent_style_id = ast.ascent_style_id
inner join climbers c
on a.climber_id = c.climber_id
inner join climbs cl
on a.climb_id = cl.climb_id
inner join grades g
on cl.grade_id = g.grade_id
inner join hardest_ascent ha
on c.climber_id = ha.climber_id
and cl.grade_id = ha.max_grade_id
and cl.climb_type_id = ha.climb_type
where
a.deleted_on is null
and c.deleted_on is null
and cl.deleted_on is null
and cl.climb_type = 1
and c.gender = false
and cl.grade_id >= 21
and c.exclude_reason is null
and cl.exclude_reason is null
and a.exclude_reason is null
and ast.ascent_successful
and not a.ascent_type_id = 6
group by
c.climber_name
,g.grade
,c.climber_id
|
|||||||
3 | 30th August 2024 | 06:45:49 | remus | - | - | list_type_name | |
Before
Misc.
After
Sport Climbing
|
|||||||
4 | 30th August 2024 | 06:45:49 | remus | - | - | list_type_id | |
Before
5
After
2
|
|||||||
5 | 10th April 2024 | 05:57:44 | remus | - | - | list_definition | |
Before
select
'<a href="/climber/' || cast(c.climber_id as varchar) || '">' || c.climber_name || '</a>' as Climber
,g.grade as Grade
,string_agg('<a href="/climb/' || cast(cl.climb_id as varchar) || '">' || cl.climb_name || '</a>', ', ') as Climbs
from
ascents a
inner join ascent_styles ast
on a.ascent_style_id = ast.ascent_style_id
inner join climbers c
on a.climber_id = c.climber_id
inner join climbs cl
on a.climb_id = cl.climb_id
inner join grades g
on cl.grade_id = g.grade_id
inner join hardest_ascent ha
on c.climber_id = ha.climber_id
and cl.grade_id = ha.max_grade_id
where
a.deleted_on is null
and c.deleted_on is null
and cl.deleted_on is null
and cl.climb_type = 1
and c.gender = false
and cl.grade_id >= 21
and c.exclude_reason is null
and cl.exclude_reason is null
and a.exclude_reason is null
and ast.ascent_successful
and not a.ascent_type_id = 6
group by
c.climber_name
,g.grade
,c.climber_id
order by
g.grade desc
,count(*) desc
,min(order_dt(a.ascent_dt_start, a.ascent_dt_end))
After
select
'<a href="/climber/' || cast(c.climber_id as varchar) || '">' || c.climber_name || '</a>' as Climber
,g.grade as Grade
,string_agg('<a href="/climb/' || cast(cl.climb_id as varchar) || '">' || cl.climb_name || '</a>', ', ' order by order_dt(a.ascent_dt_start, a.ascent_dt_end)) as Climbs
from
ascents a
inner join ascent_styles ast
on a.ascent_style_id = ast.ascent_style_id
inner join climbers c
on a.climber_id = c.climber_id
inner join climbs cl
on a.climb_id = cl.climb_id
inner join grades g
on cl.grade_id = g.grade_id
inner join hardest_ascent ha
on c.climber_id = ha.climber_id
and cl.grade_id = ha.max_grade_id
where
a.deleted_on is null
and c.deleted_on is null
and cl.deleted_on is null
and cl.climb_type = 1
and c.gender = false
and cl.grade_id >= 21
and c.exclude_reason is null
and cl.exclude_reason is null
and a.exclude_reason is null
and ast.ascent_successful
and not a.ascent_type_id = 6
group by
c.climber_name
,g.grade
,c.climber_id
order by
g.grade desc
,count(*) desc
,min(order_dt(a.ascent_dt_start, a.ascent_dt_end))
Diff
--- before
+++ after
@@ -1,7 +1,7 @@
select
'<a href="/climber/' || cast(c.climber_id as varchar) || '">' || c.climber_name || '</a>' as Climber
,g.grade as Grade
- ,string_agg('<a href="/climb/' || cast(cl.climb_id as varchar) || '">' || cl.climb_name || '</a>', ', ') as Climbs
+ ,string_agg('<a href="/climb/' || cast(cl.climb_id as varchar) || '">' || cl.climb_name || '</a>', ', ' order by order_dt(a.ascent_dt_start, a.ascent_dt_end)) as Climbs
from
ascents a
|
|||||||
6 | 5th May 2023 | 13:01:34 | remus | - | - | - | |
Before
None
After
None
|
|||||||
7 | 5th May 2023 | 12:55:16 | remus | - | - | - | |
Before
None
After
None
|