Is asking homework questions allowed or should it be allowed/tolerated in dba.stackexchange.com? Is there a guideline for this in stackexchange?
My personal guideline would be that homework questions are fine, as long as they put some effort into it. Dato's question is a good one to me, because the asker has put in some effort to solve it. On the other hand, jordan's question runs a bit close to my "no effort and just wants answers" spidey-sense. There was another question a couple of days ago (that I can't find now) that was even worse, I could barely understand it.
Simon Righarts has highlighted two good examples and I'm broadly in agreement with his classification of them.
I'd like to add a requirement/expectation for homework and "please do my job for me" questions, the addition of DDL and sample data scripts. These questions usually involve relatively simple query syntax issues, which are more valuable to future readers if they can serve as complete examples. Diagrams are helpful but still require anyone attempting an answer to translate to scripts.
Jack Douglas's answer to Dato's question is a good example of the scripts that should have been provided.