Recent posts

SQL query to return titles of books currently checked out
AskAI SQL Problems

Design a SQL query that will return the titles of all books that are currently checked out from a library catalog.

163
Nov 28
Find all rows where the value is greater than the average value.
AskAI SQL Problems

Given a table of data with two columns, "id" and "value", this SQL query will find all rows where the value is greater than the average value.

159
Nov 28
Finding Employees Who Have Been with the Company for More Than 5 Years
AskAI SQL Problems

This technical problem deals with finding employees who have been with a company for more than 5 years. Given a table of data with employee start and end dates, the goal is to write a query that returns all employees who satisfy the 5-year criterion. An example input and output is provided.

99
Nov 27
Find all nodes with a given attribute value in XML
AskAI SQL Problems

Given an XML document, write a SQL query to find all the nodes with a given attribute value.

101
Nov 27
Second highest salary from employees table
AskAI SQL Problems

This technical problem deals with finding the second highest salary from a table of employees. An example table is given, along with the expected output.

166
Nov 27
Find the order with the highest total value.
AskAI SQL Problems

Given a table of data representing customer orders, this SQL query finds the order with the highest total value.

112
Nov 27
Partitioning a Table by Year in SQL
AskAI SQL Problems

Given a table of data, write a SQL query to partition the data by year. The table should have three columns: id, value, and year. The query should return the id, value, and year for each row in the table.

152
Nov 27
Update prices by 10% using a cursor
AskAI SQL Problems

This problem asks the reader to write a cursor to update the prices of all products in a table by 10%. The table is provided as input, and the expected output is also shown.

163
Nov 27