forked from mujx/hakatime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for the VS Code status bar
fixes mujx#50
- Loading branch information
Konstantinos Sideris
committed
Oct 24, 2021
1 parent
b64f626
commit 4cf8b7f
Showing
7 changed files
with
94 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
SELECT | ||
coalesce(CAST(SUM(total_seconds) AS bigint), 0) as total_time | ||
FROM ( | ||
SELECT | ||
time_sent, | ||
CAST(extract(epoch FROM previous_diff) AS int8) AS total_seconds | ||
FROM ( | ||
SELECT | ||
time_sent, | ||
(time_sent - (lag(time_sent) OVER (ORDER BY time_sent))) AS previous_diff | ||
FROM | ||
heartbeats | ||
WHERE | ||
sender = $1 AND time_sent >= (current_date + interval '0' day) AND time_sent < (current_date + interval '1' day) | ||
ORDER BY | ||
time_sent) inner_table | ||
WHERE | ||
extract(epoch FROM previous_diff) <= (15 * 60) | ||
GROUP BY | ||
time_sent, | ||
previous_diff | ||
ORDER BY | ||
time_sent) as result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters