to_SQL for latestNote