Database Security

Find all users with 'admin' or 'manager' role
AskAI

Write a SQL query to find all users with the role of 'admin' or 'manager'.

162
Nov 25
Get salts for given passwords in table
AskAI

This technical problem involves writing a SQL query that returns the salt for a given user's password. The example input and output are provided in the body of the problem.

142
Nov 24
Get the number of rows in a database table
AskAI

This technical problem deals with writing a function that can take in a database name and table name, and return the number of rows in the table.

120
Nov 22
Find the number of unique users in a table
AskAI

The goal is to find the number of unique users in a table. The table has the following columns: user_id, name. The query should return the number of unique users. In the example above, the answer would be 3.

152
Nov 21
SQL query to find the number of users who have both a first and last name
AskAI

This technical problem deals with writing a SQL query to find the number of users who have both a first and last name. The input is a table of user data, and the output is the number of users who have both a first and last name.

158
Nov 17
SQL query to find all users who have the permission to view a certain resource
AskAI

Given two tables - one of users and one of permissions - write a SQL query to find all users who have the permission to view a certain resource.

212
Nov 09
Find all users with 'billing_address' containing 'California'
AskAI

This technical problem involves writing a SQL query to find all users who have a 'billing_address' that includes the word 'California'. Given a table of user data, the desired output is a table with the user_id, name, and billing_address of matching users.

185
Nov 08
SQL query to find users in more than one role
AskAI

This technical problem deals with writing a SQL query to find all the users who are in more than one role. The user table, role table, and user role table are provided, and the expected output is also given.

219
Nov 06