⌘
CheatSheet
Library
New Sheet
Import
Export
Edit — PostgreSQL
Title *
Icon
Category
Description
↑
↓
✕
auto-detect
bash
typescript
tsx
javascript
python
sql
json
yaml
docker
css
html
text
↑
↓
✕
\l \dt
auto-detect
bash
typescript
tsx
javascript
python
sql
json
yaml
docker
css
html
text
↑
↓
✕
\d users
auto-detect
bash
typescript
tsx
javascript
python
sql
json
yaml
docker
css
html
text
↑
↓
✕
\timing on \x
+ item
↑
↓
✕
auto-detect
bash
typescript
tsx
javascript
python
sql
json
yaml
docker
css
html
text
↑
↓
✕
INSERT INTO tags (name) VALUES ('go') ON CONFLICT (name) DO UPDATE SET updated_at = now();
auto-detect
bash
typescript
tsx
javascript
python
sql
json
yaml
docker
css
html
text
↑
↓
✕
SELECT email, COUNT(*) FROM users GROUP BY email HAVING COUNT(*) > 1;
auto-detect
bash
typescript
tsx
javascript
python
sql
json
yaml
docker
css
html
text
↑
↓
✕
SELECT * FROM posts WHERE (created_at, id) < ($1, $2) ORDER BY created_at DESC, id DESC LIMIT 20;
+ item
↑
↓
✕
auto-detect
bash
typescript
tsx
javascript
python
sql
json
yaml
docker
css
html
text
↑
↓
✕
SELECT relname, pg_size_pretty(pg_total_relation_size(oid)) FROM pg_class WHERE relkind = 'r' ORDER BY pg_total_relation_size(oid) DESC LIMIT 10;
auto-detect
bash
typescript
tsx
javascript
python
sql
json
yaml
docker
css
html
text
↑
↓
✕
SELECT pid, now() - query_start AS runtime, query FROM pg_stat_activity WHERE state = 'active' ORDER BY runtime DESC;
+ item
+ section
Save changes
Cancel