Results
Below are the most-busy time periods based on the the JSR Launch Database database described here. I checked a few results with Carlos' answer and they seem to match.
THE_DAY THE_WEEK THE_MONTH THE_YEAR THE_DECADE LAUNCH_COUNT
---------- -------- --------- -------- ---------- ------------
4/26/1962 3
1985-W43 7
1971-12 17
1984 128
1950 23
1960 838
1970 1151
1980 1145
1990 837
2000 628
2010 600
10/4/1957 1950 1
4/26/1962 1960 3
4/8/1970 1970 3
5/26/1983 1980 3
2/28/1990 1990 3
12/21/2005 2000 3
6/15/2010 2010 3
1957-W40 1950 1
1962-W17 1960 6
1970-W15 1970 6
1985-W43 1980 7
1993-W25 1990 6
2000-W28 2000 5
2015-W13 2010 6
1959-08 1950 3
1965-12 1960 15
1971-12 1970 17
1983-04 1980 17
1990-04 1990 14
2000-10 2000 12
2014-12 2010 15
1959 1950 13
1967 1960 124
1976 1970 126
1984 1980 128
1990 1990 115
2000 2000 81
2014 2010 89
The above results are not complete since I removed a huge number of ties. Run the below query to see the full results.
Query
This query is quite complicated, but it lets you do a huge amount of grouping in one statement and lets you easily change the input conditions. (I manually adjusted the above results to remove duplicates and to make a better looking order.)
--Most busy times in space launches, per day/week/month/year, and also
--per day/week/month/year and by decade.
with launches as
(
--#1: Choose the relevant statuses and categories to use in the rest of the query.
select *
from launch
where launch_status = 'success'
and launch_category in ('deep space', 'orbital')
)
--#6: Only choose the highest ranks.
select *
from
(
--#5: Rank the different groups.
select counts.*, dense_rank() over (partition by grouping_id, the_decade order by launch_count desc) the_rank
from
(
--#4: Count per different grouping.
select
the_day, the_week, the_month, the_year, the_decade,
grouping_id(the_day, the_week, the_month, the_year, the_decade) grouping_id,
count(launches.launch_date) launch_count
from
(
--#3: Date dimension for different date groupings.
select
the_day,
to_char(trunc(the_day, 'iw'), 'YYYY-"W"iw') the_week,
to_char(trunc(the_day, 'iw'), 'YYYY-MM-DD') week_start,
to_char(trunc(the_day, 'iw')+6, 'YYYY-MM-DD') week_end,
to_char(the_day, 'YYYY-MM') the_month,
to_char(the_day, 'YYYY') the_year,
trunc(to_char(the_day, 'YYYY')/10)*10 the_decade
from
(
--#2: All days in the data set.
select trunc((select min(launch_date) from launches) + level - 1) the_day
from dual
connect by level <= (select ceil(max(launch_date) - min(launch_date)) from launches)
order by the_day
)
) dates
left join launches
on dates.the_day = trunc(launches.launch_date)
group by grouping sets((the_day), (the_week), (the_month), (the_year), (the_decade)
,(the_decade, the_year), (the_decade, the_month), (the_decade, the_week), (the_decade, the_day))
order by grouping_id, the_decade, the_day, the_week, the_month, the_year
) counts
order by grouping_id, the_rank
)
where the_rank = 1
order by grouping_id, the_decade, the_day, the_week, the_month, the_year;