Search Results for

    Show / Hide Table of Contents

    Class NpgsqlAggregateDbFunctionsExtensions

    Provides extension methods supporting aggregate function translation for PostgreSQL.

    Inheritance
    object
    NpgsqlAggregateDbFunctionsExtensions
    Namespace: Microsoft.EntityFrameworkCore
    Assembly: Npgsql.EntityFrameworkCore.PostgreSQL.dll
    Syntax
    public static class NpgsqlAggregateDbFunctionsExtensions

    Methods

    | Improve this Doc View Source

    ArrayAgg<T>(DbFunctions, IEnumerable<T>)

    Collects all the input values, including nulls, into a PostgreSQL array. Corresponds to the PostgreSQL array_agg aggregate function.

    Declaration
    public static T[] ArrayAgg<T>(this DbFunctions _, IEnumerable<T> input)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><T> input

    The input values to be aggregated into an array.

    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T
    See Also
    PostgreSQL documentation for aggregate functions.
    | Improve this Doc View Source

    Average(DbFunctions, IEnumerable<TimeSpan>)

    Computes the average (arithmetic mean) of the non-null input intervals. Corresponds to the PostgreSQL avg aggregate function.

    Declaration
    public static TimeSpan? Average(this DbFunctions _, IEnumerable<TimeSpan> input)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><TimeSpan> input

    The input values to be computed into an average.

    Returns
    Type Description
    TimeSpan?
    See Also
    PostgreSQL documentation for aggregate functions.
    | Improve this Doc View Source

    Correlation(DbFunctions, IEnumerable<(double, double)>)

    Computes the correlation coefficient. Corresponds to the PostgreSQL corr function.

    Declaration
    public static double? Correlation(this DbFunctions _, IEnumerable<(double, double)> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><(double, double)> values

    The values.

    Returns
    Type Description
    double?
    | Improve this Doc View Source

    CovariancePopulation(DbFunctions, IEnumerable<(double, double)>)

    Computes the population covariance. Corresponds to the PostgreSQL covar_pop function.

    Declaration
    public static double? CovariancePopulation(this DbFunctions _, IEnumerable<(double, double)> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><(double, double)> values

    The values.

    Returns
    Type Description
    double?
    | Improve this Doc View Source

    CovarianceSample(DbFunctions, IEnumerable<(double, double)>)

    Computes the sample covariance. Corresponds to the PostgreSQL covar_samp function.

    Declaration
    public static double? CovarianceSample(this DbFunctions _, IEnumerable<(double, double)> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><(double, double)> values

    The values.

    Returns
    Type Description
    double?
    | Improve this Doc View Source

    JsonAgg<T>(DbFunctions, IEnumerable<T>)

    Collects all the input values, including nulls, into a json array. Values are converted to JSON as per to_json or to_jsonb. Corresponds to the PostgreSQL json_agg aggregate function.

    Declaration
    public static T[] JsonAgg<T>(this DbFunctions _, IEnumerable<T> input)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><T> input

    The input values to be aggregated into a JSON array.

    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T
    See Also
    PostgreSQL documentation for aggregate functions.
    | Improve this Doc View Source

    JsonbAgg<T>(DbFunctions, IEnumerable<T>)

    Collects all the input values, including nulls, into a jsonb array. Values are converted to JSON as per to_json or to_jsonb. Corresponds to the PostgreSQL jsonb_agg aggregate function.

    Declaration
    public static T[] JsonbAgg<T>(this DbFunctions _, IEnumerable<T> input)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><T> input

    The input values to be aggregated into a JSON array.

    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T
    See Also
    PostgreSQL documentation for aggregate functions.
    | Improve this Doc View Source

    JsonbObjectAgg<T1, T2>(DbFunctions, IEnumerable<(T1, T2)>)

    Collects all the key/value pairs into a JSON object. Key arguments are coerced to text; value arguments are converted as per to_jsonb. Values can be null, but not keys. Corresponds to the PostgreSQL jsonb_object_agg aggregate function.

    Declaration
    public static string JsonbObjectAgg<T1, T2>(this DbFunctions _, IEnumerable<(T1, T2)> keyValuePairs)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><(T1, T2)> keyValuePairs

    An enumerable of key-value pairs to be aggregated into a JSON object.

    Returns
    Type Description
    string
    Type Parameters
    Name Description
    T1
    T2
    See Also
    PostgreSQL documentation for aggregate functions.
    | Improve this Doc View Source

    JsonbObjectAgg<T1, T2, TReturn>(DbFunctions, IEnumerable<(T1, T2)>)

    Collects all the key/value pairs into a JSON object. Key arguments are coerced to text; value arguments are converted as per to_jsonb. Values can be null, but not keys. Corresponds to the PostgreSQL jsonb_object_agg aggregate function.

    Declaration
    public static TReturn JsonbObjectAgg<T1, T2, TReturn>(this DbFunctions _, IEnumerable<(T1, T2)> keyValuePairs)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><(T1, T2)> keyValuePairs

    An enumerable of key-value pairs to be aggregated into a JSON object.

    Returns
    Type Description
    TReturn
    Type Parameters
    Name Description
    T1
    T2
    TReturn
    See Also
    PostgreSQL documentation for aggregate functions.
    | Improve this Doc View Source

    JsonObjectAgg<T1, T2>(DbFunctions, IEnumerable<(T1, T2)>)

    Collects all the key/value pairs into a JSON object. Key arguments are coerced to text; value arguments are converted as per to_json. Values can be null, but not keys. Corresponds to the PostgreSQL json_object_agg aggregate function.

    Declaration
    public static string JsonObjectAgg<T1, T2>(this DbFunctions _, IEnumerable<(T1, T2)> keyValuePairs)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><(T1, T2)> keyValuePairs

    An enumerable of key-value pairs to be aggregated into a JSON object.

    Returns
    Type Description
    string
    Type Parameters
    Name Description
    T1
    T2
    See Also
    PostgreSQL documentation for aggregate functions.
    | Improve this Doc View Source

    JsonObjectAgg<T1, T2, TReturn>(DbFunctions, IEnumerable<(T1, T2)>)

    Collects all the key/value pairs into a JSON object. Key arguments are coerced to text; value arguments are converted as per to_json. Values can be null, but not keys. Corresponds to the PostgreSQL json_object_agg aggregate function.

    Declaration
    public static TReturn JsonObjectAgg<T1, T2, TReturn>(this DbFunctions _, IEnumerable<(T1, T2)> keyValuePairs)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><(T1, T2)> keyValuePairs

    An enumerable of key-value pairs to be aggregated into a JSON object.

    Returns
    Type Description
    TReturn
    Type Parameters
    Name Description
    T1
    T2
    TReturn
    See Also
    PostgreSQL documentation for aggregate functions.
    | Improve this Doc View Source

    RegrAverageX(DbFunctions, IEnumerable<(double, double)>)

    Computes the average of the independent variable, sum(X)/N. Corresponds to the PostgreSQL regr_avgx function.

    Declaration
    public static double? RegrAverageX(this DbFunctions _, IEnumerable<(double, double)> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><(double, double)> values

    The values.

    Returns
    Type Description
    double?
    | Improve this Doc View Source

    RegrAverageY(DbFunctions, IEnumerable<(double, double)>)

    Computes the average of the dependent variable, sum(Y)/N. Corresponds to the PostgreSQL regr_avgy function.

    Declaration
    public static double? RegrAverageY(this DbFunctions _, IEnumerable<(double, double)> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><(double, double)> values

    The values.

    Returns
    Type Description
    double?
    | Improve this Doc View Source

    RegrCount(DbFunctions, IEnumerable<(double, double)>)

    Computes the number of rows in which both inputs are non-null. Corresponds to the PostgreSQL regr_count function.

    Declaration
    public static long? RegrCount(this DbFunctions _, IEnumerable<(double, double)> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><(double, double)> values

    The values.

    Returns
    Type Description
    long?
    | Improve this Doc View Source

    RegrIntercept(DbFunctions, IEnumerable<(double, double)>)

    Computes the y-intercept of the least-squares-fit linear equation determined by the (X, Y) pairs. Corresponds to the PostgreSQL regr_intercept function.

    Declaration
    public static double? RegrIntercept(this DbFunctions _, IEnumerable<(double, double)> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><(double, double)> values

    The values.

    Returns
    Type Description
    double?
    | Improve this Doc View Source

    RegrR2(DbFunctions, IEnumerable<(double, double)>)

    Computes the square of the correlation coefficient. Corresponds to the PostgreSQL regr_r2 function.

    Declaration
    public static double? RegrR2(this DbFunctions _, IEnumerable<(double, double)> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><(double, double)> values

    The values.

    Returns
    Type Description
    double?
    | Improve this Doc View Source

    RegrSlope(DbFunctions, IEnumerable<(double, double)>)

    Computes the slope of the least-squares-fit linear equation determined by the (X, Y) pairs. Corresponds to the PostgreSQL regr_slope function.

    Declaration
    public static double? RegrSlope(this DbFunctions _, IEnumerable<(double, double)> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><(double, double)> values

    The values.

    Returns
    Type Description
    double?
    | Improve this Doc View Source

    RegrSXX(DbFunctions, IEnumerable<(double, double)>)

    Computes the “sum of squares” of the independent variable, sum(X^2) - sum(X)^2/N. Corresponds to the PostgreSQL regr_sxx function.

    Declaration
    public static double? RegrSXX(this DbFunctions _, IEnumerable<(double, double)> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><(double, double)> values

    The values.

    Returns
    Type Description
    double?
    | Improve this Doc View Source

    RegrSXY(DbFunctions, IEnumerable<(double, double)>)

    Computes the “sum of products” of independent times dependent variables, sum(X*Y) - sum(X) * sum(Y)/N. Corresponds to the PostgreSQL regr_sxy function.

    Declaration
    public static double? RegrSXY(this DbFunctions _, IEnumerable<(double, double)> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><(double, double)> values

    The values.

    Returns
    Type Description
    double?
    | Improve this Doc View Source

    StandardDeviationPopulation(DbFunctions, IEnumerable<byte>)

    Returns the population standard deviation of all values in the specified expression. Corresponds to the PostgreSQL stddev_pop function.

    Declaration
    public static double? StandardDeviationPopulation(this DbFunctions _, IEnumerable<byte> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><byte> values

    The values.

    Returns
    Type Description
    double?

    The computed population standard deviation.

    | Improve this Doc View Source

    StandardDeviationPopulation(DbFunctions, IEnumerable<decimal>)

    Returns the population standard deviation of all values in the specified expression. Corresponds to the PostgreSQL stddev_pop function.

    Declaration
    public static double? StandardDeviationPopulation(this DbFunctions _, IEnumerable<decimal> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><decimal> values

    The values.

    Returns
    Type Description
    double?

    The computed population standard deviation.

    | Improve this Doc View Source

    StandardDeviationPopulation(DbFunctions, IEnumerable<double>)

    Returns the population standard deviation of all values in the specified expression. Corresponds to the PostgreSQL stddev_pop function.

    Declaration
    public static double? StandardDeviationPopulation(this DbFunctions _, IEnumerable<double> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><double> values

    The values.

    Returns
    Type Description
    double?

    The computed population standard deviation.

    | Improve this Doc View Source

    StandardDeviationPopulation(DbFunctions, IEnumerable<short>)

    Returns the population standard deviation of all values in the specified expression. Corresponds to the PostgreSQL stddev_pop function.

    Declaration
    public static double? StandardDeviationPopulation(this DbFunctions _, IEnumerable<short> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><short> values

    The values.

    Returns
    Type Description
    double?

    The computed population standard deviation.

    | Improve this Doc View Source

    StandardDeviationPopulation(DbFunctions, IEnumerable<int>)

    Returns the population standard deviation of all values in the specified expression. Corresponds to the PostgreSQL stddev_pop function.

    Declaration
    public static double? StandardDeviationPopulation(this DbFunctions _, IEnumerable<int> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><int> values

    The values.

    Returns
    Type Description
    double?

    The computed population standard deviation.

    | Improve this Doc View Source

    StandardDeviationPopulation(DbFunctions, IEnumerable<long>)

    Returns the population standard deviation of all values in the specified expression. Corresponds to the PostgreSQL stddev_pop function.

    Declaration
    public static double? StandardDeviationPopulation(this DbFunctions _, IEnumerable<long> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><long> values

    The values.

    Returns
    Type Description
    double?

    The computed population standard deviation.

    | Improve this Doc View Source

    StandardDeviationPopulation(DbFunctions, IEnumerable<float>)

    Returns the population standard deviation of all values in the specified expression. Corresponds to the PostgreSQL stddev_pop function.

    Declaration
    public static double? StandardDeviationPopulation(this DbFunctions _, IEnumerable<float> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><float> values

    The values.

    Returns
    Type Description
    double?

    The computed population standard deviation.

    | Improve this Doc View Source

    StandardDeviationSample(DbFunctions, IEnumerable<byte>)

    Returns the sample standard deviation of all values in the specified expression. Corresponds to the PostgreSQL stddev_samp function.

    Declaration
    public static double? StandardDeviationSample(this DbFunctions _, IEnumerable<byte> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><byte> values

    The values.

    Returns
    Type Description
    double?

    The computed sample standard deviation.

    | Improve this Doc View Source

    StandardDeviationSample(DbFunctions, IEnumerable<decimal>)

    Returns the sample standard deviation of all values in the specified expression. Corresponds to the PostgreSQL stddev_samp function.

    Declaration
    public static double? StandardDeviationSample(this DbFunctions _, IEnumerable<decimal> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><decimal> values

    The values.

    Returns
    Type Description
    double?

    The computed sample standard deviation.

    | Improve this Doc View Source

    StandardDeviationSample(DbFunctions, IEnumerable<double>)

    Returns the sample standard deviation of all values in the specified expression. Corresponds to the PostgreSQL stddev_samp function.

    Declaration
    public static double? StandardDeviationSample(this DbFunctions _, IEnumerable<double> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><double> values

    The values.

    Returns
    Type Description
    double?

    The computed sample standard deviation.

    | Improve this Doc View Source

    StandardDeviationSample(DbFunctions, IEnumerable<short>)

    Returns the sample standard deviation of all values in the specified expression. Corresponds to the PostgreSQL stddev_samp function.

    Declaration
    public static double? StandardDeviationSample(this DbFunctions _, IEnumerable<short> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><short> values

    The values.

    Returns
    Type Description
    double?

    The computed sample standard deviation.

    | Improve this Doc View Source

    StandardDeviationSample(DbFunctions, IEnumerable<int>)

    Returns the sample standard deviation of all values in the specified expression. Corresponds to the PostgreSQL stddev_samp function.

    Declaration
    public static double? StandardDeviationSample(this DbFunctions _, IEnumerable<int> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><int> values

    The values.

    Returns
    Type Description
    double?

    The computed sample standard deviation.

    | Improve this Doc View Source

    StandardDeviationSample(DbFunctions, IEnumerable<long>)

    Returns the sample standard deviation of all values in the specified expression. Corresponds to the PostgreSQL stddev_samp function.

    Declaration
    public static double? StandardDeviationSample(this DbFunctions _, IEnumerable<long> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><long> values

    The values.

    Returns
    Type Description
    double?

    The computed sample standard deviation.

    | Improve this Doc View Source

    StandardDeviationSample(DbFunctions, IEnumerable<float>)

    Returns the sample standard deviation of all values in the specified expression. Corresponds to the PostgreSQL stddev_samp function.

    Declaration
    public static double? StandardDeviationSample(this DbFunctions _, IEnumerable<float> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><float> values

    The values.

    Returns
    Type Description
    double?

    The computed sample standard deviation.

    | Improve this Doc View Source

    Sum(DbFunctions, IEnumerable<TimeSpan>)

    Computes the sum of the non-null input intervals. Corresponds to the PostgreSQL sum aggregate function.

    Declaration
    public static TimeSpan? Sum(this DbFunctions _, IEnumerable<TimeSpan> input)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><TimeSpan> input

    The input values to be summed.

    Returns
    Type Description
    TimeSpan?
    See Also
    PostgreSQL documentation for aggregate functions.
    | Improve this Doc View Source

    VariancePopulation(DbFunctions, IEnumerable<byte>)

    Returns the population variance of all values in the specified expression. Corresponds to the PostgreSQL var_pop function.

    Declaration
    public static double? VariancePopulation(this DbFunctions _, IEnumerable<byte> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><byte> values

    The values.

    Returns
    Type Description
    double?

    The computed population variance.

    | Improve this Doc View Source

    VariancePopulation(DbFunctions, IEnumerable<decimal>)

    Returns the population variance of all values in the specified expression. Corresponds to the PostgreSQL var_pop function.

    Declaration
    public static double? VariancePopulation(this DbFunctions _, IEnumerable<decimal> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><decimal> values

    The values.

    Returns
    Type Description
    double?

    The computed population variance.

    | Improve this Doc View Source

    VariancePopulation(DbFunctions, IEnumerable<double>)

    Returns the population variance of all values in the specified expression. Corresponds to the PostgreSQL var_pop function.

    Declaration
    public static double? VariancePopulation(this DbFunctions _, IEnumerable<double> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><double> values

    The values.

    Returns
    Type Description
    double?

    The computed population variance.

    | Improve this Doc View Source

    VariancePopulation(DbFunctions, IEnumerable<short>)

    Returns the population variance of all values in the specified expression. Corresponds to the PostgreSQL var_pop function.

    Declaration
    public static double? VariancePopulation(this DbFunctions _, IEnumerable<short> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><short> values

    The values.

    Returns
    Type Description
    double?

    The computed population variance.

    | Improve this Doc View Source

    VariancePopulation(DbFunctions, IEnumerable<int>)

    Returns the population variance of all values in the specified expression. Corresponds to the PostgreSQL var_pop function.

    Declaration
    public static double? VariancePopulation(this DbFunctions _, IEnumerable<int> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><int> values

    The values.

    Returns
    Type Description
    double?

    The computed population variance.

    | Improve this Doc View Source

    VariancePopulation(DbFunctions, IEnumerable<long>)

    Returns the population variance of all values in the specified expression. Corresponds to the PostgreSQL var_pop function.

    Declaration
    public static double? VariancePopulation(this DbFunctions _, IEnumerable<long> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><long> values

    The values.

    Returns
    Type Description
    double?

    The computed population variance.

    | Improve this Doc View Source

    VariancePopulation(DbFunctions, IEnumerable<float>)

    Returns the population variance of all values in the specified expression. Corresponds to the PostgreSQL var_pop function.

    Declaration
    public static double? VariancePopulation(this DbFunctions _, IEnumerable<float> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><float> values

    The values.

    Returns
    Type Description
    double?

    The computed population variance.

    | Improve this Doc View Source

    VarianceSample(DbFunctions, IEnumerable<byte>)

    Returns the sample variance of all values in the specified expression. Corresponds to the PostgreSQL var_samp function.

    Declaration
    public static double? VarianceSample(this DbFunctions _, IEnumerable<byte> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><byte> values

    The values.

    Returns
    Type Description
    double?

    The computed sample variance.

    | Improve this Doc View Source

    VarianceSample(DbFunctions, IEnumerable<decimal>)

    Returns the sample variance of all values in the specified expression. Corresponds to the PostgreSQL var_samp function.

    Declaration
    public static double? VarianceSample(this DbFunctions _, IEnumerable<decimal> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><decimal> values

    The values.

    Returns
    Type Description
    double?

    The computed sample variance.

    | Improve this Doc View Source

    VarianceSample(DbFunctions, IEnumerable<double>)

    Returns the sample variance of all values in the specified expression. Corresponds to the PostgreSQL var_samp function.

    Declaration
    public static double? VarianceSample(this DbFunctions _, IEnumerable<double> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><double> values

    The values.

    Returns
    Type Description
    double?

    The computed sample variance.

    | Improve this Doc View Source

    VarianceSample(DbFunctions, IEnumerable<short>)

    Returns the sample variance of all values in the specified expression. Corresponds to the PostgreSQL var_samp function.

    Declaration
    public static double? VarianceSample(this DbFunctions _, IEnumerable<short> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><short> values

    The values.

    Returns
    Type Description
    double?

    The computed sample variance.

    | Improve this Doc View Source

    VarianceSample(DbFunctions, IEnumerable<int>)

    Returns the sample variance of all values in the specified expression. Corresponds to the PostgreSQL var_samp function.

    Declaration
    public static double? VarianceSample(this DbFunctions _, IEnumerable<int> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><int> values

    The values.

    Returns
    Type Description
    double?

    The computed sample variance.

    | Improve this Doc View Source

    VarianceSample(DbFunctions, IEnumerable<long>)

    Returns the sample variance of all values in the specified expression. Corresponds to the PostgreSQL var_samp function.

    Declaration
    public static double? VarianceSample(this DbFunctions _, IEnumerable<long> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><long> values

    The values.

    Returns
    Type Description
    double?

    The computed sample variance.

    | Improve this Doc View Source

    VarianceSample(DbFunctions, IEnumerable<float>)

    Returns the sample variance of all values in the specified expression. Corresponds to the PostgreSQL var_samp function.

    Declaration
    public static double? VarianceSample(this DbFunctions _, IEnumerable<float> values)
    Parameters
    Type Name Description
    DbFunctions _

    The instance.

    IEnumerable<><float> values

    The values.

    Returns
    Type Description
    double?

    The computed sample variance.

    • Improve this Doc
    • View Source
    In This Article
    Back to top © Copyright 2023 The Npgsql Development Team