Data Blaze matching challenge

Hi there! I'm having trouble with today's new snippet:

Situation:
I have a Data Blaze table of books, including their ISBN, the eBook ISBN, and the title.
Many books have two formats, like a paperback and hardcover. These books have different ISBNs but the same title. If there IS an ebook, the ebook ISBN will match for both titles, but not all books have an ebook, so this isn't a good match condition; I would like to use the title to match.
I want to look up a book in DB based on ISBN. Then I also want to display the other format of this book.

When I match based on ebook ISBN, it's working as expected (but as mentioned above, this isn't a good idea generally). And for debugging purposes I confirmed that the titles of the two formats do match.

Key title ISBN: {formtext: name=keyisbn}

{dbselect: SELECT Title, Format, `ISBN-13`, EBOOK FROM BrandsTitles WHERE contains(`ISBN-13`, `@keyisbn`) LIMIT 800; space=4PBMN6kQLs5Gmzuvk8bha6; menu=yes}

{dbselect: SELECT Format AS Format2, `ISBN-13` AS ISBN2, EBOOK AS EBOOK2, Title AS Title2 
FROM BrandsTitles 
WHERE EBOOK = @ebook AND `ISBN-13` <> `@isbn-13`; space=4PBMN6kQLs5Gmzuvk8bha6; menu=no}

Key title:
{=format}{=`isbn-13`} {=title}

Secondary format:
{=format2}{=isbn2} {=title2}

{if: title=title2}titles match{else}titles don't match{endif}

When I match based on title, I'm getting "no results found" for the second DB query. Why could this be happening, and is there a better way to do it? I realize that without including the DB table, this could be hard to troubleshoot, but I can't include it here for data privacy reasons.

Key title ISBN: {formtext: name=keyisbn}

{dbselect: SELECT Title, Format, `ISBN-13`, EBOOK FROM BrandsTitles WHERE contains(`ISBN-13`, `@keyisbn`) LIMIT 800; space=4PBMN6kQLs5Gmzuvk8bha6; menu=yes}

{dbselect: SELECT Format AS Format2, `ISBN-13` AS ISBN2, EBOOK AS EBOOK2, Title AS Title2 
FROM BrandsTitles 
WHERE Title = `@title` AND `ISBN-13` <> `@isbn-13`; space=4PBMN6kQLs5Gmzuvk8bha6; menu=no}

Key title:
{=format}{=`isbn-13`} {=title}

Secondary format:
{=format2}{=isbn2} {=title2}

Hi @megan.gendell.

I'm a little bit confused about how your data can look like, can you please mention an example, even without real data? I need to see how the same title matches multiple ISBNs, and eBook ISBNs in your space.

sure, example:
Book Title - hardcover - ISBN 123 - ebook ISBN 456
Book Title - paperback - ISBN 789 - ebook ISBN 456
Other Book Title - hardcover - ISBN 012 - ebook ISBN 345
Other Book Title - paperback - ISBN 678 - ebook ISBN 345

For context, we publish books simultaneously in paperback and hardcover. They have the same interior content and same title, so there is only one ebook (if there in an ebook). But the paperback and hardcover each have their own separate ISBNs. (There IS a identifier number for both books that links them together but I don't have a good way to include it in my table, sadly.)

I tried your exact snippet and it looks like it's working fine for me, can you please check this example? Do I miss something?