Write a SQL query to find employees who have been with a company for more than 5 years. The table to query has the following schema: (name, department, start_date). The query should return the (name, department, start_date) for each employee meeting the 5 year criteria.
To find the sum of all values in a table with two columns, "id" and "value", use the following query: SELECT SUM(value) FROM table
To find the top 5 employees with the highest salaries, you can write a SQL query that orders the employees by salary in descending order and then limits the result set to the first 5 employees.
You are tasked with creating a backup and recovery plan for a database. The database is currently running on a single server. The backup plan must be able to recover the database in the event of a server failure.
The goal is to design a backup and recovery solution that will work in both a single server and a distributed system environment. The solution needs to be able to scale up or down as the number of databases or users increases or decreases.
To find the top 3 customers with the highest average order value, you can use a SQL query. This query will take the customer data from a table and find the 3 customers with the highest average order value.
To find all duplicates in a table with first and last name columns, you can use a SQL query. This query will return all rows where the first and last name match.
Write a SQL query to find the total number of orders for each customer from a table of customer order information.