Using almost all of your code, I got it to work, but I changed three parts. First of all, I changed from an inline DQL query, into a inline dataviewjs query by doing `$=, secondly you need to still use the dv.fileLink() like you originally did. And thirdly, you need to change to dv.span( ... ) instead of dv.paragraph( ... ) since you want the end result to be inline.
Note that it does need to be one a single line in order to compile, which make these kind of queries somewhat hard to read. So if this construct is something you’re likely to reuse a lot, I would suggest looking into dv.view(), which would require a specific javascript file with your code (but it could be (closely) formatted like your first example), and then you could do stuff like: start $= dv.view("/js/somewhere/lesson", 0) end to achieve the same effect, with the offset as a parameter.
This worked perfectly. Thanks so much. I will spend some time understanding what the differences are between what you did and my initial attempt. I suspect it relates to @mnvwvnm’s comment (which I didn’t understand). I’m fairly new to dataview and obsidian in general. Still trying to grok it all.