## Views

#### Recent solutions:

Check these solutions from our community:
Write a SQL query to find the names of the two highest scoring individuals in a table of data.
About this solution: The candidate's solution is correct and demonstrates a good understanding of SQL.
Jan 27
Databases / SQL DifficultyHard SQL
Given a table of data with two columns, "id" and "value", this SQL query will find all rows where the value is greater than the average value.
About this solution: The candidate's solution is correct and demonstrates a good understanding of SQL. The solution is also efficient, as it only requires one pass through the table.
Nov 28
Databases / SQL DifficultyHard SQL
Given a table of employee data, this SQL query will find all employees who have been with the company for more than 5 years.
About this solution: This solution is complete and solves the problem. The approach is straightforward and easy to follow.
Nov 24
Databases / SQL DifficultyHard SQL
To find the third highest salary in a table, you can use a SQL query. For example, given the following table: | ID | Name | Salary | |---- |-------|--------| | 1 | John | 1000 | | 2 | Jane | 2000 | | 3 | Joe | 3000 | | 4 | Sarah | 4000 | | 5 | Dave | 5000 | The third highest salary would be Joe's, with a salary of 3000.
About this solution: The candidate's solution is correct and uses the optimal approach to return the 3rd highest salary.
Nov 23
Databases / SQL DifficultyHard SQL
Given a table of employee data, write a SQL query to find the highest paid employee.
About this solution: The candidate's solution is optimal and demonstrates a complete understanding of the problem. The candidate's approach is straightforward and easy to follow.
Nov 20
Databases / SQL DifficultyMedium SQL
Write a SQL query to find the most popular articles on a website. The table "articles" contains the id, title, and views for each article. The query should return the id, title, and views for the most popular article.
About this solution: The solution above is optimal because it uses the ORDER BY and LIMIT clauses to sort the articles by views in descending order and then limit the results to the first row.
Nov 13
Databases / SQL DifficultyMedium SQL
This technical problem involves writing a SQL query to find products with prices between \$10 and \$20 from a given table. An example input and output is provided.
About this solution: The candidate's solution is complete and solves the problem. The approach is straightforward and uses the BETWEEN operator to filter the result set.
Nov 10
Databases / SQL DifficultyMedium SQL
Write a SQL query to find the names of all employees who work in the "Sales" department, given two tables, "employees" and "departments".
About this solution: The candidate's solution is correct and demonstrates a good understanding of SQL. The solution is clear and concise.
Nov 10