Working on SQL for Note.