From 5ca04ec327a55eff61189660d729eecb9daa4953 Mon Sep 17 00:00:00 2001
From: Luca Ferrari <fluca1978@gmail.com>
Date: Wed, 19 Jan 2022 14:22:05 +0100
Subject: Task 1 done in PostgreSQL

---
 challenge-148/luca-ferrari/postgresql/ch-1.sql | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 challenge-148/luca-ferrari/postgresql/ch-1.sql

(limited to 'challenge-148/luca-ferrari/postgresql/ch-1.sql')

diff --git a/challenge-148/luca-ferrari/postgresql/ch-1.sql b/challenge-148/luca-ferrari/postgresql/ch-1.sql
new file mode 100644
index 0000000000..a1782662de
--- /dev/null
+++ b/challenge-148/luca-ferrari/postgresql/ch-1.sql
@@ -0,0 +1,18 @@
+        SELECT v
+        FROM generate_series( 1, 10 ) v
+        WHERE
+        v IN ( 2, 4, 6 )
+
+        UNION
+
+        SELECT v
+        FROM generate_series( 11, 19 ) v
+        WHERE v IN ( 12 )
+
+        UNION
+
+        SELECT v
+        FROM generate_series( 20, 100 ) v
+        WHERE
+        v % 10 IN ( 2, 4, 6 )
+        AND ( v / 10 )::int  IN ( 3, 4, 5, 6 );
-- 
cgit 

