Create Top 10 list by day

Hi,
each day i put data to the influxdb, like this:

timestamp package runtime
2022-01-01 13:30 package1 55
2022-01-01 13:30 package2 35
2022-01-01 13:30 package3 5
2022-01-01 13:30 package4 155
2022-01-02 13:32 package1 65
2022-01-02 13:33 package2 31
2022-01-02 13:34 package3 15
2022-01-02 13:40 package4 145

All in all i would like to create a query, showing the TOP 10 packages by runtime and also showing the runtimes of the last days.

For example

package runtime (day1) runtime (day2) runtime (day3)


package3 255 301 299
package2 155 255 200
package1 120 80 70

Visualisation should be done in Grafana (Table View). Can you help me, define the INflux query?