ben_sandi

Badges

100 Contributions1,000 Contributions10 Posts

Contributions

Posts

1 Day

62

7 Days

76

4 Weeks

113

All Time

6752

Current Streak

1

Longest Streak

13

Contributions Map

Contributions by Country

Country Contributions Between Climbers Crags Summits Climbs Ascents
1 USA 1526 20th November 2025 – 5th November 2026 48 20 0 88 98
2 Australia 767 28th September 2025 – 29th June 2026 6 38 0 61 33
3 United Kingdom 625 19th November 2025 – 4th November 2026 34 14 0 24 49
4 Switzerland 308 24th January 2026 – 4th November 2026 6 3 0 14 38
5 France 300 6th January 2026 – 4th November 2026 15 3 0 12 34
6 Austria 210 12th November 2025 – 23rd June 2026 5 2 0 8 22
7 Italy 163 19th November 2025 – 2nd November 2026 9 3 0 12 12
8 Pakistan 118 11th April 2026 – 27th April 2026 0 0 0 1 7
9 Spain 105 20th February 2026 – 17th May 2026 5 0 0 10 11
10 Germany 103 3rd February 2026 – 26th June 2026 7 0 0 7 10

Recent Contributions

Date Time User Type Name Attribute
4881 24th March 2026 00:52:18 UTC ben_sandi list Youngest Ascents (with date ranges) list_description
Before
Main list here: [https://climbing-history.org/list/57/youngest-ascents](https://climbing-history.org/list/57/youngest-ascents) The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers *maximum* possible age based on the data we have. Ideally we want to source the exact dates for the ascents listed here.
After
Main list here: [https://climbing-history.org/list/57/youngest-ascents](https://climbing-history.org/list/57/youngest-ascents) The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers *maximum possible age of ascent* based on the data we have. Ideally we want to source the exact dates for the ascents listed here.
Diff
--- before

+++ after

@@ -1,3 +1,3 @@

Main list here: [https://climbing-history.org/list/57/youngest-ascents](https://climbing-history.org/list/57/youngest-ascents)

-The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers *maximum* possible age based on the data we have. Ideally we want to source the exact dates for the ascents listed here.
+The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers *maximum possible age of ascent* based on the data we have. Ideally we want to source the exact dates for the ascents listed here.
4882 24th March 2026 00:51:54 UTC ben_sandi list Youngest Ascents (with date ranges) list_description_pretty
Before
<p>Main list here: <a href="https://climbing-history.org/list/57/youngest-ascents" rel="noopener noreferrer">https://climbing-history.org/list/57/youngest-ascents</a></p> <p>The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers minimum possible age based on the data we have. Ideally we want to source the exact dates for the ascents listed here.</p>
After
<p>Main list here: <a href="https://climbing-history.org/list/57/youngest-ascents" rel="noopener noreferrer">https://climbing-history.org/list/57/youngest-ascents</a></p> <p>The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers <em>maximum</em> possible age based on the data we have. Ideally we want to source the exact dates for the ascents listed here.</p>
4883 24th March 2026 00:51:54 UTC ben_sandi list Youngest Ascents (with date ranges) list_description
Before
Main list here: [https://climbing-history.org/list/57/youngest-ascents](https://climbing-history.org/list/57/youngest-ascents) The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers minimum possible age based on the data we have. Ideally we want to source the exact dates for the ascents listed here.
After
Main list here: [https://climbing-history.org/list/57/youngest-ascents](https://climbing-history.org/list/57/youngest-ascents) The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers *maximum* possible age based on the data we have. Ideally we want to source the exact dates for the ascents listed here.
Diff
--- before

+++ after

@@ -1,3 +1,3 @@

Main list here: [https://climbing-history.org/list/57/youngest-ascents](https://climbing-history.org/list/57/youngest-ascents)

-The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers minimum possible age based on the data we have. Ideally we want to source the exact dates for the ascents listed here.
+The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers *maximum* possible age based on the data we have. Ideally we want to source the exact dates for the ascents listed here.
4884 24th March 2026 00:50:55 UTC ben_sandi list Youngest Ascents (with date ranges) list_type_name
Before
None
After
Misc.
4885 24th March 2026 00:50:55 UTC ben_sandi list Youngest Ascents (with date ranges) list_type_id
Before
None
After
5
4886 24th March 2026 00:50:55 UTC ben_sandi list Youngest Ascents (with date ranges) list_description_pretty
Before
None
After
<p>Main list here: <a href="https://climbing-history.org/list/57/youngest-ascents" rel="noopener noreferrer">https://climbing-history.org/list/57/youngest-ascents</a></p> <p>The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers minimum possible age based on the data we have. Ideally we want to source the exact dates for the ascents listed here.</p>
4887 24th March 2026 00:50:55 UTC ben_sandi list Youngest Ascents (with date ranges) list_definition
Before
None
After
with climbers_with_dobs as ( select c.climber_id ,c.climber_name ,c.date_of_birth_start ,c.date_of_birth_end from climbers c where c.deleted_on is null and c.date_of_birth_start is not null and c.date_of_birth_end is not null ), ascents_with_ages as ( select row_number() over ( partition by g.grade_id order by a.ascent_dt_end - c.date_of_birth_start asc, a.ascent_dt_start asc ) as row_number ,c.climber_id ,c.climber_name ,cl.climb_id ,cl.climb_name ,g.grade_id ,g.grade_system_id ,g.climb_type_id ,g.order_on ,g.grade ,a.ascent_dt_start ,a.ascent_dt_end ,c.date_of_birth_start ,c.date_of_birth_end ,a.ascent_dt_start - c.date_of_birth_end as min_age_in_days_at_ascent ,a.ascent_dt_end - c.date_of_birth_start as max_age_in_days_at_ascent ,extract(year from age(a.ascent_dt_start, c.date_of_birth_end))::integer as min_age_in_years_at_ascent ,extract(year from age(a.ascent_dt_end, c.date_of_birth_start))::integer as max_age_in_years_at_ascent from ascents a inner join climbers_with_dobs c on a.climber_id = c.climber_id and a.deleted_on is null inner join climbs cl on cl.climb_id = a.climb_id and cl.deleted_on is null inner join grades g on cl.grade_id = g.grade_id where a.ascent_dt_start is not null and a.ascent_dt_end is not null ), oldest as ( select * from ascents_with_ages where row_number = 1 ) select o.grade ,'<a href="/climber/' || o.climber_id::varchar || '">' || o.climber_name || '</a>' as "Climber" ,'<a href="/climb/' || o.climb_id::varchar || '">' || o.climb_name || '</a>' as "Climb" ,o.min_age_in_days_at_ascent as "Minimum age (days)" ,case when o.min_age_in_days_at_ascent = o.max_age_in_days_at_ascent then o.min_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) || ' days' else o.min_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) || ' days to ' || o.max_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_end - (o.date_of_birth_start + make_interval(years => o.max_age_in_years_at_ascent))) || ' days' end as "Age" ,case when o.min_age_in_days_at_ascent = o.max_age_in_days_at_ascent then '' else '✓' end as "Dates Needed" from oldest o where case when o.grade_system_id = 1 and o.order_on >= 13 then 1 when o.grade_system_id = 2 and o.order_on >= 60 then 1 when o.grade_system_id = 3 and o.order_on >= 37 then 1 else 0 end = 1 and o.climb_type_id in (1,2,3) order by o.grade_system_id ,o.order_on
Diff
--- before

+++ after

@@ -1 +1,102 @@

+with climbers_with_dobs as (
+ select
+ c.climber_id
+ ,c.climber_name
+ ,c.date_of_birth_start
+ ,c.date_of_birth_end
+
+ from
+ climbers c
+
+ where
+ c.deleted_on is null
+ and c.date_of_birth_start is not null
+ and c.date_of_birth_end is not null
+), ascents_with_ages as (
+ select
+ row_number() over (
+ partition by g.grade_id
+ order by a.ascent_dt_end - c.date_of_birth_start asc, a.ascent_dt_start asc
+ ) as row_number
+ ,c.climber_id
+ ,c.climber_name
+ ,cl.climb_id
+ ,cl.climb_name
+ ,g.grade_id
+ ,g.grade_system_id
+ ,g.climb_type_id
+ ,g.order_on
+ ,g.grade
+ ,a.ascent_dt_start
+ ,a.ascent_dt_end
+ ,c.date_of_birth_start
+ ,c.date_of_birth_end
+ ,a.ascent_dt_start - c.date_of_birth_end as min_age_in_days_at_ascent
+ ,a.ascent_dt_end - c.date_of_birth_start as max_age_in_days_at_ascent
+ ,extract(year from age(a.ascent_dt_start, c.date_of_birth_end))::integer as min_age_in_years_at_ascent
+ ,extract(year from age(a.ascent_dt_end, c.date_of_birth_start))::integer as max_age_in_years_at_ascent
+
+ from
+ ascents a
+ inner join climbers_with_dobs c
+ on a.climber_id = c.climber_id
+ and a.deleted_on is null
+ inner join climbs cl
+ on cl.climb_id = a.climb_id
+ and cl.deleted_on is null
+ inner join grades g
+ on cl.grade_id = g.grade_id
+
+ where
+ a.ascent_dt_start is not null
+ and a.ascent_dt_end is not null
+), oldest as (
+ select
+ *
+
+ from
+ ascents_with_ages
+
+ where
+ row_number = 1
+)
+
+select
+ o.grade
+ ,'<a href="/climber/' || o.climber_id::varchar || '">' || o.climber_name || '</a>' as "Climber"
+ ,'<a href="/climb/' || o.climb_id::varchar || '">' || o.climb_name || '</a>' as "Climb"
+ ,o.min_age_in_days_at_ascent as "Minimum age (days)"
+ ,case
+ when o.min_age_in_days_at_ascent = o.max_age_in_days_at_ascent then
+ o.min_age_in_years_at_ascent || ' years ' ||
+ extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) ||
+ ' days'
+ else
+ o.min_age_in_years_at_ascent || ' years ' ||
+ extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) ||
+ ' days to ' ||
+ o.max_age_in_years_at_ascent || ' years ' ||
+ extract(days from o.ascent_dt_end - (o.date_of_birth_start + make_interval(years => o.max_age_in_years_at_ascent))) ||
+ ' days'
+ end as "Age"
+ ,case
+ when o.min_age_in_days_at_ascent = o.max_age_in_days_at_ascent then ''
+ else '✓'
+ end as "Dates Needed"
+
+from
+ oldest o
+
+where
+ case
+ when o.grade_system_id = 1 and o.order_on >= 13 then 1
+ when o.grade_system_id = 2 and o.order_on >= 60 then 1
+ when o.grade_system_id = 3 and o.order_on >= 37 then 1
+ else 0
+ end = 1
+ and o.climb_type_id in (1,2,3)
+
+order by
+ o.grade_system_id
+ ,o.order_on
4888 24th March 2026 00:50:55 UTC ben_sandi list Youngest Ascents (with date ranges) list_description
Before
None
After
Main list here: [https://climbing-history.org/list/57/youngest-ascents](https://climbing-history.org/list/57/youngest-ascents) The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers minimum possible age based on the data we have. Ideally we want to source the exact dates for the ascents listed here.
Diff
--- before

+++ after

@@ -1 +1,3 @@

-
+Main list here: [https://climbing-history.org/list/57/youngest-ascents](https://climbing-history.org/list/57/youngest-ascents)
+
+The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers minimum possible age based on the data we have. Ideally we want to source the exact dates for the ascents listed here.
4889 24th March 2026 00:50:55 UTC ben_sandi list Youngest Ascents (with date ranges) list_name
Before
None
After
Youngest Ascents (with date ranges)
4890 24th March 2026 00:27:12 UTC ben_sandi list Oldest Ascents (with date ranges) list_description_pretty
Before
<p>Main list here: <a href="https://climbing-history.org/list/82/oldest-ascents" rel="noopener noreferrer">https://climbing-history.org/list/82/oldest-ascents</a></p> <p>The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers minimum possible age based on the data we have. Ideally we want to source the exact info for the ascents listed here.</p>
After
<p>Main list here: <a href="https://climbing-history.org/list/82/oldest-ascents" rel="noopener noreferrer">https://climbing-history.org/list/82/oldest-ascents</a></p> <p>The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers minimum possible age based on the data we have. Ideally we want to source the exact dates for the ascents listed here.</p>
4891 24th March 2026 00:27:12 UTC ben_sandi list Oldest Ascents (with date ranges) list_description
Before
Main list here: [https://climbing-history.org/list/82/oldest-ascents](https://climbing-history.org/list/82/oldest-ascents) The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers minimum possible age based on the data we have. Ideally we want to source the exact info for the ascents listed here.
After
Main list here: [https://climbing-history.org/list/82/oldest-ascents](https://climbing-history.org/list/82/oldest-ascents) The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers minimum possible age based on the data we have. Ideally we want to source the exact dates for the ascents listed here.
Diff
--- before

+++ after

@@ -1,3 +1,3 @@

Main list here: [https://climbing-history.org/list/82/oldest-ascents](https://climbing-history.org/list/82/oldest-ascents)

-The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers minimum possible age based on the data we have. Ideally we want to source the exact info for the ascents listed here.
+The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers minimum possible age based on the data we have. Ideally we want to source the exact dates for the ascents listed here.
4892 24th March 2026 00:26:56 UTC ben_sandi list Oldest Ascents (with date ranges) list_description_pretty
Before
<p>See also <a href="https://climbing-history.org/list/82/oldest-ascents" rel="noopener noreferrer">https://climbing-history.org/list/82/oldest-ascents</a></p> <p>This is a list of the oldest ascents at each grade.</p>
After
<p>Main list here: <a href="https://climbing-history.org/list/82/oldest-ascents" rel="noopener noreferrer">https://climbing-history.org/list/82/oldest-ascents</a></p> <p>The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers minimum possible age based on the data we have. Ideally we want to source the exact info for the ascents listed here.</p>
4893 24th March 2026 00:26:56 UTC ben_sandi list Oldest Ascents (with date ranges) list_description
Before
See also [https://climbing-history.org/list/82/oldest-ascents](https://climbing-history.org/list/82/oldest-ascents) This is a list of the oldest ascents at each grade.
After
Main list here: [https://climbing-history.org/list/82/oldest-ascents](https://climbing-history.org/list/82/oldest-ascents) The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers minimum possible age based on the data we have. Ideally we want to source the exact info for the ascents listed here.
Diff
--- before

+++ after

@@ -1,3 +1,3 @@

-See also [https://climbing-history.org/list/82/oldest-ascents](https://climbing-history.org/list/82/oldest-ascents)
+Main list here: [https://climbing-history.org/list/82/oldest-ascents](https://climbing-history.org/list/82/oldest-ascents)

-This is a list of the oldest ascents at each grade.
+The above list will only show an ascent where we can calculate a climbers exact age at time of ascent. This list instead calculates the range of possible ages and sorts based on the climbers minimum possible age based on the data we have. Ideally we want to source the exact info for the ascents listed here.
4894 24th March 2026 00:21:41 UTC ben_sandi list Oldest Ascents (with date ranges) list_description_pretty
Before
<p>This is a list of the oldest ascents at each grade.</p>
After
<p>See also <a href="https://climbing-history.org/list/82/oldest-ascents" rel="noopener noreferrer">https://climbing-history.org/list/82/oldest-ascents</a></p> <p>This is a list of the oldest ascents at each grade.</p>
4895 24th March 2026 00:21:41 UTC ben_sandi list Oldest Ascents (with date ranges) list_description
Before
This is a list of the oldest ascents at each grade.
After
See also [https://climbing-history.org/list/82/oldest-ascents](https://climbing-history.org/list/82/oldest-ascents) This is a list of the oldest ascents at each grade.
Diff
--- before

+++ after

@@ -1 +1,3 @@

+See also [https://climbing-history.org/list/82/oldest-ascents](https://climbing-history.org/list/82/oldest-ascents)
+
This is a list of the oldest ascents at each grade.
4896 24th March 2026 00:17:50 UTC ben_sandi list Oldest Ascents (with date ranges) list_definition
Before
with climbers_with_dobs as ( select c.climber_id ,c.climber_name ,c.date_of_birth_start ,c.date_of_birth_end from climbers c where c.deleted_on is null and c.date_of_birth_start is not null and c.date_of_birth_end is not null ), ascents_with_ages as ( select row_number() over ( partition by g.grade_id order by a.ascent_dt_start - c.date_of_birth_end desc, a.ascent_dt_start asc ) as row_number ,c.climber_id ,c.climber_name ,cl.climb_id ,cl.climb_name ,g.grade_id ,g.grade_system_id ,g.climb_type_id ,g.order_on ,g.grade ,a.ascent_dt_start ,a.ascent_dt_end ,c.date_of_birth_start ,c.date_of_birth_end ,a.ascent_dt_start - c.date_of_birth_end as min_age_in_days_at_ascent ,a.ascent_dt_end - c.date_of_birth_start as max_age_in_days_at_ascent ,extract(year from age(a.ascent_dt_start, c.date_of_birth_end))::integer as min_age_in_years_at_ascent ,extract(year from age(a.ascent_dt_end, c.date_of_birth_start))::integer as max_age_in_years_at_ascent from ascents a inner join climbers_with_dobs c on a.climber_id = c.climber_id and a.deleted_on is null inner join climbs cl on cl.climb_id = a.climb_id and cl.deleted_on is null inner join grades g on cl.grade_id = g.grade_id where a.ascent_dt_start is not null and a.ascent_dt_end is not null ), oldest as ( select * from ascents_with_ages where row_number = 1 ) select o.grade ,'<a href="/climber/' || o.climber_id::varchar || '">' || o.climber_name || '</a>' as "Climber" ,'<a href="/climb/' || o.climb_id::varchar || '">' || o.climb_name || '</a>' as "Climb" ,o.min_age_in_days_at_ascent as "Minimum Age (Days)" ,case when o.min_age_in_days_at_ascent = o.max_age_in_days_at_ascent then o.min_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) || ' days' else o.min_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) || ' days to ' || o.max_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_end - (o.date_of_birth_start + make_interval(years => o.max_age_in_years_at_ascent))) || ' days' end as "Age" from oldest o where case when o.grade_system_id = 1 and o.order_on >= 13 then 1 when o.grade_system_id = 2 and o.order_on >= 60 then 1 when o.grade_system_id = 3 and o.order_on >= 37 then 1 else 0 end = 1 and o.climb_type_id in (1,2,3) order by o.grade_system_id ,o.order_on
After
with climbers_with_dobs as ( select c.climber_id ,c.climber_name ,c.date_of_birth_start ,c.date_of_birth_end from climbers c where c.deleted_on is null and c.date_of_birth_start is not null and c.date_of_birth_end is not null ), ascents_with_ages as ( select row_number() over ( partition by g.grade_id order by a.ascent_dt_start - c.date_of_birth_end desc, a.ascent_dt_start asc ) as row_number ,c.climber_id ,c.climber_name ,cl.climb_id ,cl.climb_name ,g.grade_id ,g.grade_system_id ,g.climb_type_id ,g.order_on ,g.grade ,a.ascent_dt_start ,a.ascent_dt_end ,c.date_of_birth_start ,c.date_of_birth_end ,a.ascent_dt_start - c.date_of_birth_end as min_age_in_days_at_ascent ,a.ascent_dt_end - c.date_of_birth_start as max_age_in_days_at_ascent ,extract(year from age(a.ascent_dt_start, c.date_of_birth_end))::integer as min_age_in_years_at_ascent ,extract(year from age(a.ascent_dt_end, c.date_of_birth_start))::integer as max_age_in_years_at_ascent from ascents a inner join climbers_with_dobs c on a.climber_id = c.climber_id and a.deleted_on is null inner join climbs cl on cl.climb_id = a.climb_id and cl.deleted_on is null inner join grades g on cl.grade_id = g.grade_id where a.ascent_dt_start is not null and a.ascent_dt_end is not null ), oldest as ( select * from ascents_with_ages where row_number = 1 ) select o.grade ,'<a href="/climber/' || o.climber_id::varchar || '">' || o.climber_name || '</a>' as "Climber" ,'<a href="/climb/' || o.climb_id::varchar || '">' || o.climb_name || '</a>' as "Climb" ,o.min_age_in_days_at_ascent as "Minimum age (days)" ,case when o.min_age_in_days_at_ascent = o.max_age_in_days_at_ascent then o.min_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) || ' days' else o.min_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) || ' days to ' || o.max_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_end - (o.date_of_birth_start + make_interval(years => o.max_age_in_years_at_ascent))) || ' days' end as "Age" ,case when o.min_age_in_days_at_ascent = o.max_age_in_days_at_ascent then '' else '✓' end as "Dates Needed" from oldest o where case when o.grade_system_id = 1 and o.order_on >= 13 then 1 when o.grade_system_id = 2 and o.order_on >= 60 then 1 when o.grade_system_id = 3 and o.order_on >= 37 then 1 else 0 end = 1 and o.climb_type_id in (1,2,3) order by o.grade_system_id ,o.order_on
Diff
--- before

+++ after

@@ -65,7 +65,7 @@

o.grade
,'<a href="/climber/' || o.climber_id::varchar || '">' || o.climber_name || '</a>' as "Climber"
,'<a href="/climb/' || o.climb_id::varchar || '">' || o.climb_name || '</a>' as "Climb"
- ,o.min_age_in_days_at_ascent as "Minimum Age (Days)"
+ ,o.min_age_in_days_at_ascent as "Minimum age (days)"
,case
when o.min_age_in_days_at_ascent = o.max_age_in_days_at_ascent then
o.min_age_in_years_at_ascent || ' years ' ||
@@ -79,6 +79,10 @@

extract(days from o.ascent_dt_end - (o.date_of_birth_start + make_interval(years => o.max_age_in_years_at_ascent))) ||
' days'
end as "Age"
+ ,case
+ when o.min_age_in_days_at_ascent = o.max_age_in_days_at_ascent then ''
+ else '✓'
+ end as "Dates Needed"

from
oldest o
4897 24th March 2026 00:14:28 UTC ben_sandi list Oldest Ascents (with date ranges) list_definition
Before
with climbers_with_dobs as ( select c.climber_id ,c.climber_name ,c.date_of_birth_start ,c.date_of_birth_end from climbers c where c.deleted_on is null and c.date_of_birth_start is not null and c.date_of_birth_end is not null ), ascents_with_ages as ( select row_number() over ( partition by g.grade_id order by a.ascent_dt_start - c.date_of_birth_end desc, a.ascent_dt_start asc ) as row_number ,c.climber_id ,c.climber_name ,cl.climb_id ,cl.climb_name ,g.grade_id ,g.grade_system_id ,g.climb_type_id ,g.order_on ,g.grade ,a.ascent_dt_start ,a.ascent_dt_end ,c.date_of_birth_start ,c.date_of_birth_end ,a.ascent_dt_start - c.date_of_birth_end as min_age_in_days_at_ascent ,a.ascent_dt_end - c.date_of_birth_start as max_age_in_days_at_ascent ,extract(year from age(a.ascent_dt_start, c.date_of_birth_end))::integer as min_age_in_years_at_ascent ,extract(year from age(a.ascent_dt_end, c.date_of_birth_start))::integer as max_age_in_years_at_ascent from ascents a inner join climbers_with_dobs c on a.climber_id = c.climber_id and a.deleted_on is null inner join climbs cl on cl.climb_id = a.climb_id and cl.deleted_on is null inner join grades g on cl.grade_id = g.grade_id where a.ascent_dt_start is not null and a.ascent_dt_end is not null ), oldest as ( select * from ascents_with_ages where row_number = 1 ) select o.grade ,'<a href="/climber/' || o.climber_id::varchar || '">' || o.climber_name || '</a>' as "Climber" ,'<a href="/climb/' || o.climb_id::varchar || '">' || o.climb_name || '</a>' as "Climb" ,o.min_age_in_days_at_ascent as "Age (Days)" ,case when o.min_age_in_days_at_ascent = o.max_age_in_days_at_ascent then o.min_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) || ' days' else o.min_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) || ' days to ' || o.max_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_end - (o.date_of_birth_start + make_interval(years => o.max_age_in_years_at_ascent))) || ' days' end as "Age" from oldest o where case when o.grade_system_id = 1 and o.order_on >= 13 then 1 when o.grade_system_id = 2 and o.order_on >= 60 then 1 when o.grade_system_id = 3 and o.order_on >= 37 then 1 else 0 end = 1 and o.climb_type_id in (1,2,3) order by o.grade_system_id ,o.order_on
After
with climbers_with_dobs as ( select c.climber_id ,c.climber_name ,c.date_of_birth_start ,c.date_of_birth_end from climbers c where c.deleted_on is null and c.date_of_birth_start is not null and c.date_of_birth_end is not null ), ascents_with_ages as ( select row_number() over ( partition by g.grade_id order by a.ascent_dt_start - c.date_of_birth_end desc, a.ascent_dt_start asc ) as row_number ,c.climber_id ,c.climber_name ,cl.climb_id ,cl.climb_name ,g.grade_id ,g.grade_system_id ,g.climb_type_id ,g.order_on ,g.grade ,a.ascent_dt_start ,a.ascent_dt_end ,c.date_of_birth_start ,c.date_of_birth_end ,a.ascent_dt_start - c.date_of_birth_end as min_age_in_days_at_ascent ,a.ascent_dt_end - c.date_of_birth_start as max_age_in_days_at_ascent ,extract(year from age(a.ascent_dt_start, c.date_of_birth_end))::integer as min_age_in_years_at_ascent ,extract(year from age(a.ascent_dt_end, c.date_of_birth_start))::integer as max_age_in_years_at_ascent from ascents a inner join climbers_with_dobs c on a.climber_id = c.climber_id and a.deleted_on is null inner join climbs cl on cl.climb_id = a.climb_id and cl.deleted_on is null inner join grades g on cl.grade_id = g.grade_id where a.ascent_dt_start is not null and a.ascent_dt_end is not null ), oldest as ( select * from ascents_with_ages where row_number = 1 ) select o.grade ,'<a href="/climber/' || o.climber_id::varchar || '">' || o.climber_name || '</a>' as "Climber" ,'<a href="/climb/' || o.climb_id::varchar || '">' || o.climb_name || '</a>' as "Climb" ,o.min_age_in_days_at_ascent as "Minimum Age (Days)" ,case when o.min_age_in_days_at_ascent = o.max_age_in_days_at_ascent then o.min_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) || ' days' else o.min_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) || ' days to ' || o.max_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_end - (o.date_of_birth_start + make_interval(years => o.max_age_in_years_at_ascent))) || ' days' end as "Age" from oldest o where case when o.grade_system_id = 1 and o.order_on >= 13 then 1 when o.grade_system_id = 2 and o.order_on >= 60 then 1 when o.grade_system_id = 3 and o.order_on >= 37 then 1 else 0 end = 1 and o.climb_type_id in (1,2,3) order by o.grade_system_id ,o.order_on
Diff
--- before

+++ after

@@ -65,7 +65,7 @@

o.grade
,'<a href="/climber/' || o.climber_id::varchar || '">' || o.climber_name || '</a>' as "Climber"
,'<a href="/climb/' || o.climb_id::varchar || '">' || o.climb_name || '</a>' as "Climb"
- ,o.min_age_in_days_at_ascent as "Age (Days)"
+ ,o.min_age_in_days_at_ascent as "Minimum Age (Days)"
,case
when o.min_age_in_days_at_ascent = o.max_age_in_days_at_ascent then
o.min_age_in_years_at_ascent || ' years ' ||
4898 24th March 2026 00:12:35 UTC ben_sandi list Oldest Ascents (with date ranges) list_definition
Before
with climbers_with_dobs as ( select c.climber_id ,c.climber_name ,c.date_of_birth_start ,c.date_of_birth_end from climbers c where c.deleted_on is null and c.date_of_birth_start is not null and c.date_of_birth_end is not null ), ascents_with_ages as ( select row_number() over ( partition by g.grade_id order by a.ascent_dt_start - c.date_of_birth_end desc, a.ascent_dt_start asc ) as row_number ,c.climber_id ,c.climber_name ,cl.climb_id ,cl.climb_name ,g.grade_id ,g.grade_system_id ,g.climb_type_id ,g.order_on ,g.grade ,a.ascent_dt_start ,c.date_of_birth_start ,c.date_of_birth_end ,a.ascent_dt_start - c.date_of_birth_end as min_age_in_days_at_ascent ,a.ascent_dt_start - c.date_of_birth_start as max_age_in_days_at_ascent ,extract(year from age(a.ascent_dt_start, c.date_of_birth_end))::integer as min_age_in_years_at_ascent ,extract(year from age(a.ascent_dt_start, c.date_of_birth_start))::integer as max_age_in_years_at_ascent from ascents a inner join climbers_with_dobs c on a.climber_id = c.climber_id and a.deleted_on is null inner join climbs cl on cl.climb_id = a.climb_id and cl.deleted_on is null inner join grades g on cl.grade_id = g.grade_id where a.ascent_dt_start is not null ), oldest as ( select * from ascents_with_ages where row_number = 1 ) select o.grade ,'<a href="/climber/' || o.climber_id::varchar || '">' || o.climber_name || '</a>' as "Climber" ,'<a href="/climb/' || o.climb_id::varchar || '">' || o.climb_name || '</a>' as "Climb" ,o.min_age_in_days_at_ascent as "Age (Days)" ,case when o.min_age_in_days_at_ascent = o.max_age_in_days_at_ascent then o.min_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) || ' days' else o.min_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) || ' days to ' || o.max_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_start + make_interval(years => o.max_age_in_years_at_ascent))) || ' days' end as "Age" from oldest o where case when o.grade_system_id = 1 and o.order_on >= 13 then 1 when o.grade_system_id = 2 and o.order_on >= 60 then 1 when o.grade_system_id = 3 and o.order_on >= 37 then 1 else 0 end = 1 and o.climb_type_id in (1,2,3) order by o.grade_system_id ,o.order_on
After
with climbers_with_dobs as ( select c.climber_id ,c.climber_name ,c.date_of_birth_start ,c.date_of_birth_end from climbers c where c.deleted_on is null and c.date_of_birth_start is not null and c.date_of_birth_end is not null ), ascents_with_ages as ( select row_number() over ( partition by g.grade_id order by a.ascent_dt_start - c.date_of_birth_end desc, a.ascent_dt_start asc ) as row_number ,c.climber_id ,c.climber_name ,cl.climb_id ,cl.climb_name ,g.grade_id ,g.grade_system_id ,g.climb_type_id ,g.order_on ,g.grade ,a.ascent_dt_start ,a.ascent_dt_end ,c.date_of_birth_start ,c.date_of_birth_end ,a.ascent_dt_start - c.date_of_birth_end as min_age_in_days_at_ascent ,a.ascent_dt_end - c.date_of_birth_start as max_age_in_days_at_ascent ,extract(year from age(a.ascent_dt_start, c.date_of_birth_end))::integer as min_age_in_years_at_ascent ,extract(year from age(a.ascent_dt_end, c.date_of_birth_start))::integer as max_age_in_years_at_ascent from ascents a inner join climbers_with_dobs c on a.climber_id = c.climber_id and a.deleted_on is null inner join climbs cl on cl.climb_id = a.climb_id and cl.deleted_on is null inner join grades g on cl.grade_id = g.grade_id where a.ascent_dt_start is not null and a.ascent_dt_end is not null ), oldest as ( select * from ascents_with_ages where row_number = 1 ) select o.grade ,'<a href="/climber/' || o.climber_id::varchar || '">' || o.climber_name || '</a>' as "Climber" ,'<a href="/climb/' || o.climb_id::varchar || '">' || o.climb_name || '</a>' as "Climb" ,o.min_age_in_days_at_ascent as "Age (Days)" ,case when o.min_age_in_days_at_ascent = o.max_age_in_days_at_ascent then o.min_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) || ' days' else o.min_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) || ' days to ' || o.max_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_end - (o.date_of_birth_start + make_interval(years => o.max_age_in_years_at_ascent))) || ' days' end as "Age" from oldest o where case when o.grade_system_id = 1 and o.order_on >= 13 then 1 when o.grade_system_id = 2 and o.order_on >= 60 then 1 when o.grade_system_id = 3 and o.order_on >= 37 then 1 else 0 end = 1 and o.climb_type_id in (1,2,3) order by o.grade_system_id ,o.order_on
Diff
--- before

+++ after

@@ -28,12 +28,13 @@

,g.order_on
,g.grade
,a.ascent_dt_start
+ ,a.ascent_dt_end
,c.date_of_birth_start
,c.date_of_birth_end
,a.ascent_dt_start - c.date_of_birth_end as min_age_in_days_at_ascent
- ,a.ascent_dt_start - c.date_of_birth_start as max_age_in_days_at_ascent
+ ,a.ascent_dt_end - c.date_of_birth_start as max_age_in_days_at_ascent
,extract(year from age(a.ascent_dt_start, c.date_of_birth_end))::integer as min_age_in_years_at_ascent
- ,extract(year from age(a.ascent_dt_start, c.date_of_birth_start))::integer as max_age_in_years_at_ascent
+ ,extract(year from age(a.ascent_dt_end, c.date_of_birth_start))::integer as max_age_in_years_at_ascent

from
ascents a
@@ -48,6 +49,7 @@


where
a.ascent_dt_start is not null
+ and a.ascent_dt_end is not null
), oldest as (
select
*
@@ -74,7 +76,7 @@

extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) ||
' days to ' ||
o.max_age_in_years_at_ascent || ' years ' ||
- extract(days from o.ascent_dt_start - (o.date_of_birth_start + make_interval(years => o.max_age_in_years_at_ascent))) ||
+ extract(days from o.ascent_dt_end - (o.date_of_birth_start + make_interval(years => o.max_age_in_years_at_ascent))) ||
' days'
end as "Age"
4899 24th March 2026 00:08:11 UTC ben_sandi list Oldest Ascents (with date ranges) list_definition
Before
with climbers_with_dobs as ( select c.climber_id ,c.climber_name ,c.date_of_birth_start ,c.date_of_birth_end from climbers c where c.deleted_on is null and c.date_of_birth_start is not null and c.date_of_birth_end is not null ), ascents_with_ages as ( select row_number() over ( partition by g.grade_id order by a.ascent_dt_start - c.date_of_birth_end desc, a.ascent_dt_start asc ) as row_number ,c.climber_id ,c.climber_name ,cl.climb_id ,cl.climb_name ,g.grade_id ,g.grade_system_id ,g.climb_type_id ,g.order_on ,g.grade ,a.ascent_dt_start ,c.date_of_birth_start ,c.date_of_birth_end ,a.ascent_dt_start - c.date_of_birth_end as min_age_in_days_at_ascent ,a.ascent_dt_start - c.date_of_birth_start as max_age_in_days_at_ascent ,extract(year from age(a.ascent_dt_start, c.date_of_birth_end))::integer as min_age_in_years_at_ascent ,extract(year from age(a.ascent_dt_start, c.date_of_birth_start))::integer as max_age_in_years_at_ascent from ascents a inner join climbers_with_dobs c on a.climber_id = c.climber_id and a.deleted_on is null inner join climbs cl on cl.climb_id = a.climb_id and cl.deleted_on is null inner join grades g on cl.grade_id = g.grade_id where a.ascent_dt_start is not null ), oldest as ( select * from ascents_with_ages where row_number = 1 ) select o.grade ,'<a href="/climber/' || o.climber_id::varchar || '">' || o.climber_name || '</a>' as "Climber" ,'<a href="/climb/' || o.climb_id::varchar || '">' || o.climb_name || '</a>' as "Climb" ,o.min_age_in_days_at_ascent as "Age (Days)" ,case when o.date_of_birth_start = o.date_of_birth_end then o.min_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) || ' days' else o.min_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) || ' days to ' || o.max_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_start + make_interval(years => o.max_age_in_years_at_ascent))) || ' days' end as "Age" from oldest o where case when o.grade_system_id = 1 and o.order_on >= 13 then 1 when o.grade_system_id = 2 and o.order_on >= 60 then 1 when o.grade_system_id = 3 and o.order_on >= 37 then 1 else 0 end = 1 and o.climb_type_id in (1,2,3) order by o.grade_system_id ,o.order_on
After
with climbers_with_dobs as ( select c.climber_id ,c.climber_name ,c.date_of_birth_start ,c.date_of_birth_end from climbers c where c.deleted_on is null and c.date_of_birth_start is not null and c.date_of_birth_end is not null ), ascents_with_ages as ( select row_number() over ( partition by g.grade_id order by a.ascent_dt_start - c.date_of_birth_end desc, a.ascent_dt_start asc ) as row_number ,c.climber_id ,c.climber_name ,cl.climb_id ,cl.climb_name ,g.grade_id ,g.grade_system_id ,g.climb_type_id ,g.order_on ,g.grade ,a.ascent_dt_start ,c.date_of_birth_start ,c.date_of_birth_end ,a.ascent_dt_start - c.date_of_birth_end as min_age_in_days_at_ascent ,a.ascent_dt_start - c.date_of_birth_start as max_age_in_days_at_ascent ,extract(year from age(a.ascent_dt_start, c.date_of_birth_end))::integer as min_age_in_years_at_ascent ,extract(year from age(a.ascent_dt_start, c.date_of_birth_start))::integer as max_age_in_years_at_ascent from ascents a inner join climbers_with_dobs c on a.climber_id = c.climber_id and a.deleted_on is null inner join climbs cl on cl.climb_id = a.climb_id and cl.deleted_on is null inner join grades g on cl.grade_id = g.grade_id where a.ascent_dt_start is not null ), oldest as ( select * from ascents_with_ages where row_number = 1 ) select o.grade ,'<a href="/climber/' || o.climber_id::varchar || '">' || o.climber_name || '</a>' as "Climber" ,'<a href="/climb/' || o.climb_id::varchar || '">' || o.climb_name || '</a>' as "Climb" ,o.min_age_in_days_at_ascent as "Age (Days)" ,case when o.min_age_in_days_at_ascent = o.max_age_in_days_at_ascent then o.min_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) || ' days' else o.min_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) || ' days to ' || o.max_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_start + make_interval(years => o.max_age_in_years_at_ascent))) || ' days' end as "Age" from oldest o where case when o.grade_system_id = 1 and o.order_on >= 13 then 1 when o.grade_system_id = 2 and o.order_on >= 60 then 1 when o.grade_system_id = 3 and o.order_on >= 37 then 1 else 0 end = 1 and o.climb_type_id in (1,2,3) order by o.grade_system_id ,o.order_on
Diff
--- before

+++ after

@@ -65,7 +65,7 @@

,'<a href="/climb/' || o.climb_id::varchar || '">' || o.climb_name || '</a>' as "Climb"
,o.min_age_in_days_at_ascent as "Age (Days)"
,case
- when o.date_of_birth_start = o.date_of_birth_end then
+ when o.min_age_in_days_at_ascent = o.max_age_in_days_at_ascent then
o.min_age_in_years_at_ascent || ' years ' ||
extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) ||
' days'
4900 23rd March 2026 23:59:58 UTC ben_sandi list Oldest Ascents (with date ranges) list_definition
Before
with climbers_with_dobs as ( select c.climber_id ,c.climber_name ,c.date_of_birth_start ,c.date_of_birth_end from climbers c where c.deleted_on is null and c.date_of_birth_start is not null and c.date_of_birth_end is not null ), ascents_with_ages as ( select row_number() over ( partition by g.grade_id order by a.ascent_dt_start - c.date_of_birth_end desc, a.ascent_dt_start asc ) as row_number ,c.climber_id ,c.climber_name ,cl.climb_id ,cl.climb_name ,g.grade_id ,g.grade_system_id ,g.climb_type_id ,g.order_on ,g.grade ,a.ascent_dt_start ,c.date_of_birth_start ,c.date_of_birth_end ,a.ascent_dt_start - c.date_of_birth_end as min_age_in_days_at_ascent ,a.ascent_dt_start - c.date_of_birth_start as max_age_in_days_at_ascent ,extract(year from age(a.ascent_dt_start, c.date_of_birth_end))::integer as min_age_in_years_at_ascent ,extract(year from age(a.ascent_dt_start, c.date_of_birth_start))::integer as max_age_in_years_at_ascent from ascents a inner join climbers_with_dobs c on a.climber_id = c.climber_id and a.deleted_on is null inner join climbs cl on cl.climb_id = a.climb_id and cl.deleted_on is null inner join grades g on cl.grade_id = g.grade_id where a.ascent_dt_start is not null ), oldest as ( select * from ascents_with_ages where row_number = 1 ) select o.grade ,'<a href="/climber/' || o.climber_id::varchar || '">' || o.climber_name || '</a>' as "Climber" ,'<a href="/climb/' || o.climb_id::varchar || '">' || o.climb_name || '</a>' as "Climb" ,o.min_age_in_days_at_ascent as "Age (Days)" ,o.min_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) || ' days to ' || o.max_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_start + make_interval(years => o.max_age_in_years_at_ascent))) || ' days' as "Age" from oldest o where case when o.grade_system_id = 1 and o.order_on >= 13 then 1 when o.grade_system_id = 2 and o.order_on >= 60 then 1 when o.grade_system_id = 3 and o.order_on >= 37 then 1 else 0 end = 1 and o.climb_type_id in (1,2,3) order by o.grade_system_id ,o.order_on
After
with climbers_with_dobs as ( select c.climber_id ,c.climber_name ,c.date_of_birth_start ,c.date_of_birth_end from climbers c where c.deleted_on is null and c.date_of_birth_start is not null and c.date_of_birth_end is not null ), ascents_with_ages as ( select row_number() over ( partition by g.grade_id order by a.ascent_dt_start - c.date_of_birth_end desc, a.ascent_dt_start asc ) as row_number ,c.climber_id ,c.climber_name ,cl.climb_id ,cl.climb_name ,g.grade_id ,g.grade_system_id ,g.climb_type_id ,g.order_on ,g.grade ,a.ascent_dt_start ,c.date_of_birth_start ,c.date_of_birth_end ,a.ascent_dt_start - c.date_of_birth_end as min_age_in_days_at_ascent ,a.ascent_dt_start - c.date_of_birth_start as max_age_in_days_at_ascent ,extract(year from age(a.ascent_dt_start, c.date_of_birth_end))::integer as min_age_in_years_at_ascent ,extract(year from age(a.ascent_dt_start, c.date_of_birth_start))::integer as max_age_in_years_at_ascent from ascents a inner join climbers_with_dobs c on a.climber_id = c.climber_id and a.deleted_on is null inner join climbs cl on cl.climb_id = a.climb_id and cl.deleted_on is null inner join grades g on cl.grade_id = g.grade_id where a.ascent_dt_start is not null ), oldest as ( select * from ascents_with_ages where row_number = 1 ) select o.grade ,'<a href="/climber/' || o.climber_id::varchar || '">' || o.climber_name || '</a>' as "Climber" ,'<a href="/climb/' || o.climb_id::varchar || '">' || o.climb_name || '</a>' as "Climb" ,o.min_age_in_days_at_ascent as "Age (Days)" ,case when o.date_of_birth_start = o.date_of_birth_end then o.min_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) || ' days' else o.min_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) || ' days to ' || o.max_age_in_years_at_ascent || ' years ' || extract(days from o.ascent_dt_start - (o.date_of_birth_start + make_interval(years => o.max_age_in_years_at_ascent))) || ' days' end as "Age" from oldest o where case when o.grade_system_id = 1 and o.order_on >= 13 then 1 when o.grade_system_id = 2 and o.order_on >= 60 then 1 when o.grade_system_id = 3 and o.order_on >= 37 then 1 else 0 end = 1 and o.climb_type_id in (1,2,3) order by o.grade_system_id ,o.order_on
Diff
--- before

+++ after

@@ -64,12 +64,19 @@

,'<a href="/climber/' || o.climber_id::varchar || '">' || o.climber_name || '</a>' as "Climber"
,'<a href="/climb/' || o.climb_id::varchar || '">' || o.climb_name || '</a>' as "Climb"
,o.min_age_in_days_at_ascent as "Age (Days)"
- ,o.min_age_in_years_at_ascent || ' years ' ||
- extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) ||
- ' days to ' ||
- o.max_age_in_years_at_ascent || ' years ' ||
- extract(days from o.ascent_dt_start - (o.date_of_birth_start + make_interval(years => o.max_age_in_years_at_ascent))) ||
- ' days' as "Age"
+ ,case
+ when o.date_of_birth_start = o.date_of_birth_end then
+ o.min_age_in_years_at_ascent || ' years ' ||
+ extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) ||
+ ' days'
+ else
+ o.min_age_in_years_at_ascent || ' years ' ||
+ extract(days from o.ascent_dt_start - (o.date_of_birth_end + make_interval(years => o.min_age_in_years_at_ascent))) ||
+ ' days to ' ||
+ o.max_age_in_years_at_ascent || ' years ' ||
+ extract(days from o.ascent_dt_start - (o.date_of_birth_start + make_interval(years => o.max_age_in_years_at_ascent))) ||
+ ' days'
+ end as "Age"

from
oldest o

< Page 245 >