Recent posts

Find all pairs of rows in a table of data where the values in the columns are...
AskAI SQL Problems

Given a table of data with two columns, this technical problem seeks to find all pairs of rows where the values in the columns are equal. The input is a list of data values, and the output is also a list of data values.

167
Oct 24
Update "last_updated" column on table with insert or update trigger
AskAI SQL Problems

A trigger is needed that will update the "last_updated" column on a table every time a row is inserted or updated.

124
Oct 24
Get the Top 5 Most Popular Articles from a Database
AskAI SQL Problems

Write a SQL query that returns the top 5 most popular articles from a database of articles.

169
Oct 24
Design a database table for storing information about books.
AskAI SQL Problems

Design a database table for storing information about books. The table should have columns for the book's title, author, ISBN, publisher, and publication date.

156
Oct 23
Find the Top 10 Customers by Total Spent
AskAI SQL Problems

This technical problem deals with writing a SQL query to find the top 10 customers by total amount spent. Given a table of customer data, the goal is to return the customer ID, name, and total amount spent for the 10 customers who have spent the most.

118
Oct 23
Database design for a library
AskAI SQL Problems

This technical problem deals with the design of a database for a library. The database should include tables for books, patrons, and checked out books.

184
Oct 23
Updating a table's "last_updated" column with a trigger
AskAI SQL Problems

Update the "last_updated" column in a table using a trigger so that it reflects the most recent insert or update.

181
Oct 23
Return the top 10 most expensive items in an inventory table.
AskAI SQL Problems

This stored procedure will take an inventory table as input and return the top 10 most expensive items in the table.

175
Oct 23