SmartQueryTools

Find Arg Max / Min in TSV Files Online

Find the value of one column at the row where another column is maximum or minimum in TSV files — directly in your browser. Optionally group by a category to get per-group results. No upload required.

Drop your .tsv file here

or click to browse — max 50 MB

About this tool

Find the value of one column at the row where another column reaches its maximum (or minimum) — with optional grouping. This is the SQL arg_max / arg_min operation. Common uses: find the best-selling product per category, the employee with the highest score per department, the date of each customer's largest order, or the city with the highest reading per sensor. Without grouping it scans the whole file and returns a single result. With grouping it returns one row per group. Output downloads as CSV. Runs entirely in your browser.

Frequently Asked Questions

What does arg_max return for a TSV file?

arg_max(return_col, value_col) scans all rows and returns the value of return_col from the single row where value_col is highest. For example, arg_max(city, population) returns the name of the city with the largest population.

What happens if there are ties — multiple rows with the same maximum value in a TSV file?

arg_max returns one value arbitrarily when there are ties. It does not guarantee which row is selected. If you need all tied rows, use the SQL Query tool with a WHERE clause filtering to the max value.

Can I use arg_min to find the row with the smallest value in a TSV file?

Yes. Switch the Operation toggle to arg_min. It works identically to arg_max but selects the row with the minimum value instead.

Is my data private?

Yes — completely. Your file is never uploaded to any server. Everything runs locally in your browser using WebAssembly — processing happens entirely inside your tab. Once you close the tab, nothing is retained.

What is the maximum file size?

The free limit is 50 MB. For larger files, performance depends on your device's available memory — most modern machines handle 500 MB to 1 GB comfortably.

Related Tools