RUB
Not enough data · n=2

Company overview
Latest vacancy: March 30, 2026
Published in the selected period
Currencies are not converted. Lower and upper bounds are calculated independently and show their own sample sizes.
Not enough data · n=2
Published records
Interviews · 1
Grouped by direction
Questions · 9
Questions · 4
Task: You have a user table — 20 million rows 20 thousand registrations per day. The table has columns: CREATE TABLE users ( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, name VARCHAR(50) NOT NULL, nickname VARCHAR(40), email VARCHAR(60), created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP(), banned_at TIMESTAMP DEFAULT NULL, status TINYINT(1) DEFAULT 1 ) When a user registers, they are active Registration date is in the created_at field If the user is blocked, we record the timestamp in banned_at and change status to 0 No more than 1% of all registered users per day are blocked Question: 1. How to write a query to count the number of users who were blocked and registered today in pure SQL 2. What index should be created for optimal performance of your query