Amazon Interview Question

sql queries java collections