-- Database schema
| AwardsMisc : name [ TEXT ] primary_key , ID [ TEXT ] , award [ TEXT ] , year [ INTEGER ] , lgID [ TEXT ] , note [ TEXT ] | HOF : year [ INTEGER ] , hofID [ TEXT ] primary_key , name [ TEXT ] , category [ TEXT ] | Teams : year [ INTEGER ] , lgID [ TEXT ] , tmID [ TEXT ] , franchID [ TEXT ] , confID [ TEXT ] , divID [ TEXT ] , rank [ INTEGER ] , playoff [ TEXT ] , G [ INTEGER ] , W [ INTEGER ] , L [ INTEGER ] , T [ INTEGER ] , OTL [ TEXT ] , Pts [ INTEGER ] , SoW [ TEXT ] , SoL [ TEXT ] , GF [ INTEGER ] , GA [ INTEGER ] , name [ TEXT ] , PIM [ TEXT ] , BenchMinor [ TEXT ] , PPG [ TEXT ] , PPC [ TEXT ] , SHA [ TEXT ] , PKG [ TEXT ] , PKC [ TEXT ] , SHF [ TEXT ] | Coaches : coachID [ TEXT ] , year [ INTEGER ] Coaches.year = Teams.year , tmID [ TEXT ] Coaches.tmID = Teams.tmID , lgID [ TEXT ] , stint [ INTEGER ] , notes [ TEXT ] , g [ INTEGER ] , w [ INTEGER ] , l [ INTEGER ] , t [ INTEGER ] , postg [ TEXT ] , postw [ TEXT ] , postl [ TEXT ] , postt [ TEXT ] | AwardsCoaches : coachID [ TEXT ] AwardsCoaches.coachID = Coaches.coachID , award [ TEXT ] , year [ INTEGER ] , lgID [ TEXT ] , note [ TEXT ] | Master : playerID [ TEXT ] , coachID [ TEXT ] Master.coachID = Coaches.coachID , hofID [ TEXT ] , firstName [ TEXT ] , lastName [ TEXT ] , nameNote [ TEXT ] , nameGiven [ TEXT ] , nameNick [ TEXT ] , height [ TEXT ] , weight [ TEXT ] , shootCatch [ TEXT ] , legendsID [ TEXT ] , ihdbID [ TEXT ] , hrefID [ TEXT ] , firstNHL [ TEXT ] , lastNHL [ TEXT ] , firstWHA [ TEXT ] , lastWHA [ TEXT ] , pos [ TEXT ] , birthYear [ TEXT ] , birthMon [ TEXT ] , birthDay [ TEXT ] , birthCountry [ TEXT ] , birthState [ TEXT ] , birthCity [ TEXT ] , deathYear [ TEXT ] , deathMon [ TEXT ] , deathDay [ TEXT ] , deathCountry [ TEXT ] , deathState [ TEXT ] , deathCity [ TEXT ] | AwardsPlayers : playerID [ TEXT ] AwardsPlayers.playerID = Master.playerID , award [ TEXT ] , year [ INTEGER ] , lgID [ TEXT ] , note [ TEXT ] , pos [ TEXT ] | CombinedShutouts : year [ INTEGER ] , month [ INTEGER ] , date [ INTEGER ] , tmID [ TEXT ] , oppID [ TEXT ] , R/P [ TEXT ] , IDgoalie1 [ TEXT ] CombinedShutouts.IDgoalie1 = Master.playerID , IDgoalie2 [ TEXT ] CombinedShutouts.IDgoalie2 = Master.playerID | Goalies : playerID [ TEXT ] Goalies.playerID = Master.playerID , year [ INTEGER ] Goalies.year = Teams.year , stint [ INTEGER ] , tmID [ TEXT ] Goalies.tmID = Teams.tmID , lgID [ TEXT ] , GP [ TEXT ] , Min [ TEXT ] , W [ TEXT ] , L [ TEXT ] , T/OL [ TEXT ] , ENG [ TEXT ] , SHO [ TEXT ] , GA [ TEXT ] , SA [ TEXT ] , PostGP [ TEXT ] , PostMin [ TEXT ] , PostW [ TEXT ] , PostL [ TEXT ] , PostT [ TEXT ] , PostENG [ TEXT ] , PostSHO [ TEXT ] , PostGA [ TEXT ] , PostSA [ TEXT ] | GoaliesSC : playerID [ TEXT ] GoaliesSC.playerID = Master.playerID , year [ INTEGER ] GoaliesSC.year = Teams.year , tmID [ TEXT ] GoaliesSC.tmID = Teams.tmID , lgID [ TEXT ] , GP [ INTEGER ] , Min [ INTEGER ] , W [ INTEGER ] , L [ INTEGER ] , T [ INTEGER ] , SHO [ INTEGER ] , GA [ INTEGER ] | GoaliesShootout : playerID [ TEXT ] GoaliesShootout.playerID = Master.playerID , year [ INTEGER ] GoaliesShootout.year = Teams.year , stint [ INTEGER ] , tmID [ TEXT ] GoaliesShootout.tmID = Teams.tmID , W [ INTEGER ] , L [ INTEGER ] , SA [ INTEGER ] , GA [ INTEGER ] | Scoring : playerID [ TEXT ] Scoring.playerID = Master.playerID , year [ INTEGER ] Scoring.year = Teams.year , stint [ INTEGER ] , tmID [ TEXT ] Scoring.tmID = Teams.tmID , lgID [ TEXT ] , pos [ TEXT ] , GP [ INTEGER ] , G [ INTEGER ] , A [ INTEGER ] , Pts [ INTEGER ] , PIM [ INTEGER ] , +/- [ TEXT ] , PPG [ TEXT ] , PPA [ TEXT ] , SHG [ TEXT ] , SHA [ TEXT ] , GWG [ TEXT ] , GTG [ TEXT ] , SOG [ TEXT ] , PostGP [ TEXT ] , PostG [ TEXT ] , PostA [ TEXT ] , PostPts [ TEXT ] , PostPIM [ TEXT ] , Post+/- [ TEXT ] , PostPPG [ TEXT ] , PostPPA [ TEXT ] , PostSHG [ TEXT ] , PostSHA [ TEXT ] , PostGWG [ TEXT ] , PostSOG [ TEXT ] | ScoringSC : playerID [ TEXT ] ScoringSC.playerID = Master.playerID , year [ INTEGER ] ScoringSC.year = Teams.year , tmID [ TEXT ] ScoringSC.tmID = Teams.tmID , lgID [ TEXT ] , pos [ TEXT ] , GP [ INTEGER ] , G [ INTEGER ] , A [ INTEGER ] , Pts [ INTEGER ] , PIM [ INTEGER ] | ScoringShootout : playerID [ TEXT ] ScoringShootout.playerID = Master.playerID , year [ INTEGER ] ScoringShootout.year = Teams.year , stint [ INTEGER ] , tmID [ TEXT ] ScoringShootout.tmID = Teams.tmID , S [ INTEGER ] , G [ INTEGER ] , GDG [ INTEGER ] | ScoringSup : playerID [ TEXT ] ScoringSup.playerID = Master.playerID , year [ INTEGER ] , PPA [ TEXT ] , SHA [ TEXT ] | SeriesPost : year [ INTEGER ] SeriesPost.year = Teams.year , round [ TEXT ] , series [ TEXT ] , tmIDWinner [ TEXT ] SeriesPost.tmIDWinner = Teams.tmID , lgIDWinner [ TEXT ] , tmIDLoser [ TEXT ] SeriesPost.tmIDLoser = Teams.tmID , lgIDLoser [ TEXT ] , W [ INTEGER ] , L [ INTEGER ] , T [ INTEGER ] , GoalsWinner [ INTEGER ] , GoalsLoser [ INTEGER ] , note [ TEXT ] | TeamSplits : year [ INTEGER ] TeamSplits.year = Teams.year , lgID [ TEXT ] , tmID [ TEXT ] TeamSplits.tmID = Teams.tmID , hW [ INTEGER ] , hL [ INTEGER ] , hT [ INTEGER ] , hOTL [ TEXT ] , rW [ INTEGER ] , rL [ INTEGER ] , rT [ INTEGER ] , rOTL [ TEXT ] , SepW [ TEXT ] , SepL [ TEXT ] , SepT [ TEXT ] , SepOL [ TEXT ] , OctW [ TEXT ] , OctL [ TEXT ] , OctT [ TEXT ] , OctOL [ TEXT ] , NovW [ TEXT ] , NovL [ TEXT ] , NovT [ TEXT ] , NovOL [ TEXT ] , DecW [ TEXT ] , DecL [ TEXT ] , DecT [ TEXT ] , DecOL [ TEXT ] , JanW [ INTEGER ] , JanL [ INTEGER ] , JanT [ INTEGER ] , JanOL [ TEXT ] , FebW [ INTEGER ] , FebL [ INTEGER ] , FebT [ INTEGER ] , FebOL [ TEXT ] , MarW [ TEXT ] , MarL [ TEXT ] , MarT [ TEXT ] , MarOL [ TEXT ] , AprW [ TEXT ] , AprL [ TEXT ] , AprT [ TEXT ] , AprOL [ TEXT ] | TeamVsTeam : year [ INTEGER ] TeamVsTeam.year = Teams.year , lgID [ TEXT ] , tmID [ TEXT ] TeamVsTeam.tmID = Teams.tmID , oppID [ TEXT ] TeamVsTeam.oppID = Teams.tmID , W [ INTEGER ] , L [ INTEGER ] , T [ INTEGER ] , OTL [ TEXT ] | TeamsHalf : year [ INTEGER ] TeamsHalf.year = Teams.year , lgID [ TEXT ] , tmID [ TEXT ] TeamsHalf.tmID = Teams.tmID , half [ INTEGER ] , rank [ INTEGER ] , G [ INTEGER ] , W [ INTEGER ] , L [ INTEGER ] , T [ INTEGER ] , GF [ INTEGER ] , GA [ INTEGER ] | TeamsPost : year [ INTEGER ] TeamsPost.year = Teams.year , lgID [ TEXT ] , tmID [ TEXT ] TeamsPost.tmID = Teams.tmID , G [ INTEGER ] , W [ INTEGER ] , L [ INTEGER ] , T [ INTEGER ] , GF [ INTEGER ] , GA [ INTEGER ] , PIM [ TEXT ] , BenchMinor [ TEXT ] , PPG [ TEXT ] , PPC [ TEXT ] , SHA [ TEXT ] , PKG [ TEXT ] , PKC [ TEXT ] , SHF [ TEXT ] | TeamsSC : year [ INTEGER ] TeamsSC.year = Teams.year , lgID [ TEXT ] , tmID [ TEXT ] TeamsSC.tmID = Teams.tmID , G [ INTEGER ] , W [ INTEGER ] , L [ INTEGER ] , T [ INTEGER ] , GF [ INTEGER ] , GA [ INTEGER ] , PIM [ TEXT ] | abbrev : Type [ TEXT ] , Code [ TEXT ] , Fullname [ TEXT ] |
-- -- How many coaches who have taught the Buffalo Sabres have died?

SELECT COUNT(DISTINCT T3.coachID) FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Buffalo Sabres' AND T3.deathYear IS NOT NULL;