Need to join table in query objects

Hi all,

Need to join two tables using query objects x++
Example

Select stock.itemid ,sum(sales.amt) from stock left join sales on stock.item=sales.itemid