php, Mysql. Is it possible to make this as in one SQL query?

Printable View