Sql

Finding rows in table A that have corresponding rows in table B
AskAI

Given two tables, A and B, write a query to find all the rows in A that have a corresponding row in B.

160
Oct 23
Design a database table for storing information about books.
AskAI

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.

154
Oct 23
Find the Top 10 Customers by Total Spent
AskAI

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.

117
Oct 23
Database design for a library
AskAI

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.

181
Oct 23
Updating a table's "last_updated" column with a trigger
AskAI

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

180
Oct 23
Return the top 10 most expensive items in an inventory table.
AskAI

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

173
Oct 23
Find Customers Who Have Purchased Products from Both Suppliers A and B
AskAI

Write a SQL query to find the names of all customers who have purchased products from both suppliers A and B.

91
Oct 22
SQL query to find matching pairs of rows in two tables
AskAI

This technical problem deals with finding matching pairs of rows in two tables using SQL. An example is given, along with the expected output.

202
Oct 22