---
title: "How would you calculate the total login duration per user per day from a login activity table?"  
description: "How would you calculate the total login duration per user per day from a login activity table?"  
author: "Ashutosh Patel"  
published: 2025-04-30  
updated: 2025-04-30  
canonical: https://www.mindstick.com/forum/161551/how-would-you-calculate-the-total-login-duration-per-user-per-day-from-a-login-activity-table  
category: "SQL Server"  
tags: ["mssql server", "sql server", "sql"]  
reading_time: 1 minute  

---

# How would you calculate the total login duration per user per day from a login activity table?

How would you [calculate the total](https://www.mindstick.com/interview/34111/how-do-you-calculate-the-total-size-of-all-files-in-a-directory-including-subdirectories) login [duration](https://answers.mindstick.com/qa/45301/what-is-a-short-duration-discussion) per [user](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server) per day from a [login activity](https://answers.mindstick.com/qa/115830/why-is-facebook-showing-wrong-location-in-login-activity) [table](https://www.mindstick.com/articles/43918/how-to-design-table-using-bootstrap)?


---

Original Source: https://www.mindstick.com/forum/161551/how-would-you-calculate-the-total-login-duration-per-user-per-day-from-a-login-activity-table

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
