Recent posts

Return the name and salary of the highest paid employee from a table of data.
AskAI SQL Problems

Write a stored procedure that returns the name and salary of the highest paid employee from a table of data.

181
Nov 22
Find all pairs of distinct values in two columns
AskAI SQL Problems

Write a SQL query to find all pairs of distinct values in two columns.

169
Nov 22
Find most common value in SQL table
AskAI SQL Problems

Given a table with two columns, this SQL query will find the most common value in the second column.

163
Nov 22
Finding Pairs of Rows with Values Within 10% of Each Other
AskAI SQL Problems

Write a SQL query to find all pairs of rows in a table where the values in the two columns are within 10% of each other.

175
Nov 22
Get the number of rows in a database table
AskAI SQL Problems

This technical problem deals with writing a function that can take in a database name and table name, and return the number of rows in the table.

128
Nov 22
Find the average price of all products in a database.
AskAI SQL Problems

This technical problem involves writing a SQL query to find the average price of all products in a database. An example product table is provided, and the expected output is the average price of all products in the table.

149
Nov 21
SQL Trigger to Automatically Update "last_updated" Column
AskAI SQL Problems

This technical problem describes how to write a SQL trigger that will automatically update the "last_updated" column whenever a change is made to any of the other columns in a table. The example input table contains employee data, and the example output shows how the "last_updated" column would be updated after a change is made to one of the other columns.

161
Nov 21
SQL Query to Find Users with Multiple Orders
AskAI SQL Problems

This technical problem involves writing a SQL query to find users with multiple orders. The example input and output are provided.

151
Nov 21