Skip to content

Instantly share code, notes, and snippets.

View anhcuong's full-sized avatar
🎯
Focusing

Frank anhcuong

🎯
Focusing
  • Sydney
  • 20:03 (UTC +11:00)
View GitHub Profile
@anhcuong
anhcuong / cheat_sheet.md
Last active July 2, 2022 11:39 — forked from nhudinhtuan/cheat_sheet.md
15 days cheat sheet for interviews
-- Bad use of aggregation
SELECT
users.id,
users.email,
users.name,
MAX(users.created_at) AS created_at, -- not necessary
COUNT(orders.id) AS orders_count
FROM orders
LEFT JOIN users
ON users.id = orders.user_id