So first off, Logseq is not really the tool you want to use for time tracking / time management.
It’s probably better to use a tool made for that job.
Second off, to understand what is happening, Logseq when time tracking will simply have plain text information for you.
This makes queries rather difficult.
Here’s an example of what I mean:
This is the logbook data for one of my repeating tasks. What Logseq writes to the .md file that is.
:LOGBOOK:
CLOCK: [2023-02-28 Tue 14:01:51]--[2023-02-28 Tue 14:05:57] => 00:04:06
* State "DONE" from "DOING" [2023-02-28 Tue 14:05]
CLOCK: [2023-03-07 Tue 09:19:35]--[2023-03-07 Tue 09:22:54] => 00:03:19
* State "DONE" from "DOING" [2023-03-07 Tue 09:22]
CLOCK: [2023-03-14 Tue 08:51:29]--[2023-03-14 Tue 08:56:44] => 00:05:15
* State "DONE" from "DOING" [2023-03-14 Tue 08:56]
:END:
And here’s what that looks like on the Logseq internal database:
{:block/uuid #uuid "6416e940-e12e-4bd7-a805-3197fb89ee46",
:block/priority "Z",
:block/repeated? true,
:block/left {:db/id 22732},
:block/refs [{:db/id 4} {:db/id 19}],
:block/scheduled 20230321,
:block/collapsed? false,
:block/format :markdown,
:block/content
"TODO [#Z] 🧺👕 Was 30 verzamelen & in de wasmachine doen\nSCHEDULED: <2023-03-21 Tue ++1w>\n:LOGBOOK:\nCLOCK: [2023-02-28 Tue 14:01:51]--[2023-02-28 Tue 14:05:57] => 00:04:06\n* State \"DONE\" from \"DOING\" [2023-02-28 Tue 14:05]\nCLOCK: [2023-03-07 Tue 09:19:35]--[2023-03-07 Tue 09:22:54] => 00:03:19\n* State \"DONE\" from \"DOING\" [2023-03-07 Tue 09:22]\nCLOCK: [2023-03-14 Tue 08:51:29]--[2023-03-14 Tue 08:56:44] => 00:05:15\n* State \"DONE\" from \"DOING\" [2023-03-14 Tue 08:56]\n:END:",
:db/id 22728,
:block/path-refs [{:db/id 4} {:db/id 19} {:db/id 30}],
:block/parent {:db/id 22732},
:block/unordered true,
:block/page {:db/id 30},
:block/marker "TODO"}
As you can see there is no database fields for the logbook, it is just plain text.
So with queries you are not able to do anything advanced.
The one thing you can do is something like this:
I have created two tasks and tracked some time for them. These tasks live in the journal pages so we can use between
in the query.
In table view there is a clock-time attribute displayed. This is as advanced as it’ll probably get given the constrains I mentioned.