Databases

Sort table by id column in ascending order
AskAI

The table has two columns, id and data. The query should return the data in ascending order of id.

186
Oct 22
find all customers who have made at least one purchase
AskAI

This technical problem involves finding all customers who have made at least one purchase from each of three different categories. An example input and output is provided.

205
Oct 21
Finding the total number of employees in each department
AskAI

This technical problem involves writing a SQL query to find the total number of employees in each department, based on data from two tables, "employees" and "departments".

181
Oct 21
Finding common elements between two tables
AskAI

Given two tables, A and B, write a SQL query to find the common elements between the two tables.

180
Oct 21
SQL query to find the total number of products ordered for each product.
AskAI

This technical problem involves writing a SQL query to find the total number of products ordered for each product. The query should use two tables - products and orders - as input and return the product name and total number of products ordered for each product as output.

173
Oct 18
SQL query to return customers who have placed orders over $100
AskAI

Write a SQL query that returns the names of customers who have placed orders totaling more than $100.

176
Oct 18
Finding All Pairs of Rows in Two Tables Where Column Values Match
AskAI

Write a SQL query to find all pairs of rows from two tables, A and B, such that the values in the columns match.

175
Oct 17
Get number of customers served by each employee
AskAI

This technical problem involves writing a SQL query that returns the number of customers served by each employee at a store. The input data consists of three tables: customers, employees, and customer_employ ee. The output should be a table with two columns: employee_name and customers_served.

156
Oct 17