PostgreSQL
v16
PostgreSQL
v16
PostgreSQL is a powerful open-source object-relational database system developed by the PostgreSQL Global Development Group. It follows the relational model with strong SQL standards compliance and adds object-relational features such as custom types, table inheritance, and rich extensibility. It is fully ACID-compliant and supports advanced data types including JSONB, arrays, ranges, and full-text search, plus extensions like PostGIS for geospatial work.
PostgreSQL is widely used for transactional applications, analytics, and as a general-purpose data backbone where correctness and extensibility matter. It supports window functions, CTEs, MVCC concurrency, and multiple procedural languages. This tool is a free online query editor running PostgreSQL 16, letting you write and run Postgres-flavored SQL in your browser without installing or configuring a server.
CREATE TABLE users (
id SERIAL PRIMARY KEY,
name TEXT NOT NULL,
email TEXT UNIQUE
);
INSERT INTO users (name, email) VALUES
('Ada', '[email protected]'),
('Linus', '[email protected]');SELECT id, name
FROM users
WHERE name ILIKE 'a%'
ORDER BY name
LIMIT 10;SELECT u.name, o.total
FROM users u
JOIN orders o ON o.user_id = u.id
WHERE o.total > 100;SELECT user_id, COUNT(*) AS order_count, SUM(total) AS spent
FROM orders
GROUP BY user_id
HAVING SUM(total) > 500;WITH ranked AS (
SELECT user_id, total,
ROW_NUMBER() OVER (PARTITION BY user_id ORDER BY total DESC) AS rn
FROM orders
)
SELECT * FROM ranked WHERE rn = 1;INSERT INTO users (name, email)
VALUES ('Ada', '[email protected]')
ON CONFLICT (email) DO UPDATE SET name = EXCLUDED.name
RETURNING id, name;UPDATE users SET name = 'Ada L.' WHERE id = 1;
DELETE FROM users WHERE email IS NULL;
SELECT id FROM users
WHERE data @> '{"active": true}'::jsonb;CREATE INDEX idx_orders_user ON orders (user_id);
EXPLAIN ANALYZE
SELECT * FROM orders WHERE user_id = 1;SELECT d::date AS day, count(o.id) AS orders
FROM generate_series('2026-06-01', '2026-06-07', INTERVAL '1 day') AS d
LEFT JOIN orders o ON o.created_at::date = d::date
GROUP BY day
ORDER BY day;SELECT DISTINCT ON (user_id) user_id, total
FROM orders
ORDER BY user_id, total DESC;
SELECT user_id, array_agg(total ORDER BY total DESC) AS totals
FROM orders
GROUP BY user_id;Yes. This editor runs PostgreSQL queries in your browser, so you can test SQL without installing or configuring a Postgres server.
It runs PostgreSQL 16, so features like SQL/JSON functions and the latest planner improvements are available.
Yes, the online PostgreSQL editor is completely free.
No seed tables are preloaded. Define your own schema with CREATE TABLE; each run starts fresh, so keep your schema and inserts in the same script.
PostgreSQL uses SERIAL or IDENTITY for keys, ILIKE for case-insensitive matching, ON CONFLICT for upserts, and offers rich types like JSONB and arrays with strong standards compliance.