# Simple Operations

This topic covers information about simple operations in dataengine.

## Content

After getting hold of the base tables, you can perform a range of operations by formulating queries. Having the easy way to represent columns, we can formulate a query for simple operations as illustrated below.

#### Syntax

```vbnet
Dim query1 As Object = workspace.query("prices", New With { _ 
            Key .Order = od.OrderID, _
            Key .Product = Od.ProductID _
            Key .Price = Op.Mul(od.UnitPrice, od.Quantity), _
        })
```

```csharp
dynamic query1 = workspace.query("prices", new
    {
        Order = od.OrderID,
        Product = od.ProductID,
        Price = Op.Mul(od.UnitPrice, od.Quantity)
    });
```

This is a simple query over a single table without grouping and aggregation. It creates a table (result of any query is a table) having the same number of rows as the base table OrderDetails. It has three columns called Order, Product, and Price. In every row, columns Order and Product contain the same order and Product IDs as in the base OrderDetail row. The Price column is unit price times quantity. **Op.Mul** is multiplication operation. Other binary operations have similar notation:

* **Op.Add** \- for addition
* **Op.Sub** \- for subtraction
* **Op.Div** \- for division
* **Op.Mod** \- for modulus

>type=note
> There are also some unary operations. For example, Op.UCase(products.ProductName) converts string to upper case. All operations are listed in the class C1.DataEngine.Op

To execute a query, use the **Execute** method as illustrated below.

#### Syntax

```vbnet
query1.Query.Execute()
```

```csharp
query1.Query.Execute();
```