Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the CUSTOMERS table having the following records: +----+----------+----

ID: 667735 • Letter: C

Question

Consider the CUSTOMERS table having the following records:


+----+----------+-----+-----------+----------+
| ID | NAME | AGE | ADDRESS | SALARY |
+----+----------+-----+-----------+----------+
| 1 | Ramesh | 22 | PA | 2000.00 |
| 2 | James | 25 | DE | 1500.00 |
| 3 | Jill | 23 | NY | 2000.00 |
| 4 | John | 25 | OH | 6500.00 |
| 5 | Wang | 27 | PA | 8500.00 |
| 6 | Komal | 22 | CA | 4500.00 |
| 7 | April | 24 | NY | 10000.00 |
+----+----------+-----+-----------+----------+


Write a SQL statement that displays the ID, NAME, ADDRESS and SALARY of individuals of same age. (
Hint: Use Group By function and Having Clause ) – 10 Pts

Explanation / Answer

SELECT ID, NAME,ADDRESS, SALARY FROM CUSTOMERS GROUP BY age HAVING COUNT(age) >= 2;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote