How to embed query of blocks with a specific tag?

I have a bunch of blocks like

  • Block #A

    • Content
    • Content
  • Block #A

    • Content
    • Content

    How do I get all the blocks with tag #A in Embed block?

I tried this

SELECT *  FROM blocks p where (
	id in (
		select parent_id from blocks where tag like '%#C#%'
	)
)

but this also shows the blocks child content, I want only the parent block or like collapsed parent block

    Related articles

    Welcome to here!

    Here we can learn from each other how to use SiYuan, give feedback and suggestions, and build SiYuan together.

    Signup About
    Please input reply content ...