get the total amount of usage (in percentage) between specified dates

I have SQL Server 2017 table:

Table of usage statistics

the number 1 represents the test equipment being connected and the number 0 is disconnected
need your help to define a query that gives me the amount of use (in percentage) for:

  • ConnectStatistics According to the selected range of DateTime in
    Specific "DeviceName" and "PcName"
  • RunningStatistics Depending on the selected DateTime range
    in specific "PcName"

    Thanks for your help