Last answered:

24 Jul 2024

Posted on:

06 Oct 2021

0

Mock interview 4 - sub query needed

In Mock interview 4, is the su query really needed?  can’t you do the same by adding the where clause in the first query?

2 answers ( 0 marked as helpful)
Posted on:

22 Oct 2021

0

You can't reference a new alias in a WHERE clause within a query, and you can't use a windows function in a query, so I think it does need the sub query here!

Posted on:

24 Jul 2024

0

The actual data is confusing to me. Is each acc_id in the table only once? It sounds like each acc_id is in the table for every single date - why? Why not just have the date it was opened, and the date it was closed? 

Submit an answer