Preview:
SELECT COUNT(DISTINCT u.id) AS student_signups
FROM user u
LEFT JOIN user_profile up ON u.id = up.user_id
LEFT JOIN parents p ON p.student_id = u.id
LEFT JOIN user_profile parent_profile ON parent_profile.user_id = p.parent_id
WHERE u.type = 'student'
  AND u.created_at BETWEEN 1740783600 AND 1743375600
  AND (
        COALESCE(up.country, '') IN ('united-kingdom', 'United Kingdom') OR 
        COALESCE(parent_profile.country, '') IN ('united-kingdom', 'United Kingdom')
      );
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter