POSable interview question

The understanding on flowchart and SQL output