DEV Community

Ramya .C
Ramya .C

Posted on

Day 35 of My Data Analytics Journey !


Today we had an SQL test in our training. The task was to create a database and design tables using Primary Key, Foreign Key, Unique, Index, etc. After setting up the tables, we had to solve different SQL queries.

Some of the interesting questions were:

  • Find the highest employee salary
  • List employees with their department name and location
  • Show employees working in the "Engineering" department
  • Find the total and average salary per department
  • Show the latest hired employee in each department using ROW_NUMBER()
  • Display the top 2 highest paid employees in each department
  • Identify employees working on more than one project
  • Find projects with total hours worked greater than 300
  • Calculate cumulative salary distribution within each department
  • Identify departments where the average salary is greater than 70,000

At first, we made some small mistakes, but those mistakes actually helped us learn better. This test improved my confidence in SQL queries and database design.

๐Ÿ’ก Lesson learned: Practical implementation is the best way to understand database concepts deeply.

Top comments (0)