BTW, there is a syntax issue on that one:
Msg 8155, Level 16, State 2, Line 15
No column name was specified for column 1 of 'F'.
Msg 207, Level 16, State 1, Line 16
Invalid column name 'PhotoCount'.
Msg 207, Level 16, State 1, Line 9
Invalid column name 'PhotoCount'.