How do I restore my notes on macOS Sierra?
A very quick grab of all of the note body fields from the database:
sqlite3 ~/Library/Containers/com.apple.Notes/Data/Library/Notes/NotesV6.storedata "select ZHTMLSTRING from ZNOTEBODY" > ~/Desktop/notes.html
There is more organization in the database, but this will give you all of the text itself. The titles are listed separately in the database but should also be at the top of every note body, so this should be enough for reconstruction hopefully!
Edits:
Replace the ~/Library/Containers/com.apple.Notes/Data/Library/Notes/NotesV6.storedata
with the location of your NotesV6.storedata file ;)
Also depending on the version of OS X/macOS Notes that made the file, it may be NotesVN.storedata
for a different N
.