Group BY - Need Assistance Please

I have this dataview code:
TABLE WITHOUT ID l.text AS “Last Entry”, file.link AS “Client”, row[“modified date”] AS Modified
FROM “Active Matters”
FLATTEN file.lists AS l
SORT Client DESC

Which gives me last entry, client, and date

I want to group by the client name so it looks like:

Entry Client Date
Entry
Entry

Entry Client Date
Entry

Can someone advise how to do that, please?

I really wanted to grab the last text block but that looks like it involves dataviewJS…
(see image)

Do you mean like this:

TABLE WITHOUT ID rows.t AS "Last Entry", Client, rows["modified date"][0] AS Modified
FROM "Active Matters"
FLATTEN file.lists.text AS t
GROUP BY file.link AS Client
SORT Client DESC

DQL (the Dataview Query Language you’re using, as opposed to DataviewJS) can return the part you circled if you use headings (of any level).

For example, when you format the notes like this:

## 2026-01-16

- David

## 2026-01-15

- Received

… this Dataview query:

TABLE WITHOUT ID map(rows.t.link, (l) => meta(l).subpath) AS "Heading", rows.t.text AS "Last Entry", Client, rows["modified date"][0] AS Modified
FROM "Active Matters"
FLATTEN file.lists AS t
GROUP BY file.link AS Client
SORT Client DESC

… returns this:

You can group that in other ways; I wasn’t sure how you would want it.

And/or you could adjust the layout:

TABLE WITHOUT ID map(rows, (r) => r.h + " • " + r.t.text) AS "Last Entry", Client, rows["modified date"][0] AS Modified
FROM "Active Matters"
FLATTEN file.lists AS t
FLATTEN meta(t.link).subpath AS h
GROUP BY file.link AS Client
SORT Client DESC

Thank you for replying. I am going to apply your suggestions and see if I can get to work correctly. Have a great day!

Hello, this is working great. I just have one question: Is there any way to limit the number of entries in the results? Some of these will have numerous entries. I have provided a couple of images to help visualize what I’m asking. If you have any ideas, please let me know. Thanks in advance.

The dataview code is here:
TABLE WITHOUT ID map(rows.t.link, (l) => meta(l).subpath) AS “Last Entry”, rows.t.text AS “Entry Details”, Client, rows[“modified date”][0] AS “Record Modified”, “#uniqueTableId” AS “”
FROM “Active Matters”
FLATTEN file.lists AS t
GROUP BY file.link AS Client
SORT map(rows.t.link, (l) => meta(l).subpath)[0] DESC, Client ASC