Databases / SQL

Categories: Code Problem / Data Structures and Algorithms / Recursion (32) Code Problem / Data Structures and Algorithms / Binary Search (30) Code Problem / Data Structures and Algorithms / Linked Lists (26) Code Problem / Data Structures and Algorithms / Backtracking (26) Code Problem / Data Structures and Algorithms / Stacks and Queues (25) Code Problem / Data Structures and Algorithms / Hashing (24) Databases / SQL / Backup and Recovery (19) Code Problem / Data Structures and Algorithms / Arrays and Strings (19) Databases / SQL / Database Normalization (18) Code Problem / Data Structures and Algorithms / Time Complexity (17) Databases / SQL / Locking (16) Databases / SQL / Replication (15) Databases / SQL / SQL Queries (13) Code Problem / Data Structures and Algorithms / Graphs (13) Databases / SQL / Database Security (13)  More...

Recent solutions:

Check these solutions from our community:
Databases / SQL DifficultyMedium SQL
Given a table of employees, this query finds the employees who have been with the company for more than 10 years.
About this solution: The candidate's solution is correct and uses an optimal approach to solving the problem.
Nov 11
Databases / SQL DifficultyMedium SQL
To find the row with the highest value in a table, you can use a simple SQL query. Just specify the name and value columns in the SELECT clause, and add a ORDER BY clause to sort the results by value in descending order. Then, use the LIMIT clause to only return the first row from the sorted results.
About this solution: The solution above is optimal because it uses the ORDER BY and LIMIT clauses to sort the table by value in descending order and then return the first row.
Nov 11
Databases / SQL SQL
The table has two columns, id and data. The query should return the data in ascending order of id.
About this solution: The candidate's solution is correct and demonstrates a level of completeness. The solution is also optimal because it is the simplest solution that will return the data in ascending order of id.
Nov 11
Databases / SQL DifficultyMedium SQL
Given a table of data with columns for name, email, and signup date, this SQL query will find the most recent signup for each email address.
About this solution: The solution above is optimal because it uses the MAX function to find the most recent signup date for each email address.
Nov 10
Databases / SQL DifficultyMedium SQL
Write a SQL query to find the names of all the items that have a price greater than or equal to $10.
About this solution: The solution above is optimal because it uses the WHERE clause to filter the results to only include items with a price greater than or equal to 10.
Nov 10
Databases / SQL DifficultyMedium SQL
To find the customer with the highest total purchase amount, write a SQL query that select the customer with the maximum TotalPurchaseAmount from the table.
About this solution: The candidate's solution is correct and demonstrates a good understanding of SQL.
Nov 10
Databases / SQL SQL
This technical problem deals with finding all products that cost more than $10 from a list of products and their prices.
About this solution: The candidate's solution is correct and demonstrates a good understanding of SQL. The solution is also optimal, as it is simple and easy to understand.
Nov 10
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