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
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
Databases / SQL DifficultyMedium SQL
This problem asks for a SQL query that returns the average transaction value for each day. The example input table has three days, with transaction values of 10, 20, and 30 respectively. The expected output table would have the same three days, with average values of 10, 15, and 20.
About this solution: The solution above is optimal because it uses the AVG function to calculate the average value for each day.
Nov 10
Databases / SQL DifficultyMedium SQL
Write a SQL query to find all products in a table that cost more than $10.
About this solution: The candidate's solution is correct and demonstrates a good understanding of SQL. The solution is also efficient, as it uses the WHERE clause to filter the results.
Nov 10
Databases / SQL DifficultyMedium SQL
Given two tables - one of users and one of permissions - write a SQL query to find all users who have the permission to view a certain resource.
About this solution: The candidate's solution is correct and demonstrates a good understanding of SQL. The solution is also efficient, using a JOIN to combine the two tables and then filtering the results.
Nov 09
Databases / SQL DifficultyMedium SQL
This technical problem involves writing a SQL query to return the names of employees who have been with the company for more than 5 years.
About this solution: The candidate's solution is correct and uses an optimal approach.
Nov 09
Databases / SQL DifficultyMedium SQL
Write a SQL query to find the cheapest product in a given table. The table schema is provided, and an example input and output are given.
About this solution: The candidate's solution is correct and demonstrates a good understanding of SQL.
Nov 09
Databases / SQL DifficultyMedium SQL
Write a SQL query to find the 10 most popular articles on a blog, based on the number of likes.
About this solution: The candidate's solution is correct and demonstrates a good understanding of SQL. The solution is also efficient, as it uses the ORDER BY and LIMIT clauses to retrieve the desired data.
Nov 09
Databases / SQL DifficultyMedium SQL
Given a list of customer names and corresponding orders, this SQL query will find the customer who has placed the most orders.
About this solution: The candidate's solution correctly finds the customer with the most orders. The query is well-organized and easy to follow. The use of GROUP BY, ORDER BY, and LIMIT is efficient and concise. Overall, the candidate demonstrates a good understanding of SQL and how to solve this problem.
Nov 09