High Availability

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 DifficultyHard SQL
This technical problem deals with finding employees who have been with a company for more than 5 years. Given a table of data with employee start and end dates, the goal is to write a query that returns all employees who satisfy the 5-year criterion. An example input and output is provided.
About this solution: The solution above is optimal because it is the most efficient way to find the employees who have been with the company for more than 5 years.
Nov 27
Databases / SQL DifficultyHard SQL
Given a table with two columns, id and value, write a query to find the id of the row with the maximum value.
About this solution: The candidate's solution is correct and demonstrates a good understanding of how to find the maximum value in a table. The solution is also efficient, as it only requires one pass through the table.
Nov 26
Databases / SQL DifficultyHard SQL
Write a SQL query to find the second highest salary from the employees table.
About this solution: The solution above is optimal because it uses a subquery to find the maximum salary and then uses that value to find the second highest salary.
Nov 24
Databases / SQL DifficultyHard SQL
The average salary of all employees in a company can be found using a SQL query. For example, if the employees table contains the following columns: ID, NAME, and SALARY, the average salary can be calculated by querying the table for the average value of the SALARY column.
About this solution: The candidate's solution is correct and demonstrates a level of completeness. The solution is also optimal, as it is the simplest solution that will return the correct result.
Nov 24
Databases / SQL DifficultyHard SQL
To find the customer with the highest balance, you can use a simple SQL query as follows: SELECT customer_id, name, balance FROM customers ORDER BY balance DESC LIMIT 1
About this solution: The solution above is optimal because it uses the ORDER BY and LIMIT clauses to sort the table by balance in descending order and then return the first row.
Nov 22
Databases / SQL DifficultyHard SQL
This technical problem involves writing a SQL query to find users with multiple orders. The example input and output are provided.
About this solution: The solution is correct and demonstrates a level of completeness. The approach is straightforward and easy to follow.
Nov 21
Databases / SQL DifficultyHard SQL
Given two tables, this SQL query finds all customers who have at least one order in each table.
About this solution: The solution above is optimal because it uses the IN operator to check if the customer_id from table1 is in table2.
Nov 21
Databases / SQL DifficultyMedium SQL
This question asks for a SQL query that returns the names of all the people with a score greater than 80.
About this solution: The candidate's solution is correct and demonstrates a good understanding of SQL.
Nov 15