SQL and different accounting records by NAS