SQL Editor
Run SQL on one database or across every connection, Explain, saved queries
Run on one connection
Choose the connection under Run on and press Ctrl+Enter. Press Explain for the database’s plan. Queries you run are kept in History, and can be saved for later.
SELECT p.name, SUM(i.qty * i.unit_price - i.discount) AS revenue
FROM order_items i
JOIN products p ON p.id = i.product_id
JOIN orders o ON o.id = i.order_id
WHERE o.status = 'PAID'
GROUP BY p.name
ORDER BY revenue DESC
LIMIT 10Query across every connection
Set Run on to All connections (DuckDB) and name tables by the connection alias shown under the editor: alias.table for MySQL and SQLite, alias.schema.table for PostgreSQL. Only SELECT runs across connections.
SELECT p.sku, p.name, s.branch_code, s.qty_on_hand
FROM shop.products p
JOIN warehouse.warehouse.stock s ON s.sku = p.sku
WHERE s.qty_on_hand <= s.reorder_levelRoles and confirmations
Every role can run SELECT. Statements that change data (INSERT / UPDATE / DELETE) need Editor or higher; structure changes (CREATE / ALTER / DROP) need Owner or Admin. Risky statements such as DELETE without WHERE ask for confirmation. One statement runs at a time.