.separator ''
WITH num AS (
 SELECT 1 AS n
   UNION ALL
 SELECT n+1 FROM num WHERE n < 50
), fizz AS (
  SELECT n, 'Fizz' AS fz FROM num WHERE n%3=0
), buzz AS (
  SELECT n, 'Buzz' AS bz FROM num WHERE n%5=0
)
SELECT fz, bz,
       CASE WHEN fz IS NULL AND bz IS NULL THEN a.n END
FROM  (num a LEFT JOIN fizz b ON a.n=b.n)
       LEFT JOIN buzz c
       ON a.n=b.n AND b.n=c.n AND a.n=c.n;
