What's wrong with this code?

What I’m trying to do

I have a subject MOC Where all things under that subject will be pulled in via dataview. At least that’s the plan. I have a property type called “Note Type”, and one of the note types I have is called “chapter note”. The chapter note list all the sections of that chapter, and I links to the actual notes for that section underneath.

What I am trying to do is set up the subject MOC to pull in those notes under the section, but note the link to the actual chapter note, but for some reason, it’s still pulling in that chapter note. This is the code I am using, and I don’t know where it’s going wrong.

LIST
FROM “5 - Learning/SQL/Notes”
WHERE Chapter = 15
AND [“Note Type”] != “chapter note”
SORT Created ASC

Things I have tried

I’ve asked a Obsidian specific ChatGPT bot for help and none of it’s suggestions have worked. I also haven’t been able to find any documentation so far that might explain the bahavior. I’m hoping someone on here will be able to point me in the right direction.

You solved your code on the OMG Discord, but since your forum post the mentions documentation, here is the not-easy-to-find place in the docs that explains how to use property names with spaces.

That’s why yours would have been note-type != "chapter note" (until you renamed it to remove the space).