Sunday, November 7, 2010

Gay Cruising In Northern New Jersey

1._
GROUP BY combines records with identical values in the list of fields specified in a single record. For each record summary value is created by including a SQL aggregate function, such as Sum or Count, in the SELECT statement. Its syntax is: SELECT
fields FROM table WHERE criterion GROUP BY fields
group GROUP BY is optional. The Summary values are omitted if therenan. Once the records are grouped using GROUP BY, HAVING determines which of them are displayed.

Id_Familia SELECT Sum (Stock)

FROM Products GROUP BY Id_Familia HAVING Sum (Stock) > 100 AND ProductName Like
BOS *;
2._
AVG Calculate the arithmetic mean of a jointto the values in a specified field in a query. Its syntax is as follows Avg (expr) expr Where is the field that contains numeric data for which you want to calculate the mean or an expression that performs a comfortable ; calculation using data from the field. The average calculated by Avg is the arithmetic mean (the sum of the values divided by the number of values). The Avg function does not include any Null field in the calculation. SELECT
Avg (Expenses) AS Average FROM Orders WHERE cute, number of records regardless of what values are stored in the registers. The Count function does not have records that have Null fields unless expr is the asterisk wildcard character (*). If you use an asterisk, Count estimated the total number of records, including those that contain null fields. Count (*) is considerably faster than Count (Field). No asterisk should be placed in double quotes ('*'). SELECT Count (*) AS
Total FROM Orders;
If expr identifies multiple fields, the Count function has a record only if at least onefields is Null. If all the specified fields are Null, there is no registration. You have to separate the field names with an ampersand (&).
SELECT Count (shipDate & Transportation) AS Total FROM Orders ;

4._

Max , Min Return the minimum or maximum of a set of values in a specific field in a query. Its syntax is: Min (expr) Max (expr) expr Where is the field sobDev, StDevP
Returns the standard deviation estimates for the population (the total records in the table) or a sample of the population represented (random sample). Its syntax is:
StDev (expr) StDevP (expr) expr Where is the name of the field that contains the data they want to evaluate or an expression that performs a calculation using the data from those fields. Operands in expr can include the name of a field in a table, a constant or a function (which may be intrinsic or user-defined but not other SQL aggregate functions)
a calculation using the data from those fields. Operands in expr can include the name of a field in a table, a constant or a function (which may be intrinsic or user-defined but not other SQL aggregate functions) If the query contains fewer than two records, Var and VarP return Null (this indicates that the variance can not be calculated). Var and VarP can use a query expression or a SQL statement. SELECT Var (Expenses) AS Variance


FROM Orders WHERE

Country = 'Spain'; SELECT

0 comments:

Post a Comment