From 0d8ae7984a1762e2b54e7c9e44f4f5d353abab86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Wed, 16 Feb 2022 20:49:41 +0100 Subject: [PATCH] Add example of union --- 1/GBD/notes/union-example.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 1/GBD/notes/union-example.sql diff --git a/1/GBD/notes/union-example.sql b/1/GBD/notes/union-example.sql new file mode 100644 index 0000000..e9dd48f --- /dev/null +++ b/1/GBD/notes/union-example.sql @@ -0,0 +1,5 @@ +-- futbolistas + +SELECT salario "euros" FROM futbolistas UNION SELECT presupuesto FROM equipos; + +SELECT nombre FROM futbolistas WHERE altura <= ALL(SELECT altura FROM futbolistas);