PostgreSQL Workbench
Run PostgreSQL in your browser with a SQL editor, a psql-style terminal, schema diagrams and practice exercises.
PostgreSQL
PGlite WebAssembly
Results
Run a SQL statement to see its result here.
Practice a PostgreSQL join and read its query plan
The sample store opens with a query that joins customers, orders and order items to calculate revenue. Run it as written, then try adding AND c.country = 'Japan' to the WHERE clause. Compare the result before and after filtering. Open the relationship diagram to see how the customer and order keys connect the tables.
Select the query and press Ctrl or Command + Shift + Enter to show its EXPLAIN plan. Look for the steps that scan, join and aggregate the rows. This browser workspace runs a local PGlite database, so the plan describes the data and indexes loaded here.
Comments
Sign in or create an account to join the discussion.
Loading comments…