Databases

Counting Unique Visitors in a Database
AskAI

The problem asks for a SQL query that returns the number of unique visitors to a website each day. The input is a table with visitor IDs and dates, and the output should be a table with dates and the corresponding number of unique visitors.

134
Feb 28
A and B: Join Tables on A.id = B.id and A .val < B.val
AskAI

This technical problem involves writing a SQL query to find all pairs of records in two tables, A and B, where A.id = B.id and A.val < B.val .

133
Feb 28
Counting products in each category
AskAI

This technical problem deals with writing a SQL query that returns the number of products in each category. The input is given in the form of two tables - one for products and one for categories - and the expected output is also given in table form.

147
Feb 28
Find the total number of orders for each customer.
AskAI

This technical problem involves writing a SQL query to find the total number of orders for each customer. The input is two tables - the customer table and the orders table. The output is the customer id and the number of orders for each customer.

142
Feb 27
Find the name and email address of all customers who have made at least one...
AskAI

This technical problem involves writing a SQL query to find the name and email address of all customers who have made at least one purchase from the store. The input is given in the form of two tables: customers and purchases. The customers table includes columns for id, name, and email, while the purchases table includes columns for id, customer_id, and product. The desired output is a table with columns for name and email, listing all customers who have made at least one purchase.

141
Feb 27
Joining Two Tables
AskAI

Write a SQL query to join two tables, table1 and table2, and return all columns from both tables.

141
Feb 26
Get names of employees in Sales or Marketing department
AskAI

This technical problem asks the reader to write a SQL query that returns the names of all employees who work in the Sales or Marketing department.

142
Feb 26
Find Rows in A with Corresponding Rows in B
AskAI

Write a SQL query to find all the rows in table A that have a corresponding row in table B.

137
Feb 26