Sql query for exporting all tickets in a queue including comments

Hello,

Did anyone even built an SQL-query to display all tickets in a queue
including all the comments with them?

If so can you share the SQL statements with me?

Greetings,

Floor Verschure