**Spark query plan for the first query**

**Spark query plan for the second query**
