Database Normalization

Find all rows where parent_id is not equal to child_id
AskAI

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.

186
Nov 26
Find the Second Highest Salary in an Employees Table
AskAI

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.

199
Nov 26
Find the average height and weight for each age group.
AskAI

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.

179
Nov 25
SQL Query to Find Products with Price Greater than Average Price
AskAI

This technical problem involves writing a SQL query to find products with a price greater than the average price of all products.

161
Nov 23
Get the average price of all products in an unnormalized database table.
AskAI

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.

181
Nov 23
"Return the total value of all products in a database table"
AskAI

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.

134
Nov 21
Get IDs and Names of Non-Manager Employees in Sales Department
AskAI

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.

187
Nov 19
"Finding All Children of Parent 'A'"
AskAI

Given a table with two columns, "name" and "parent", write a SQL query to find all the children of the parent "A".

219
Nov 19