$criteria = new Criteria(); $criteria->addAlias('u', 'users'); $criteria->addJoin('my_table', 'u.id = my_table.user_id');
$criteria = new Criteria(); $criteria->addAlias('price', 'products.price'); $criteria->addSelectColumn('SUM(price) AS total_price');In this example, we create an alias 'price' for the 'products.price' column using the addAlias function. We then use this alias in the addSelectColumn function to calculate the total price of all products. The Criteria class is part of the Propel PHP ORM library.