Denitrification makes use of a specialised group of bacteria that live under anaerobic conditions and use nitrate ions as a means of oxidising carbohydrates to produce energy.
[CH2O] and NO3-CO2 and H2O and N2 or N2O
In the process the nitrate ions (NO3-) are reduced to nitrogen (N2) or dinitrogen oxide (N2O).