According to the documentation here
In a syntax statement, the question mark indicates the element preceding it is optional. You may omit the element or include one.
I've never seen a SOQL statement using the ? and in my tests with the Query Editor in the Developers Console only results in errors.
Can anybody tell me how to use the ? in a SOQL, and what it might be good for?