17 lines
513 B
SQL
17 lines
513 B
SQL
-- The server connects to the database named in the nearest directive.
|
|
-- Change these URLs to match your PostgreSQL instance.
|
|
|
|
-- @database: postgresql://postgres:postgres@localhost:5432/postgres
|
|
|
|
-- Try completion after FROM, hover over users, or place the cursor on the URL.
|
|
SELECT id, email
|
|
FROM users
|
|
ORDER BY id;
|
|
|
|
-- A second directive switches the database for everything below it.
|
|
-- @database: postgresql://postgres:postgres@localhost:5432/analytics
|
|
|
|
SELECT name, price
|
|
FROM widgets
|
|
ORDER BY price DESC;
|