Free SQL Queries Cheat Sheet — Joins, Aggregations & Window Functions Online
Interactive SQL query syntax cheat sheet. Common Table Expressions (CTE), DENSE_RANK window functions, duplicate detection, and advanced joins. — 100% free online utility, zero sign-up, zero paywalls, and private client-side processing.
Chmod 755 (Read/Execute for all, Write for Owner)
Sets rwxr-xr-x permissions. Standard for executable web scripts and directories.
chmod 755 filename.sh
Find Files Larger Than 100MB
Searches root partition for giant files eating up storage.
find / -type f -size +100M -exec ls -lh {} \;Create Gzip Compressed Tarball
-c (create), -z (gzip), -v (verbose), -f (filename). Archives directory.
tar -czvf backup-archive.tar.gz /var/www/html
Kill Process Running on Specific Port
Instantly frees locked port 3000 or 8080.
fuser -k 3000/tcp || npx kill-port 3000
Inspect Live Server Resource Usage
Interactive real-time process monitoring sorted by CPU usage.
htop || top -o %CPU
Interactive Rebase Last N Commits
Squash, edit, or reorder the last 3 local commits before pushing to remote.
git rebase -i HEAD~3
Undo Last Commit but Keep Staged Changes
Moves HEAD back 1 commit without touching your modified files in working directory.
git reset --soft HEAD~1
Stash Changes with Custom Descriptive Message
Shelves dirty working tree state with a searchable tag.
git stash push -m 'WIP: auth integration refactor'
Cherry-Pick Specific Commit to Current Branch
Applies the exact diff of a commit from another branch to current HEAD.
git cherry-pick a1b2c3d4
Force Delete Local and Remote Branch
Prunes abandoned or merged feature branch everywhere.
git branch -D feature/login && git push origin --delete feature/login
Run Background Container with Port Forwarding
Runs nginx container detached in background mapped to host port 8080.
docker run -d -p 8080:80 --name my-web-app nginx:alpine
Clean All Unused Containers, Networks & Images
Reclaims tens of gigabytes of disk space by pruning dangling cache and unused layers.
docker system prune -a --volumes -f
Tail Container Live Output Logs
Streams recent 100 stdout lines in real-time.
docker logs -f --tail 100 <container-id>
Execute Interactive Bash Shell Inside Container
Opens terminal prompt inside running Alpine or Debian container.
docker exec -it <container-id> /bin/sh
200 OK vs 201 Created
Use 201 when a POST or PUT creates a new persistent resource.
HTTP/1.1 201 Created Location: /api/v1/orders/108
301 Moved Permanently vs 302 Found
301 passes 99% SEO link equity (PageRank). 302 is temporary and doesn't update indexing.
HTTP/1.1 301 Moved Permanently Location: https://example.com/new-url
401 Unauthorized vs 403 Forbidden
401 is authentication (identity unknown). 403 is authorization (identity known, but no access).
HTTP/1.1 401 Unauthorized (Missing/Expired JWT) HTTP/1.1 403 Forbidden (Valid JWT, but not Admin)
502 Bad Gateway vs 504 Gateway Timeout
Critical difference when debugging microservices behind Cloudflare or AWS ALB.
502: Reverse proxy (Nginx) got invalid response from upstream (Node/Python). 504: Upstream did not respond before proxy timeout.
Rank Items by Revenue (Window Function)
Calculates intra-department salary rank without collapsing rows with GROUP BY.
SELECT employee_id, department, salary, DENSE_RANK() OVER (PARTITION BY department ORDER BY salary DESC) as rank FROM employees;
Find Duplicate Emails in Users Table
Filters aggregate groups using HAVING to detect duplicate account records.
SELECT email, COUNT(*) FROM users GROUP BY email HAVING COUNT(*) > 1;
Common Table Expression (CTE) For Clean Pipelines
Readable modular subqueries replacing messy nested joins.
WITH active_subs AS ( SELECT user_id, plan_id, created_at FROM subscriptions WHERE status = 'active' ) SELECT u.email, s.plan_id FROM users u JOIN active_subs s ON u.id = s.user_id;
How It Works
Select SQL Concept
Filter by Window Functions, CTEs, or Aggregations.
Review Query Structure
Understand PARTITION BY, HAVING, and JOIN semantics.
Copy Query
Paste into PostgreSQL, MySQL, SQLite, or BigQuery.
Frequently Asked Questions
Related Developer Tools Calculators & Utilities
Interlinked precision tools in the Developer Tools collection.
JSON Formatter & Validator
Format, validate, beautify, and minify JSON with syntax highlighting, error detection with line numbers, JSON path query, and schema validation.
Base64 Encoder & Decoder
Encode text or files to Base64 and decode Base64 strings back to plain text or binary files. Supports URL-safe Base64, UTF-8, and custom encoding options.
URL Encoder & Decoder
Percent-encode special characters in URLs for safe transmission and decode percent-encoded URL strings back to readable text. Handles full URLs and query parameters.
Regex Tester & Debugger
Test regular expressions in real-time with match highlighting, group captures, flags, and built-in reference library of common patterns for emails, URLs, and dates.
Hash Generator (MD5, SHA-256, SHA-512)
Generate MD5, SHA-1, SHA-256, SHA-384, and SHA-512 cryptographic hashes from text input or files. Compare hashes for file integrity verification.
Secure Password Generator
Generate cryptographically secure passwords with custom length, character sets (uppercase, lowercase, numbers, symbols), and strength scoring via zxcvbn analysis.