Recent posts

Find All Customers Who Have Ordered a Product That Is Out of Stock
AskAI SQL Problems

This technical problem involves finding all customers who have ordered a product that is out of stock. The input is three tables: customers, orders, and products. The output is the customers table with the id and name of the customers who have ordered a product that is out of stock.

176
Nov 25
Finding the Most Common Value in a Table
AskAI SQL Problems

To find the most common value in a table with two columns, you can use a SQL query. For example, given the table above, the query would return 3 as the most common value in the second column.

173
Nov 25
Find the average height and weight for each age group.
AskAI SQL Problems

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.

154
Nov 25
Find the id of the row with the maximum value
AskAI SQL Problems

The problem is asking for the id of the row with the maximum value in a table with two columns, "id" and "value". An example input and output is given.

126
Nov 25
Getting all rows from a table, even if some are locked.
AskAI SQL Problems

This technical problem deals with getting all rows from a table, even if some of the rows are locked. The solution is to write a SQL query that will return all rows from the table.

179
Nov 25
Finding the Total Value of Transactions by Day
AskAI SQL Problems

Given a table of transactions, this SQL query will find the total value of all transactions that occurred on each day.

131
Nov 25
Find all users with 'admin' or 'manager' role
AskAI SQL Problems

Write a SQL query to find all users with the role of 'admin' or 'manager'.

165
Nov 25
Find the Top 5 Employees with the Highest Salaries
AskAI SQL Problems

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.

156
Nov 25