A novel SNPR process for advanced nitrogen and phosphorus removal from mainstream wastewater based on anammox, endogenous partial-denitrification and denitrifying dephosphatation.