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
Given a table of products and their prices, write a SQL query to find the products with the highest price per unit.
Write a stored procedure that returns the total number of employees in each department from a given table of employee data.
Given a table with three columns: id, parent_id, and child_id, write a SQL query to find all the rows where the parent_id is not equal to the child _id.
This technical problem asks the reader to write a SQL query to find the average order value for each customer, given a table of customer orders. An example input and output is provided.
This technical problem asks the reader to write a SQL query to find the second highest salary from a given table of employees. An example table is provided, along with the expected output.
Write a SQL query that returns the names of all the people who have a score greater than 80.
Write a trigger that will update the total salary for each department when an employee's salary is updated.