Look for various MySQL tutorials available on the web.

There is a lot of information there on MySQL functions like the one to convert Unix time stamp. In addition they cover the basic structure to format the query.

Lastly you should spend some time with PHP Admin to browse the tables and the fields in the tables. That will give you an idea of the fields you can use in your queries to get the results you are looking for.

Without this bit of research you are going to end up asking "how do I" at virtually every step. Just trying to help you be self sufficient.

The reason people are suggesting PHP Admin is because the software has a query-by-example form where you enter your desired selection criteria and output fields and IT writes the SQL for you. If you like the results then copy the SQL and save it for future use.

Abbott