Hexagon interview question

SQL queries about joins, foreign keys,views.