Baselight
WITH all_countries AS (
  SELECT DISTINCT country_name
  FROM @blt.calendar.public_holidays
  WHERE subdivision_name = 'National'
    AND YEAR(date) = 2025
),
may1_countries AS (
  SELECT DISTINCT country_name
  FROM @blt.calendar.public_holidays
  WHERE subdivision_name = 'National'
    AND MONTH(date) = 5
    AND DAY(date) = 1
    AND YEAR(date) = 2025
),
classified AS (
  SELECT
    a.country_name,
    CASE WHEN m.country_name IS NOT NULL THEN 'May 1st is public holiday' ELSE 'May 1st is normal day' END AS may1_status
  FROM all_countries a
  LEFT JOIN may1_countries m ON a.country_name = m.country_name
)
SELECT may1_status, COUNT(*) AS num_countries
FROM classified
GROUP BY may1_status
order by 2 desc
may1_statusnum_countries
May 1st is public holiday122
May 1st is normal day47

Share link

Anyone who has the link will be able to view this.