awk 'BEGIN { do this }
NR > 1 { .. }
...
END { do that }
'
BEGIN should not be preceded by a { - it's not based on any condition (such as NR > 1), it's just the first thing AWK does. Similarly, END should not be followed by a } as it's not part of any condition - it's the last thing AWK does.