Some of the fields in a stored procedure have an '@' symbol before it. What does this mean?
Ignore the fields and data themselves.
, cast(hi.date_closed as date) hiclose
, @helloclose:=cast(ifnull(audit.date_created,hello.date_entered)
, cast(@hi-INTERVAL WEEKDAY(@hiclose)DAY as datetime) himonclose
, @oppentered:=cast(opp.date_entered - interval 5 hour as datetime) hicreate
, cast(@oppentered - INTERVAL WEEKDAY(@oppentered)DAY as datetime) himoncreate