What are the best practices for assigning aliases to table names in PHP SELECT queries?

When writing SQL queries in PHP, it is common to use aliases for table names to make the query more readable and concise. To assign aliases to table names in SELECT queries, you can simply add the alias after the table name in the FROM clause. It is important to choose meaningful aliases that are easy to understand and remember.

$query = "SELECT u.id, u.username, p.post_content 
          FROM users u
          JOIN posts p ON u.id = p.user_id";