Indented block is not shown in query

I have a block with a property type and value key-sentence . I have another block farther down on the same page but indented and with the same property and value. When I do a {{query (property type key-sentence)}} only the 1st block is rendered.
Block 2 is a child of block 1.

What am I not doing right?

Can you provide screenshot of the issue?

Here is what I see.

So the issue is that child blocks are not shown in the table view and also filtered from the result because of a default option.

This option can be set in advanced queries:

Here’s an advanced query option to try.

{:title [:h4 "Title"]
 :query [:find (pull ?b [*])
   [?b :block/properties ?prop]
   [(get ?prop :type) ?type]
   [(= ?type "key-sentence")]
 :remove-block-children? false
1 Like

Yep, that works perfectly, thanks a lot. Ironically, the one that is farthest down on the original page occurs at the top of the list - no big deal though.

I got into Logseq at the end of April, so still a newbie, and have made a start with simple queries. The syntax of advanced queries something completely different - and here’s me thinking advanced queries are a fleshed version of simple queries :rofl:.

Many thanks once again for your help.

1 Like

Simple queries also work in advanced queries. See the docs on that.
My problem is that I never properly learned simple queries and jumped straight into the advanced stuff :yum::joy:

1 Like

I marked your code as the solution.

1 Like

@Siferiax Sorry to comeback to this but I just noticed the column “source” is redundant because it provides the same info as the column “page”, i.e. the page where the data is extracted from.

Is it possible to exclude the column “source”?

There is an icon :gear:. Click that, it let’s you select the columns in a table.

1 Like

Oops, sorry for that silly question :blush:, but thanks anyway for answering it :pray:

1 Like

Nah. Sometimes the obvious is obscured because it is obvious.

1 Like