Database: [PostgreSQL/MySQL/SQLite]. Tables: [table definitions or columns] Question: [e.g. monthly revenue by country for the last 12 months, excluding refunds]. Write the query, explain each part briefly, and list edge cases (nulls, time zones, duplicates) and how the query handles them.