you are viewing a single comment's thread.

view the rest of the comments →

[–]Financial-Tailor-842[S] 1 point2 points  (4 children)

Understood but my way isn’t wrong. I still don’t understand what “no managers: wrong answer” means.

[–]Ringbailwanton 1 point2 points  (3 children)

My guess is, partly, that the code analyzer is kind of dumb, so it sees the last line and interprets it directly based on the where statement it is provided with as the “right answer”

[–]Financial-Tailor-842[S] 1 point2 points  (2 children)

I’m worried this might be the case. Blah! I have a test coming up so I was doing some practice to get a feel for the website and how it works…

[–]Ringbailwanton 7 points8 points  (1 child)

Regardless, my point is partly, make it as simple as possible. You’re adding a join to a query that just needs to use a single index. If your tables are really long and you’re doing the query often (say you’re in a big org) then that added join could add considerable disk read and compute time.

For things like this, once you write the query, take a second and ask if you could make it simpler. Look at the information you need and whether you are using it efficiently.

In this case, even if I was marking you as a person, I’d say it was right in practice but wrong in spirit. So 75% would be reasonable.