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 second highest salary from a given table of employees. An example table is provided, along with the expected output.
Given a table of data with an id, name, age, height, and weight column, write a SQL query to find the average height and weight for each age group.
This technical problem involves writing a SQL query to find products with a price greater than the average price of all products.
The problem is to write a query to return the average price of all products in an unnormalized database table. The table includes the attributes productID, productName, productDescription, and productPrice.
Given a database table with a schema as shown above, write a SQL query that returns the total value of all products in the table.
The table given contains information on employees, including their ID, name, manager ID, and department. The goal is to write a SQL query that returns the ID and name of all employees who are not managers and who are in the Sales department. From the given example input, the expected output would be the ID and name of Joe and Karen.