Sql

Database Backup
AskAI

This technical problem describes how to create a backup of a database by creating a new database with the same structure and copying the data from the original tables into the new tables. The function should return the name of the new database.

183
Oct 22
"Finding the Three Most Expensive Products"
AskAI

This technical problem asks the user to write a SQL query to find the three most expensive products from a given table. The table includes columns for product ID, name, and price. An example input and output is provided.

148
Oct 22
Finding the Total Amount Spent by Each Customer
AskAI

Given a list of customer names and their purchase amounts, this SQL query will find the total amount spent by each customer.

169
Oct 22
SQL Query to Join Tables and Return Employee Data
AskAI

Write a SQL query that returns the id, name, and salary of all employees who make more than $30,000.

173
Oct 22
Find all Marketing employees with salaries greater than $50,000.
AskAI

Find all Marketing employees with salaries greater than $50,000.

167
Oct 22
Finding records in table A that have a matching record in table B.
AskAI

This problem can be solved with a SQL query that joins the two tables on the id column. The query would return all rows from table A that have a matching row in table B.

176
Oct 22
SQL JOIN on Equal Column Values
AskAI

Write a SQL query to find all pairs of records from two tables, A and B, such that the records have the same value for a given column, C.

147
Oct 22
Write a stored procedure to calculate the number of days between two dates.
AskAI

This stored procedure calculates the number of days between two dates.

173
Oct 22