Anyquery is a SQL query engine that allows you to run SQL queries on pretty much anything. It supports querying JSON, CSV, Parquet, SQLite, Airtable bases, Google Sheets, Notion databases, logs file using Grok, and more. It also supports running SQL queries on remote files (HTTP, S3, GCS) and local apps (Apple Notes, Apple Reminders, Google Chrome Tabs, etc.).
It’s built on top of SQLite and uses plugins to extend its functionality.
Moreover, it can acts as a MySQL server, allowing you to run SQL queries from your favorite MySQL-compatible client (e.g. Looker Studio, DBeaver, TablePlus, Metabase, etc.).
Usage
The documentation provides detailed instructions on how to run queries with Anyquery.
But let’s see a quick example. Type anyquery
in your terminal to open the shell mode. Then, run the following query:
-- List all repositories of asg017 related to SQLite
SELECT full_name, stargazers_count, pushed_at FROM github_repositories_from_user('asg017') WHERE name LIKE '%sqlite%';
-- Count rows of a remote 75MB CSV file
SELECT count(*) FROM read_csv('https://raw.githubusercontent.com/datadesk/california-coronavirus-data/master/latimes-place-totals.csv', header=true);
-- Insert into a Notion database all repositories of nalgeon related to SQLite
INSERT INTO notion_database(repo, stars, last_push) SELECT full_name, stargazers_count, pushed_at FROM github_repositories_from_user('nalgeon') WHERE description LIKE '%sqlite%';
-- Close all tabs of the datasette documentation
DELETE FROM chrome_tabs WHERE url LIKE '%datasette%';
You can also launch the MySQL server with anyquery server
and connect to it with your favorite MySQL-compatible client.
anyquery server &
mysql -u root -h 127.0.0.1 -P 8070
Installation
The documentation provides detailed instructions on how to install Anyquery on your system. You can install anyquery from Homebrew, APT, YUM/DNF, Scoop, Winget and Chocolatey. You can also download the binary from the releases page.