This technical problem deals with finding the number of rows in a table where the values in two columns are equal. The input is a table with two columns, and the output is the number of rows where the values in the two columns are equal.
This technical problem deals with writing a SQL query to find the top 10 customers by total amount spent. The input is a table of customer data, including customer IDs, names, and total amount spent. The output should be a table with the customer IDs, names, and total amount spent, sorted in descending order by total amount spent.
The table given contains a list of users and when they last logged in. The goal is to write a SQL query that returns the id, username, and password for all users who logged in within the last 24 hours.
To find all customers named John Smith, we can run a query against a table of customer names. The query would return all rows where the first name is "John" and the last name is "Smith".
This technical problem involves writing a SQL query to find all customers who have placed an order in the last 30 days. The example input data consists of a customers table with id and name columns, and an orders table with id, customer_id, and order_date columns. The example output lists the id and name columns for all customers who have placed an order in the last 30 days.
This technical problem asks the reader to write a SQL query that finds the most recent backup for each database on a server. The example input provided shows two databases, each with a different last backup date. The expected output is the same as the input.
Given a table with two columns, id and parent_id, write a SQL query to find all the root nodes.
This technical problem involves writing a SQL query that returns the names of customers who have placed orders with a total value of more than $100.