Define an alias for the models, to use in queries.
            var t0 = new Orders().AsQueryable();
		

"Sql Commands" (such as AS, AVG, DISTINCT etc.) can be used via helper parameter that comes with expression function.
			Odb.SQL.Select(x => ... x[table-field].SqlCommand ... );
		

CONSTANT Selects a contant value.
		Odb.SQL.Select(x =>
			x.Fields( 5.60, x[5.63].AS("C1"),
					  "str1", x["str2"].AS("C2"),
			)
		);
	
SELECT 5.60, 5.63 AS C1, 'str1', 'str2' AS C2
AS Renames a column with an alias.
		Odb.SQL.Select(x => 
			x.From(t0)
			 .Fields( x["X"].AS("C1"), 
					  x[t0.OrderID].AS("OID")
			 )
		);
	
SELECT 'X' AS C1, t0.OrderID AS OID
FROM [Orders] AS t0
IN / NOT_IN IN command allows you to specify multiple values in a WHERE clause.
		var vals1 = new[] {1, 2};
		var vals2 = new[] {"A", "B", "C"};

		Odb.SQL.Select(x => 
			x.From(t0)
			 .Where( x[t0.OrderID].IN(vals1) & 
					 x[t0.EmployeeID].NOT_IN(vals2) 
			)
		);
	
SELECT *
FROM [Orders] AS t0
WHERE
t0.OrderID IN (1, 2) AND
t0.EmployeeID NOT IN ('A', 'B', 'C')
IS NULL / IS NOT NULL
		Odb.SQL.Select(x => 
			x.From(t0)
			 .Where( (object)t0.OrderID == DBNull.Value & 
					 (object)t0.EmployeeID != DBNull.Value 
			)
		);
	
SELECT *
FROM [Orders] AS t0
WHERE
t0.OrderID IS NULL AND
t0.EmployeeID IS NOT NULL
LIKE is used in a WHERE clause to search for a specified pattern in a column.
		Odb.SQL.Select(x => 
			x.From(t0)
			 .Where( x[t0.Country].STARTS_WITH("A") | 
					 x[t0.Country].ENDS_WITH("Z") | 
					 x[t0.Country].CONTAINS("M")
			 )
		);
	
SELECT *
FROM [Customers] AS t0
WHERE
t0.Country LIKE 'A%' OR
t0.Country LIKE '%Z' OR
t0.CountryLIKE '%M%'
DISTINCT Inside a table, a column often contains many duplicate values; and sometimes you only want to list the different (distinct) values. The DISTINCT statement is used to return only distinct (different) values.
		Odb.SQL.Select(x => 
			x.From(t0)
			 .Fields( x[t0.Country].DISTINCT().AS("C") )
		);
	
SELECT DISTINCT(th.year) AS 'C'
FROM [Customers] AS t0
COALESCE Return the first non-null value in a list.
		Odb.SQL.Select(x => 
			x.From(t0)
			 .Fields( x[t0.CustomerName].COALESCE('???').AS("C") )
		);
	
SELECT COALESCE(t0.CustomerName, '???') AS 'C'
FROM [Customers] AS t0
Aggregate Functions
		Odb.SQL.Select(x => 
			x.From(t0)
			 .GroupBy(t0.Country)
			 .Fields( th.Country, 
					  x[t0.CustomerID].AVG().AS("C1"), 
					  x[t0.CustomerID].MIN().AS("C2"), 
					  x[t0.CustomerID].MAX().AS("C3"), 
					  x[t0.CustomerID].SUM().AS("C4")
			  )
		);
	
SELECT t0.Country,
AVG(t0.CustomerID) AS 'C1',
MIN(t0.CustomerID) AS 'C2',
MAX(t0.CustomerID) AS 'C3',
SUM(t0.CustomerID) AS 'C4'
FROM [Customers] AS t0
GROUP BY t0.Country
String Functions
		Odb.SQL.Select(x =>
			x.From(t0)
			 .Fields( x[t0.City].SUBSTRING(2, 4).AS("2_to_4"), 
					  x[t0.City].SUBSTRING(0, 1).AS("left_1"), 
					  x[t0.City].SUBSTRING(-1, 2).AS("right_2"), 
					  x[t0.City].UPPER().AS("C1"), 
					  x[t0.City].LOWER().AS("C2"), 
					  x[t0.City].TRIM().AS("C3"), 
					  x[t0.City].RTRIM().LTRIM().AS("C4"), 
					  x[t0.City].CONCAT(", ID=", t0.CustomerID).AS("C5")
			  )
		);
	
SELECT
SUBSTRING(t0.City) AS '2_to_4',
LEFT(t0.City, 1) AS 'left_1',
RIGHT(t0.City, 2) AS 'right_2',
UPPER(t0.City) AS 'C1',
LOWER(t0.City) AS 'C2',
TRIM(t0.City) AS 'C3',
LTRIM(RTRIM(t0.City)) AS 'C4',
CONCAT(t0.City, ', ID=', t0.CustomerID) AS 'C5'
FROM [Customer] AS t0