Databases

Find all employees who work in the Sales department.
AskAI

To find all employees who work in the Sales department, we can join the Employees and Departments tables on the department_id column.

168
Mar 08
Find the intersection of two tables using SQL.
AskAI

This technical problem involves using SQL to find the intersection of two tables. In other words, the goal is to find all rows from both tables that have matching values in the specified columns.

165
Mar 08
Find all rows in TABLE_A that have corresponding rows in TABLE_B
AskAI

Given two tables, write a SQL query to find all the rows in the first table that have a corresponding row in the second table.

149
Mar 08
SQL Query to Find All Rows in TableA with Corresponding Row in Table B
AskAI

Write a SQL query to find all rows in TableA that have a corresponding row in TableB.

167
Mar 08
Get all products in the Electronics category
AskAI

This technical problem deals with writing a SQL query to join two tables and return the names of all products in a given category. In the example given, the category is "Electronics" and the products returned are "TV" and "Phone".

126
Mar 07
Get total number of orders for each user
AskAI

Given two tables - "users" and "orders" - write a SQL query to find the total number of orders for each user.

165
Mar 07
Get customer name, city, and order total from Customers and Orders tables
AskAI

Write a SQL query to return the customer name, customer city, and the total amount spent by the customer on orders, given two tables - Customers and Orders.

169
Mar 07
Find Customers Who Have Purchased Both Product A and Product B
AskAI

This technical problem deals with finding customers who have purchased both Product A and Product B from a database. An example input and output is given.

152
Mar 07