>"name" FROM d..."> >"name" FROM d...">

YouTip LogoYouTip

PostgreSQL Tutorial - Getting Started

PostgreSQL Features

-- JSONB support
CREATE TABLE data (id SERIAL, info JSONB);
INSERT INTO data (info) VALUES ("{"name": "Alice"}");
SELECT info->>"name" FROM data;

-- Window functions
SELECT name, salary,
    RANK() OVER (ORDER BY salary DESC) as rank
FROM employees;

CTEs

WITH active_users AS (
    SELECT * FROM users WHERE status = "active"
)
SELECT * FROM active_users WHERE age > 18;

Summary

  • PostgreSQL supports JSONB, arrays, full-text search
  • Window functions enable advanced analytics
← SQLite Tutorial - Getting StarRedis Tutorial - Getting Start β†’