From e2f373b6d9f84cb727f41dd5ace80ef74bf282a1 Mon Sep 17 00:00:00 2001 From: AdityaTharunJ Date: Tue, 26 May 2026 20:24:05 +0530 Subject: [PATCH] Add SQL queries for sorting employees --- SQL Deep Dive/Order By/questions.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SQL Deep Dive/Order By/questions.sql b/SQL Deep Dive/Order By/questions.sql index ccd4ac6..29a56df 100644 --- a/SQL Deep Dive/Order By/questions.sql +++ b/SQL Deep Dive/Order By/questions.sql @@ -3,13 +3,14 @@ * Table: employees * Question: Sort employees by first name ascending and last name descending */ - +select * from employees ORDER BY first_name ASC, last_name DESC; /* * DB: Employees * Table: employees * Question: Sort employees by age */ +select * from employees ORDER BY birth_date; /* @@ -17,3 +18,4 @@ * Table: employees * Question: Sort employees who's name starts with a "k" by hire_date */ +select * from employees WHERE first_name ILIKE 'k%' ORDER BY hire_date