
A community to connect and learn from other SQL professionals.
Lagos, Nigeria
Joined April 2021
- Tweets1.6K
- Following10
- Followers12.5K
- Likes2.3K
Do you really know SQL? 😊
Day 24/30
Which query correctly retrieves 3 highest distinct salaries?
A. SELECT DISTINCT Salary FROM Employees ORDER BY Salary DESC LIMIT 3;
B. SELECT Salary FROM Employees ORDER BY Salary DESC LIMIT 3;
C. SELECT TOP 3 DISTINCT Salary FROM Employees
Do you really know SQL? 😊
Day 23/30
Using the table ‘Devices’ below, write a query that would return the latest date Ada used any device?
Do you really know SQL? 😊
Day 22/30
Using the table Sessions below, how do you get the previous login time per user?
A. LAG(login_time)
B. LAG(login_time) OVER ()
C. LAG(login_time) OVER (PARTITION BY user_id ORDER BY login_time)
D. PREVIOUS(login_time)
Do you really know SQL? 😊
Day 21/30
Which query returns rows where amount is missing?
A. WHERE amount = NULL
B. WHERE amount IS NULL
C. WHERE amount == NULL
D. WHERE amount = 'NULL'
Do you really know SQL? 😊
Day 20/30
Which query returns the running total of sales by date?
A. SELECT Date, SUM(Amount)
FROM Sales GROUP BY Date;
B. SELECT Date, SUM(Amount) OVER (ORDER BY Date)
FROM Sales;
C. SELECT Date, RUNNING(Amount) FROM Sales;
Do you really know SQL? 😊
Day 19/30
What does this query return: SELECT COALESCE(Email, 'no-email') FROM Users;
A. Replaces empty strings with NULL
B. Converts NULL emails to 'no-email'
C. Converts all values to strings
D. Removes NULL rows
Do you really know SQL? 😊
Day 18/30
Using the case study question from yesterday and the tables below, write a query that will identify users who are matching with multiple people in a short period (let’s say 4days).
Do you really know SQL? 😊
Day 17/30
Using the information in the image below, write out as many investigative questions as possible if you were the lead Data Analyst.
Do you really know SQL? 😊
Day 16/30
What does this RETURN?
SELECT SUM(Salary) OVER () FROM Employees;
A. Total salary for each row
B. One row showing total salary
C. Total salary only for first row
D. Total salary partitioned by default
Do you really know SQL? 😊
Day 15/30
What would this query return?
SELECT COUNT(*) - COUNT(Email) FROM Users;
A. Number of NULL Email rows
B. Number of non-null Email rows
C. Total row count
D. Number of duplicate Emails
Do you really know SQL? 😊
Day 14/30
Which of these causes a FULL TABLE SCAN most likely?
A. Filtering on an indexed column with equality
B. Using LIKE 'A%' on an indexed VARCHAR
C. Using a function on an indexed column (e.g., WHERE LOWER(Name) = 'John')
Do you really know SQL? 😊
Day 13/30
What does this window function return?
SELECT Name, Salary, RANK() OVER (ORDER BY Salary DESC) AS r
FROM Employees;
A. Unique ranking with no gaps
B. Ranking with gaps if salaries tie
C. Continuous ranking without ties
Do you really know SQL? 😊
Day 12/30
Using the tables below, write a query that will return teachers who teach at least one course
Do you really know SQL? 😊
Day 10/30
Using the table “Trips” below, can you write a query that will return drivers whose total fare exceeds 4000?
Do you really know SQL? 😊
Day 10/30
You want employees whose name contains “ann”.
A. WHERE Name LIKE '%Ann%'
B. WHERE Name LIKE '%ann%'
C. WHERE Name LIKE '%Ann%' OR '%ann%'
D. A or B (depending on case sensitivity)















