Acies Global SQL Interview Question | Employee Swipe in and Swipe out

Опубликовано: 10 Июнь 2026
на канале: Ankit Bansal
18,571
560

In this video we will solve a tricky SQL interview question asked in Acies Global interview.

You can now practice high quality SQL questions on Namaste SQL : https://www.namastesql.com/coding-pro...

Script:
CREATE TABLE swipe (
employee_id INT,
activity_type VARCHAR(10),
activity_time datetime
);

-- Insert sample data
INSERT INTO swipe (employee_id, activity_type, activity_time) VALUES
(1, 'login', '2024-07-23 08:00:00'),
(1, 'logout', '2024-07-23 12:00:00'),
(1, 'login', '2024-07-23 13:00:00'),
(1, 'logout', '2024-07-23 17:00:00'),
(2, 'login', '2024-07-23 09:00:00'),
(2, 'logout', '2024-07-23 11:00:00'),
(2, 'login', '2024-07-23 12:00:00'),
(2, 'logout', '2024-07-23 15:00:00'),
(1, 'login', '2024-07-24 08:30:00'),
(1, 'logout', '2024-07-24 12:30:00'),
(2, 'login', '2024-07-24 09:30:00'),
(2, 'logout', '2024-07-24 10:30:00');

Zero to hero(Advance) SQL Aggregation:
   • All About SQL Aggregations | SQL Advance |...  

Most Asked Join Based Interview Question:
   • Most Asked SQL JOIN based Interview Questi...  

Solving 4 Trick SQL problems:
   • Solving 4 Tricky SQL Problems  

Data Analyst Spotify Case Study:
   • Data Analyst Spotify Case Study | SQL Inte...  

Top 10 SQL interview Questions:
   • Top 10 SQL interview Questions and Answers...  

Interview Question based on FULL OUTER JOIN:
   • SQL Interview Question Based on Full Outer...  

Playlist to master SQL :
   • Complex SQL Questions for Interview Prepar...  

Rank, Dense_Rank and Row_Number:
   • RANK, DENSE_RANK, ROW_NUMBER SQL Analytica...  

#sql #dataengineer