Amazon Interview Question

1. Select all distinct pet names from multiple tables

Interview Answer

Anonymous

Jun 23, 2025

SELECT DISTINCT name FROM dogs UNION SELECT DISTINCT name FROM cats UNION SELECT DISTINCT name FROM hamsters;