Filter rows of entire dataset


I use the InfluxDB. Each row i write to the DB has multiple fields. To reassemble the data I can use pivot(). But now I want to filter the data and only show the latest 10 rows (across all tables).
I tried top() and limit(), but both dont work for me, because those functions arent applying to the entire data but to each table seperately.

Can you help me? Thanks in advance!

Hello @Overflowed,
Can you please share your query?
If you want to apply to the entire query I believe you need to switch the order. First apply the pivot, and then apply the limit() or top() depending on your needs.