Proof of concept for DB query stack-note.

Needs more intelligent selection of stack trace frame.