TablePlus is a native database client for macOS and Windows, known for its clean interface. It supports DuckDB since version 6.1: open your database like any other connection, browse tables as spreadsheets and write SQL in a tabbed editor.
Download it from tableplus.com, or on macOS with brew install --cask tableplus.
Click “Create a new connection…”, choose DuckDB, then select your selfsync-db.duckdb file and click Connect.
The left sidebar lists every table. Double-click one to see its rows, and switch to the Structure tab to see its columns and types.
Open the SQL editor with Cmd + E (Ctrl + E on Windows), paste the query and run it with Cmd + Enter.
SELECT z_sport AS sport,
count(*) AS sessions,
round(sum(z_total_distance) / 1000, 1) AS km
FROM z_fit_session_mesgs
GROUP BY ALL
ORDER BY km DESC;Wondering what a table or a column holds? Browse the FIT file reference.