Moodle has "Grader report" table which has the floating header and one sticky column. Some other large tables may require more than one columns to be sticky and may needs footer to be floating too.
Jquery table plugin (https://www.jqueryscript.net/table/) provides Multifreeze header/columns (https://www.jqueryscript.net/table/Freeze-Headers-Columns-In-Table-jQuery-MultiFreezer.html). Did anyone looked into this? I was wondering whether this is appropriate for Moodle, so that we write some generic code that allow us generating flexible tables with floating headers and sticky columns.