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
The problem asks for a design of a database to store employee information. The input provides an example of the data that would be stored in the database, and the output shows an example of how the data might be organized in a table.
About this solution: The solution is complete and solves the problem. The approach is simple and easy to understand.
Nov 05
Databases / SQL DifficultyMedium SQL
The problem asks for a design of a database to store employee information. The input provides an example of the data that would be stored in the database, and the output shows an example of how the data might be organized in a table.
About this solution: This solution is a good start, but it is missing some key information. For example, it does not specify the data types for each column, which is important for database design. Additionally, it does not provide any information on how the table would be used or what kind of data would be stored in it, which would be helpful in determining whether this is the best design for the given purpose.
Nov 05
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: This solution is correct and demonstrates a level of completeness. It solves the problem and uses a sensible approach.
Nov 05
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: This solution is correct and demonstrates a level of completeness. It solves the problem and uses a sensible approach.
Nov 05
Databases / SQL DifficultyMedium SQL
This technical problem deals with how to write a SQL query that returns rows from a table that have been locked by another process.
About this solution: The solution correctly returns the rows that have been locked. However, it is not the most efficient solution. A more efficient solution would be to use a subquery.
Nov 05
Databases / SQL DifficultyMedium SQL
This technical problem deals with how to write a SQL query that returns rows from a table that have been locked by another process.
About this solution: The solution correctly returns the rows that have been locked. However, it is not the most efficient solution. A more efficient solution would be to use a subquery.
Nov 05
Databases / SQL DifficultyMedium SQL
Write a stored procedure that returns the top 10 products by sales from a given table.
About this solution: The candidate's solution is optimal and demonstrates a complete understanding of how to write a stored procedure to return the top 10 products by sales.
Nov 05
Databases / SQL DifficultyMedium SQL
The number of customers who have placed an order in the last 30 days can be found by querying the orders table and counting the number of customer_id entries where the order_date is within the last 30 days.
About this solution: The candidate's solution is correct and demonstrates a good understanding of how to use the DATE_SUB function to get the date 30 days ago. The candidate's solution is also efficient because it uses the WHERE clause to filter the results.
Nov 04