Those are two logically different queries. If I had to guess, I'd say the first returns 24 rows and has a nested loop join (so the inner table gets 'executed' 24 times) while the second query returns one row
Why is the execute count (which is just a measure of how many times an operator in the query runs) a problem? Is this query slow?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability