-- Lichiditate si solvabilitate (LC, LR, LI, SG, GI, AF)
SELECT
  DATE_FINANCIARE.AnFinanciar,
  [ActiveCirculante]/[DatoriiCurente] AS LC,
  IIf([LC]>1.2,"OPTIM",IIf([LC]>1,"ACCEPTABIL","DEFICITAR")) AS D_LC,
  ([ActiveCirculante]-[Stocuri])/[DatoriiCurente] AS LR,
  IIf([LR]>1,"OPTIM",IIf([LR]>0.8,"ACCEPTABIL","DEFICITAR")) AS D_LR,
  [CasaSiConturi]/[DatoriiCurente] AS LI,
  IIf([LI]>0.5,"OPTIM",IIf([LI]>0.2,"ACCEPTABIL","DEFICITAR")) AS D_LI,
  ([ActiveImobilizate]+[ActiveCirculante])/([DatoriiCurente]+[DatoriiTermenLung])*100 AS SG,
  IIf([SG]>200,"OPTIM",IIf([SG]>100,"ACCEPTABIL","DEFICITAR")) AS D_SG,
  ([DatoriiCurente]+[DatoriiTermenLung])/([ActiveImobilizate]+[ActiveCirculante])*100 AS GI,
  IIf([GI]<40,"OPTIM",IIf([GI]<60,"ACCEPTABIL","DEFICITAR")) AS D_GI,
  [CapitaluriProprii]/([ActiveImobilizate]+[ActiveCirculante])*100 AS AF,
  IIf([AF]>60,"OPTIM",IIf([AF]>40,"ACCEPTABIL","DEFICITAR")) AS D_AF
FROM DATE_FINANCIARE;
