From 8f69957a27a1760424ba00335a07976417a91532 Mon Sep 17 00:00:00 2001 From: AdityaTharunJ Date: Wed, 3 Jun 2026 13:17:32 +0530 Subject: [PATCH] Create views for employees hired in 90-95 and high earners --- SQL Deep Dive/Views/questions.sql | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/SQL Deep Dive/Views/questions.sql b/SQL Deep Dive/Views/questions.sql index 3159c50..9edab3a 100644 --- a/SQL Deep Dive/Views/questions.sql +++ b/SQL Deep Dive/Views/questions.sql @@ -5,6 +5,9 @@ */ CREATE VIEW "90-95" AS +SELECT * from employees AS e +WHERE EXTRACT(YEAR FROM E.hire_date) BETWEEN 1990 AND 1995 +ORDER BY e.emp_no; -- ... /* @@ -14,4 +17,8 @@ CREATE VIEW "90-95" AS */ CREATE VIEW "bigbucks" AS +SELECT * from employees as e +JOIN salaries as s USING(emp_no) +WHERE s.salary > 80000 +ORDER BY s.salary; -- ...